A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

List attachments



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 19th 06, 02:08 AM posted to microsoft.public.outlook.program_forms
MarkN
external usenet poster
 
Posts: 10
Default List attachments

Outlook 2003. Could anyone point me in the direction of some code that will
list the names of any attachments after the text of the email (either
automatically or when the user "runs" the code.
--
Any help greatfully appreciated,
MarkN
Ads
  #2  
Old May 19th 06, 06:14 AM posted to microsoft.public.outlook.program_forms
Hollis Paul [MVP - Outlook]
external usenet poster
 
Posts: 138
Default List attachments

In article ,
=?Utf-8?B?TWFya04=?= wrote:
Outlook 2003. Could anyone point me in the direction of some code that will
list the names of any attachments after the text of the email (either
automatically or when the user "runs" the code.
--
Any help greatfully appreciated,

Check to see if the Attachment Options at

http://www.slovaktech.com/attachmentoptions.htm

does what you want.

--
Hollis Paul
Mukilteo, WA USA


  #3  
Old May 19th 06, 03:04 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default List attachments

No, Attachment Options is just for setting the registry key for blocked
attachments, it has nothing to do with what attachments are in an email.

The OP doesn't mention where the code is going to run, which is important.
If say it's running as a VBA macro that's run from a button on a toolbar on
a selected item:

Sub AttachmentsList()
Dim oMail As Outlook.MailItem
Dim colAttach As Outlook.Attachments
Dim oAttach As Outlook.Attachment
dim strAttach As String

Set oMail = Application.ActiveExplorer.Selection.Item(1)
Set colAttach = oMail.Attachments
For Each oAttach In colAttachments
strAttach = strAttach & vbCRLF & oAttach.DisplayName
Next

oMail.Body = oMail.Body & strAttach
oMail.Save
End Sub

That would write, one per line, a list of all attachment display names at
the end of the message body into that message. The message would be the one
currently selected in the folder view. No error checking in that sample,
that's an exercise for the reader.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Hollis Paul [MVP - Outlook]" wrote in message
...
In article ,
=?Utf-8?B?TWFya04=?= wrote:
Outlook 2003. Could anyone point me in the direction of some code that
will
list the names of any attachments after the text of the email (either
automatically or when the user "runs" the code.
--
Any help greatfully appreciated,

Check to see if the Attachment Options at

http://www.slovaktech.com/attachmentoptions.htm

does what you want.

--
Hollis Paul
Mukilteo, WA USA



  #4  
Old May 19th 06, 07:26 PM posted to microsoft.public.outlook.program_forms
Hollis Paul [MVP - Outlook]
external usenet poster
 
Posts: 138
Default List attachments

In article , Ken Slovak - [MVP -
Outlook] wrote:
The OP doesn't mention where the code is going to run, which is important.
If say it's running as a VBA macro that's run from a button on a toolbar on
a selected item:

Thanks, Ken. I guess I have never looked at what that add-in does.

--
Hollis Paul
Mukilteo, WA USA


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
make a distribution list from a named category(in contact list) Davida Outlook - General Queries 8 April 16th 06 09:12 AM
How do I have E-mail "to" access list from contacts list? ronmv696 Outlook - Using Contacts 1 March 23rd 06 07:40 PM
Attachments Pete Outlook Express 2 March 10th 06 08:47 PM
Cannot see attachments [email protected] Outlook Express 6 January 27th 06 02:10 AM
Populating a drop down list from a contact list Richard Edwards Outlook - Using Forms 0 January 20th 06 11:10 AM


All times are GMT +1. The time now is 08:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.