![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Outlook 2002:
Attachments to a Mailitem object are not attached when the code runs at normal speed, but are attached if I place a Break on the Display line (last line in code snippet below) and press F8 to execute the Display statement in step mode. Although the MailItem is saved before attaching the attachments, I'm still getting this inconsistent result. It seems like a timing issue, but DoEvents doesn't help. Any clues please? Very many thanks. Regards Geoff Dim objMI as Outlook.MailItem Dim objATTACHMENTS as Outlook.Attachments Set objMI = mobjOL.CreateItem(olMailItem) .... some objMI properties set here, like "To"... objMI.Save Set objATTACHMENTS = objMI.Attachments objATTACHMENTS.Add "PathNameToFile", olByValue objMI.Display |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help - can't add "Item" (of type MailItem) using Attachments.Add() | [email protected] | Outlook and VBA | 1 | August 3rd 06 06:55 AM |
OL2003: Open Mailitem | René Panzeri | Outlook and VBA | 3 | July 9th 06 09:49 PM |
MailItem Folder Path | Fox via OfficeKB.com | Outlook and VBA | 1 | July 7th 06 03:39 PM |
Read body of MailItem ? | Trey Shaffer | Outlook and VBA | 1 | March 18th 06 08:56 PM |
How can I create a MailItem that displays like a received MailItem ? | Clive | Outlook - Using Forms | 0 | February 27th 06 05:14 PM |