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

Help with printing out a .msg

P: n/a
I have a database where users are entering information into a form and
can attach word, mail, powerpoint, etc files. I have code to print word

and excel files, but am having difficulty with printing mail(.msg and
..oft). Below is one of the codes i have tried, but am getting an error:
"The remote server machine does not exist or is unavailable." on the
line that sets the EmDoc. Any help would be appreciated.

Private Sub PrintEmail(strPath As String)

On Error GoTo Err_Handler

Dim EmApp As Outlook.Application
Dim EmDoc As Outlook.MailItem

Set EmDoc = GetObject(strPath)


On Error Resume Next


Set EmDoc = Nothing


Set EmApp = Nothing

Exit Sub

MsgBox Err.Description, vbExclamation, "Error No: " & Err.Number
Resume Exit_Handler

End Sub

Apr 25 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.