Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Opening an attachment of a message that has a message as attachmen

Lets suppose I have 2 messages in the input folder in Outlook 2000.
Each message as 2 attachments.
The first attachment of the first message is a message with 2 attachments.
Each attachment has 1 pdf document.
Like this:

Outlook 2000
---Infolder
------Message1 (has 2 attachments)
---------Attachment1 (is a message)
------------This message has an attachment: Document1.pdf.
---------Attachment2 (is a message)
------------This message has an attachment: Document2.pdf.
------Message2 (has 2 attachments)
---------Attachment n (is a message)
---------Attachment n+1 (is a message)

How can I open Document1.pdf using VBA?

So far, I have done this:

Set myOlApp = CreateObject("Outlook.Application")
Set b = myOlApp.Session.Folders("InFolder")
For x = 1 To b.Items(1).Attachments.Count
---at this point I can display the first message:
---b.items(1).display
---it is possible to save that message:
---b.items(1).attachments(x).saveasfile(c:\temp\ms g1.msg)
---but what I really want to do is to open the attachment of this message
i.e. Document1.pdf.
---How?
Next

Thanks
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
send page as attachment and error message Kim K Excel Discussion (Misc queries) 15 January 19th 08 12:23 PM
Message box upon opening file flipperdoodle Excel Discussion (Misc queries) 7 April 7th 07 11:44 PM
email excel spreadsheet as body of message, not as attachment Email Spreadsheet as Body of Email Msg. Excel Discussion (Misc queries) 5 June 12th 06 03:23 PM
error message in opening David Excel Discussion (Misc queries) 1 January 13th 05 09:14 PM
E-mail as message body not attachment Larry Empey Excel Programming 1 September 2nd 03 04:00 AM


All times are GMT +1. The time now is 08:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"