Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook - Using Forms (http://www.outlookbanter.com/outlook-using-forms/)
-   -   printing attachment name in Word (http://www.outlookbanter.com/outlook-using-forms/10746-printing-attachment-name-word.html)

Martin April 6th 06 11:14 AM

printing attachment name in Word
 
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.

Sue Mosher [MVP-Outlook] April 6th 06 11:38 PM

printing attachment name in Word
 
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.InsertAf ter strAtts

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Martin" wrote in message ...
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.


Martin April 7th 06 10:46 AM

printing attachment name in Word
 
Thanks very much Sue - works like a dream...

"Sue Mosher [MVP-Outlook]" wrote:

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.InsertAf ter strAtts

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Martin" wrote in message ...
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.




All times are GMT +1. The time now is 02:36 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com