P
Peter_A_M (NL)
This is a slightly modified repost of a question I posted earlier in this
group.
I really hope someone helps me out!
I've been writing a macro including a UserForm, in order to be able to print
(one or more) documents either with or without markup (comments or revisions)
showing, or as shown on screen, depending on the value of a checkbox.
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 for these same
documents, although the balloons still do show on screen.
Part of the code I wrote (part of a loop for each selected document; name of
the checkbox = CheckMarkup):
***
With Documents(...) 'the particular open document
If CheckMarkup = True Then 'print with markup showing
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 'no markup
PrintMarkup = wdPrintDocumentContent
ElseIf IsNull(CheckMarkup.Value) = True Then 'triplestate enabled; print
as shown
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
***
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. When I
applied menu choices View > Markup I was really astonished to find the
statement WordBasic.ViewChanges being recorded.
And as astonished to find WordBasic.ShowComments for changing the
Show-option for comments (on the Reviewing toolbar).
I couldn't find 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
group.
I really hope someone helps me out!
I've been writing a macro including a UserForm, in order to be able to print
(one or more) documents either with or without markup (comments or revisions)
showing, or as shown on screen, depending on the value of a checkbox.
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 for these same
documents, although the balloons still do show on screen.
Part of the code I wrote (part of a loop for each selected document; name of
the checkbox = CheckMarkup):
***
With Documents(...) 'the particular open document
If CheckMarkup = True Then 'print with markup showing
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 'no markup
PrintMarkup = wdPrintDocumentContent
ElseIf IsNull(CheckMarkup.Value) = True Then 'triplestate enabled; print
as shown
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
***
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. When I
applied menu choices View > Markup I was really astonished to find the
statement WordBasic.ViewChanges being recorded.
And as astonished to find WordBasic.ShowComments for changing the
Show-option for comments (on the Reviewing toolbar).
I couldn't find 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