printing attachment name in Word

G

Guest

I'm using the export-to-Word solution to printing Outlook forms in version
2003. Is there a way to see the attachments listed in the Word template?
The text in the Message (or Body) field comes across fine but just shows a
gap where the attachments are - confusing for users who are used to seeing
everything on the printout.

Thanks.
 
S

Sue Mosher [MVP-Outlook]

You could write code to iterate the Attachments collection, put all the names in a list, then insert that information into your Word document at a bookmark you've set up for that purpose, just as you would the Body property, something like:

strAtts = ""
For Each att in Item.Attachments
strAtts = strAtts & att.DisplayName & vbCrLf
Next
objDoc.Bookmarks("Attachment_List").Range.InsertAfter strAtts

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Thanks very much Sue - works like a dream...

Sue Mosher said:
You could write code to iterate the Attachments collection, put all the names in a list, then insert that information into your Word document at a bookmark you've set up for that purpose, just as you would the Body property, something like:

strAtts = ""
For Each att in Item.Attachments
strAtts = strAtts & att.DisplayName & vbCrLf
Next
objDoc.Bookmarks("Attachment_List").Range.InsertAfter strAtts

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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