Printing Outlook Emails with List of Attachments by Copy Macro

B

Bert

The following code is supposed to make a copy of the current email,
convert it from HTML to plain text, print it out, and then delete the
copy.

The reason for this is that Outlook will not print the list of
attachments of an HTML email but will do so for a plain text email. I
want to be able to have a button the end-user can click that converts
a copy of the email, prints it, and then discards the converted copy
without saving.

It works fine excapt that it doesn't discard the copy-- each time the
macro runs, another copy of the email is created in the inbox.

Can anyone tell me how to get the copy to go away?

Thanks,
-Bert

Code follows...


Sub FormatPlainTextMail()

Dim colCB As CommandBars
Dim objCBB As CommandBarButton
Dim obj As Object

Set obj = Application.ActiveExplorer.Selection(1).Copy
obj.Display

Set colCB = ActiveInspector.CommandBars
Set objCBB = colCB.FindControl(, 5604)
If Not objCBB Is Nothing Then
objCBB.Execute
End If
Set objCBB = colCB.FindControl(, 5563)
If Not objCBB Is Nothing Then
objCBB.Execute
End If


obj.PrintOut
'obj.Close 1
obj.Delete

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top