Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-08-2012, 02:14 PM
Stanza_chad Stanza_chad is offline Print Document (no markups) Windows 7 64bit Print Document (no markups) Office 2010 64bit
Novice
Print Document (no markups)
 
Join Date: Aug 2012
Posts: 3
Stanza_chad is on a distinguished road
Default Print Document (no markups)


Trying to create a macro to be able print documents without showing markup comments. Apparently it is not possible to uncheck Print Markups by default if there open comments, so hoping to work around that by creating a shortcut.
So far I have this, but doesn't seem to change the Print what option to just say Document:
Code:
Sub PrintDoc()
'
' Print document only, no markups.
'
Application.PrintOut Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1
End Sub
Any suggestions would be great at this point.

Thanks.

Last edited by macropod; 08-08-2012 at 05:12 PM. Reason: Added code tags
Reply With Quote
  #2  
Old 08-08-2012, 07:04 PM
macropod's Avatar
macropod macropod is offline Print Document (no markups) Windows 7 64bit Print Document (no markups) Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Stanza_chad,

Your macro should simply print the document without invoking the Print dialogue. It also has no effect on that dialogue.

Ordinarily, if you print a document containing comments, you'll get a warning. The following modifications will suppress that warning:
Code:
Sub PrintDoc()
Dim bOption As Boolean
bOption = Options.WarnBeforeSavingPrintingSendingMarkup
Options.WarnBeforeSavingPrintingSendingMarkup = False
Application.PrintOut Range:=wdPrintAllDocument, _
  Item:=wdPrintDocumentContent, Copies:=1
Options.WarnBeforeSavingPrintingSendingMarkup = bOption
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-09-2012, 09:09 AM
Stanza_chad Stanza_chad is offline Print Document (no markups) Windows 7 64bit Print Document (no markups) Office 2010 64bit
Novice
Print Document (no markups)
 
Join Date: Aug 2012
Posts: 3
Stanza_chad is on a distinguished road
Default Re:

Nope, that code doesn't do anything different. Print screen still pops up with Documents showing markup as the default option. See screen shot attached.
When going through File > Print > Settings, Print Markup is selected that route as well.
Attached Images
File Type: png Print Document.png (29.7 KB, 15 views)
Reply With Quote
  #4  
Old 08-09-2012, 04:30 PM
macropod's Avatar
macropod macropod is offline Print Document (no markups) Windows 7 64bit Print Document (no markups) Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Stanza_chad,

As I said in my previous post:
Quote:
Your macro should simply print the document without invoking the Print dialogue. It also has no effect on that dialogue.
Please re-read the last sentence especially. What you're displaying in your last post is the Print dialogue. If you run your macro, the output should go direct to the printer without displaying the print dialogue. If you want to modify the print dialogue, you will need entirely different code.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 08-09-2012, 07:48 PM
Stanza_chad Stanza_chad is offline Print Document (no markups) Windows 7 64bit Print Document (no markups) Office 2010 64bit
Novice
Print Document (no markups)
 
Join Date: Aug 2012
Posts: 3
Stanza_chad is on a distinguished road
Default Re:

An existing add-on calls the Print Dialogue whenever I print anything. Don't ask me why... Whether I use the QuickPrint option or go to File > Print, the Print Dialague window displays and I can't seem to change that without uninstalling necessary add-ons. Different code that will modify the print dialague is exactly what I'm looking for!
Reply With Quote
  #6  
Old 08-09-2012, 08:44 PM
macropod's Avatar
macropod macropod is offline Print Document (no markups) Windows 7 64bit Print Document (no markups) Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Stanza_chad View Post
An existing add-on calls the Print Dialogue whenever I print anything.
Do you mean to say that the Print Dialogue displays even when you run your PrintDoc macro? If so, nothing short of disabling your addin is likely to work. That said, you could try something like:
Code:
Sub Test()
Dim bOption As Boolean, bAddin As Boolean
With Application
  bAddin = .AddIns("Name").Installed
  bOption = .Options.WarnBeforeSavingPrintingSendingMarkup
  .AddIns("Name").Installed = False
  .Options.WarnBeforeSavingPrintingSendingMarkup = False
  With .Dialogs(wdDialogFilePrint)
    SendKeys "%W^{HOME}{ENTER}"
    .Show
  End With
  .Options.WarnBeforeSavingPrintingSendingMarkup = bOption
  .AddIns("Name").Installed = bAddin
End With
End Sub
Note: Where you see '.AddIns("Name")', you'll need to supply your addin's name.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print Document (no markups) Print document except first page nkg Word VBA 5 05-05-2012 03:57 AM
Print Document (no markups) Mutliple copies 167 print as one document John-N Mail Merge 5 02-19-2012 07:15 PM
Save and send markups ceocast Word 1 12-09-2010 10:39 AM
How can I print out the document as follow? turbomen Project 1 05-23-2010 07:24 AM
When I print the document changes layout cooney Word 0 03-01-2010 12:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft