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.

WordBasic and Word 2003 SP3?? - (Not) Printing markup

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter_A_M (NL) - 22 Feb 2005 09:55 GMT
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
Word Heretic - 22 Feb 2005 12:00 GMT
G'day "Peter_A_M (NL)" <PeterAMNL@discussions.microsoft.com>,

  If CheckMarkup = True Then  'print with markup showing

should be

  If CheckMarkup.Value = True Then  'print with markup showing

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

Peter_A_M (NL) reckoned:

>   If CheckMarkup = True Then  'print with markup showing
Peter_A_M (NL) - 22 Feb 2005 13:01 GMT
Thanks for your response.
Of course you're right. Just two remarks:
- in my original code, I typed it correctly - so that's not the point, I'm
afraid;
- Value is the default property for a checkbox, so I guess it still would
work this way (maybe not thuogh).

Any further comments to my question(s)? I'd be grateful!
Peter

> G'day "Peter_A_M (NL)" <PeterAMNL@discussions.microsoft.com>,
>
[quoted text clipped - 12 lines]
>
> >   If CheckMarkup = True Then  'print with markup showing
Word Heretic - 23 Feb 2005 00:30 GMT
G'day "Peter_A_M (NL)" <PeterAMNL@discussions.microsoft.com>,

1) Bugger
2) Should doesn't equals does - I have had trouble with the lack of a
.value on a checkbox control before.

Repost the code, give us a another look at it, I'll clean it up a bit
so I can read it.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

Peter_A_M (NL) reckoned:

>Thanks for your response.
>Of course you're right. Just two remarks:
[quoted text clipped - 22 lines]
>>
>> >   If CheckMarkup = True Then  'print with markup showing
Peter_A_M (NL) - 23 Feb 2005 06:27 GMT
Here's my repost!

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.Value = 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
 
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.