Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-24-2016, 11:48 PM
macropod's Avatar
macropod macropod is offline Sending Merge Document To Printer And Saving Windows 7 64bit Sending Merge Document To Printer And Saving Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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 Jenn,

I'd suggest:
ByVal dest as Long
and, instead of:
conditionally changing the destination, always use:
wdSendtToNewDocument

Also, instead of:
With .ActiveDocument
...
End With

Set oDoc2 = objWord.ActiveDocument
'MsgBox oDoc2.Name
With oDoc2
...
End with
use:
Set oDoc2 = objWord.ActiveDocument
With oDoc2
...
End with
and, where you have:
.SaveAs myPath & "\" & rpt_od & ".docx"
introduce the dest test at this point to conditionally save (via SaveAs) or print (via .Printout) the document, then close it without saving.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printer Problems-Need to reload printer each day jekronenfeld Windows 1 11-24-2014 12:35 AM
Sending Merge Document To Printer And Saving Help Sending Mail Merge Document dazwm Mail Merge 8 01-28-2014 01:00 PM
Sending Merge Document To Printer And Saving Problem with saving document after paste some contents from another document expert4knowledge Word 3 11-26-2013 03:53 AM
MS Word 2003, printer queue in 'printer properties' shows 1 job; no job in printer benhuxham Word 0 07-25-2011 06:58 PM
Sending Merge Document To Printer And Saving Select printer to document JosL Office 3 03-07-2009 12:40 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:13 PM.


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