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 / August 2006

Tip: Looking for answers? Try searching our database.

Automating the filename for pdf conversion

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gem_man - 13 Aug 2006 13:37 GMT
Hi All

I use a print driver based software package to convert my files to PDFs.
The code below prgramatically converts the doc to a pdf. It opens a save as
dialog which then requires me to enter a filename. It then saves the doc as
apdf under the filename that I entered.

Does anyone know if or how I can alter this code so that the value of a
specific variable is pre-entered as the filename?  Or better still not even
open the dialog, just save it directly to the correct location under the
correct file name.

Any pointers would be appreciated.

ActivePrinter = "PDF995"
   Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
       wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
       Collate:=True, Background:=False, PrintToFile:=False,
PrintZoomColumn:=0, _
        PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
   

'restore printer to default
'ActivePrinter = "Printer1"
Doug Robbins - Word MVP - 15 Aug 2006 17:55 GMT
There is usually an option in the .pdf conversion software to prompt for a
filename or not.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hi All
>
[quoted text clipped - 23 lines]
> 'restore printer to default
> 'ActivePrinter = "Printer1"
 
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.