PDF Default output help 
Author Message
 PDF Default output help

Hello Everyone,
I want to pdf a word document and send the out put to a
specified location on my drive only when i run a specific
macro.  
Here is some code i tried.
Application.PrintOut FileName:="c:\data\File.pdf",
Range:=wdPrintAllDocument, Item:= _
        wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
        ManualDuplexPrint:=False, Collate:=True,
Background:=True, PrintToFile:= _
        False, PrintZoomColumn:=0, PrintZoomRow:=0,
PrintZoomPaperWidth:=0, _
        PrintZoomPaperHeight:=0
if i leave FileName:="" then it works but it doesn't go to
a specified location.

But when ever i ran the code i encountered this error.
run-time error '5121'
The document name or path is not valid.  Try these
suggestions.
Check the file permissions for the document or drive.
Use the file open dialog box to located the document.
(c:\data\file.pdf)

i do have a folder called data on my c drive.

All suggestions and ideas are welcome.

Thanks for all the help.
Tony



Wed, 24 Aug 2005 00:58:48 GMT  
 PDF Default output help

spinning this yarn:

Quote:
>Hello Everyone,
>I want to pdf a word document and send the out put to a
>specified location on my drive only when i run a specific
>macro.  
>Here is some code i tried.
>Application.PrintOut FileName:="c:\data\File.pdf",
>Range:=wdPrintAllDocument, Item:= _
>        wdPrintDocumentContent, Copies:=1, Pages:="",
>PageType:=wdPrintAllPages, _
>        ManualDuplexPrint:=False, Collate:=True,
>Background:=True, PrintToFile:= _
>        False, PrintZoomColumn:=0, PrintZoomRow:=0,
>PrintZoomPaperWidth:=0, _
>        PrintZoomPaperHeight:=0
>if i leave FileName:="" then it works but it doesn't go to
>a specified location.

G'day Tony,

this isnt even near what you want. Make a reference to PDFMakerA.dot
from your project. Use the F2 Object Explorer to examine the API.

More help is available from both my Word VBA Spellbook and my Word VBA
Beginner's Spellbook.

Steve Hudson - Word Heretic, Sydney, Australia
I can do tricky stuff with Word or words for you.

Products: http://www.geocities.com/word_heretic/products.html
Spellbooks: 1558 pages of dump left and dropping...

The VBA Beginner's Spellbook is now available!
The first graphical representation of the Word object model
and an extensive checklist for functional template development.
Perfect for everyone at every level of VBA usage.



Sun, 18 Sep 2005 19:15:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. after pdf Export with Crystal - pdf File isn't able to use default Font

2. output to pdf

3. Having trouble programatically switching between fax and pdf report output

4. Outputting Reports in .pdf format

5. Output/Save as .pdf

6. Automate Report Output to PDF files

7. Saving report output to PDF File

8. Output to PDF

9. PDF output - Q for D Ashish / K Hardwick

10. Output to PDF format

11. Output to PDF

12. rtf and pdf output from xml

 

 
Powered by phpBB® Forum Software