By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,646 Members | 2,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,646 IT Pros & Developers. It's quick & easy.

print word file to pdf from outlook macro

P: 88
hi all,

i currently have a macro in outlook to alter a word document, save as new file and attach. is there any way to, in this automated process, print the word output to pdf and attach the pdf instead?

-tomas
Dec 13 '07 #1
Share this Question
Share on Google+
1 Reply


Dököll
Expert 100+
P: 2,364
hi all,

i currently have a macro in outlook to alter a word document, save as new file and attach. is there any way to, in this automated process, print the word output to pdf and attach the pdf instead?

-tomas
Hello Hello, BlackMustard!

Here is a bit of code you can use to read a pdf file?

Perhaps you can tweak it to fit your neeeds:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Option Explicit 
  3.  
  4. Public Declare  Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ 
  5. (ByVal hwnd As Long, _ 
  6. ByVal lpOperation As String, _ 
  7. ByVal lpFile As String, _ 
  8. ByVal lpParameters As String, _ 
  9. ByVal lpDirectory As String, _ 
  10. ByVal nShowCmd As Long) As Long 
  11.  
  12. Sub Open_PDF() 
  13.     ShellExecute 0, "open", "C:\YOURFOLDER.YOURFILE.pdf", "", "", 1 
  14. End Sub 
  15.  
  16.  
  17.  
Will fetch a bit here, perhaps something has been posted...

In a bit!
Dec 16 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.