Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Thu, 14 Aug 2008 13:28:23 -0700,    group: microsoft.public.word.vba.general        back       


VBA to change Display for Review setting   
Hello, I need to be able to change the Display for Review setting from 
"Final" to "Final Showing Markup", but I can't seem to find the correct code 
to do so. Can anyone help with this?
date: Thu, 14 Aug 2008 13:28:23 -0700   author:   megnotarte

Re: VBA to change Display for Review setting   
On Thu, 14 Aug 2008 13:28:23 -0700, megnotarte
 wrote:

>Hello, I need to be able to change the Display for Review setting from 
>"Final" to "Final Showing Markup", but I can't seem to find the correct code 
>to do so. Can anyone help with this? 

In terms of VBA, the "Final Showing Markup" consists of two separate properties:

With ActiveWindow.View
      .RevisionsView = wdRevisionsViewFinal
      .ShowRevisionsAndComments = True
End With

If you're sure the view is already Final, you can omit the first of these two,
but it's safer to leave nothing to chance.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
date: Thu, 14 Aug 2008 20:05:21 -0400   author:   Jay Freedman

Re: VBA to change Display for Review setting   
Hi Jay,
Thanks for the quick response. Here's the rub...I have been trying that, but 
it's not working. Basically I want it to go into "Final Showing Markup" on 
print of the document, but it appears that it isn't taking effect until after 
the print command is issued. Here's the code I'm using

Private Sub appWord_DocumentBeforePrint(ByVal doc As Document, Cancel As 
Boolean)
       With ActiveWindow.View
          .RevisionsView = wdRevisionsViewFinal
          .ShowRevisionsAndComments = True
        End With

    
End Sub

I've tried using other function calls in that DocumentBeforePrint function, 
but it seems like they get stalled once the print dialog box shows up. After 
the dialog box is cleared (either by printing or canceling the print) it 
finishes up. Any idea what's going on?

Thanks again for you help!
Megan
date: Thu, 14 Aug 2008 17:40:01 -0700   author:   megnotarte

Re: VBA to change Display for Review setting   
On Thu, 14 Aug 2008 17:40:01 -0700, megnotarte
 wrote:

>Hi Jay,
>Thanks for the quick response. Here's the rub...I have been trying that, but 
>it's not working. Basically I want it to go into "Final Showing Markup" on 
>print of the document, but it appears that it isn't taking effect until after 
>the print command is issued. Here's the code I'm using
>
>Private Sub appWord_DocumentBeforePrint(ByVal doc As Document, Cancel As 
>Boolean)
>       With ActiveWindow.View
>          .RevisionsView = wdRevisionsViewFinal
>          .ShowRevisionsAndComments = True
>        End With
>
>    
>End Sub
>
>I've tried using other function calls in that DocumentBeforePrint function, 
>but it seems like they get stalled once the print dialog box shows up. After 
>the dialog box is cleared (either by printing or canceling the print) it 
>finishes up. Any idea what's going on?
>
>Thanks again for you help!
>Megan

Sorry, I don't have any idea what's going on, because I've never played with
that event function. I prefer to do things "the old-fashioned way" because I
know it works:

Sub FilePrint()
    With ActiveWindow.View
      .RevisionsView = wdRevisionsViewFinal
      .ShowRevisionsAndComments = True
    End With
    Dialogs(wdDialogFilePrint).Show
End Sub

Sub FilePrintDefault()
    With ActiveWindow.View
      .RevisionsView = wdRevisionsViewFinal
      .ShowRevisionsAndComments = True
    End With
    ActiveDocument.PrintOut
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
date: Thu, 14 Aug 2008 22:10:57 -0400   author:   Jay Freedman

Re: VBA to change Display for Review setting   
Hi Jay,
Will that function be called on print (when the user goes file -> print or 
ctrl+p)?

Thanks!
Megan
date: Fri, 15 Aug 2008 08:07:01 -0700   author:   megnotarte

Re: VBA to change Display for Review setting   
megnotarte wrote:
> Hi Jay,
> Will that function be called on print (when the user goes file ->
> print or ctrl+p)?
>
> Thanks!
> Megan

There are two functions there. The FilePrint procedure will be called when 
the user clicks the File > Print command or presses its shortcut Ctrl+P. The 
FilePrintDefault procedure will be called when the user clicks the Print 
button on the toolbar (which doesn't display the dialog but just prints the 
whole document).

Please read the article I pointed to, 
http://www.word.mvps.org/FAQs/MacrosVBA/InterceptSavePrint.htm, to 
understand the idea of making macros that intercept built-in commands.

-- 
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so 
all may benefit.
date: Fri, 15 Aug 2008 13:13:48 -0400   author:   Jay Freedman

Re: VBA to change Display for Review setting   
Ah! Ok - great. I'll give that a shot. I'm not too familiar with the 
appWord_DocumentBeforePrint method either...I wonder how it differs from the 
FilePrint and FilePrintDefault procedures.

Thanks a lot for your help!

Megan
date: Fri, 15 Aug 2008 10:24:02 -0700   author:   megnotarte

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us