Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2005

Tip: Looking for answers? Try searching our database.

Printing without or with markup (Word 2002 SP3)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter_A_M (NL) - 16 Feb 2005 13:11 GMT
Hello out there,
I've been writing a macro including a UserForm.
Depending on the value of a checkbox (one or more) documents should be
printed either with or without markup showing, or as shown on screen.

Part of the code I wrote (name of the checkbox = CheckMarkup):

With Documents(...)    'the particular open document
  If CheckMarkup = True Then
     With .ActiveWindow.View
        If .RevisionsMode <> wdBalloonRevisions Then _
                    .RevisionsMode = wdBalloonRevisions  
                                  'always show revisions as balloons
                                   
        .ShowRevisionsAndComments = True
        .ShowFormatChanges = True
        .ShowInsertionsAndDeletions = True
     End With
     PrintMarkup = wdPrintDocumentWithMarkup  
                         'variable to be used later with PrintOut command

  ElseIf CheckMarkup.Value = False Then
     PrintMarkup = wdPrintDocumentContent

  ElseIf IsNull(CheckMarkup.Value) = True Then
     If (.Revisions.Count = 0 And .Comments.Count = 0) Then
                     'no revisions, no comments present
        PrintMarkup = wdPrintDocumentContent

     ElseIf .ActiveWindow.View.ShowRevisionsAndComments = False And _
           .ActiveWindow.View.ShowFormatChanges = False And _
           .ActiveWindow.View.ShowInsertionsAndDeletions = False Then
                     'no markup visible
        PrintMarkup = wdPrintDocumentContent

     Else          'markup visible
        PrintMarkup = wdPrintDocumentWithMarkup

     End If
  End If

  .PrintOut Item:=PrintMarkup 'print the relevant way

  '... (restoring the Show... properties when necessary)

End With

My question: this works well in the beginning. But: after having printed one
or more documents without markup, and thereafter the same document(s) 'as
shown' or  with markup, no balloons are printed anymore, although they do
show on screen.

Does anyone know what is happening?
As far as I'm aware of I'm using the right properties, or do I miss one or
more?

Moreover: in order to check what happens I recorded some macros. I was
really astonished to find the statement WordBasic.ViewChanges for menu
choices View > Markup.
And as astonished to find WordBasic.ShowComments for changing (on the
Reviewing toolbar) the Show-option for comments.
I couldn't any documentation on this nor were these statements present in
Word95 or Word97.
Can anyone explain this to me?

Thanks in advance for any advice!
Peter
Klaus Linke - 23 Feb 2005 05:51 GMT
> Moreover: in order to check what happens I recorded some macros.
> I was really astonished to find the statement WordBasic.ViewChanges
[quoted text clipped - 4 lines]
> in Word95 or Word97.
> Can anyone explain this to me?

Hi Peter,

Every control in Word runs a WordBasic command. And since the macro recorder records the controls you click, it's natural for it to record those commands.

Most times, the programmers of the macro recorder probably just didn't bother to find a 100% acceptable translation from the command to "proper" VBA code, especially for more "exotic" controls/commands.
Other times, there may not be one.

Regards,
Klaus
Peter_A_M (NL) - 23 Feb 2005 06:29 GMT
Vielen Dank für ihre Erläuterung!
Peter
Klaus Linke - 23 Feb 2005 09:51 GMT
> Vielen Dank f=BCr ihre Erluterung!

Gern geschehen!

Sorry I can't help with your other problem...
Klaus
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.