rvolk
asked on
Convert .doc to .pdf... I need the code please!!!
Hello all,
I have this MS Word file that I need to save in .pdf format automatically using VBA. I can save it manually and it works fine, but I need to write the code for it, so the user doesn't get any dialog boxes prompting for the file name and location. I would like a full code that can make that work.
Thanks
I have this MS Word file that I need to save in .pdf format automatically using VBA. I can save it manually and it works fine, but I need to write the code for it, so the user doesn't get any dialog boxes prompting for the file name and location. I would like a full code that can make that work.
Thanks
ASKER
Thanks for your comments. If I use this code, I get a dialog box prompting me for the .pdf file name. I need to supply that name through code. How do I do that?
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hello rvolk
this question is open for more then 2 months
time to clean up
if not stated otherwise
my recom will be
-PAQ
-points to bruintje
-this will be finalized by an EE Moderator
-with no further update (19.10.2002)
PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER
HAGD:O)Bruintje
posted by ToolzEE v1.0
this question is open for more then 2 months
time to clean up
if not stated otherwise
my recom will be
-PAQ
-points to bruintje
-this will be finalized by an EE Moderator
-with no further update (19.10.2002)
PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER
HAGD:O)Bruintje
posted by ToolzEE v1.0
Comment from expert accepted as answer
Computer101
E-E Admin
Computer101
E-E Admin
Set your default printer to "Acrobat Distiller" and create a macro.
Sub PrintMyFile()
Dim MyFile as String
MyFile = "c:\MyDir\MyDoc.doc"
Documents.Open MyFile
Documents(MyFile).PrintOut
Documents.Close
End Sub
or if you don't want to set your default printer then you got to add a line to set the printer for the active document
HAGD:O)Bruintje