Hi Ken,
Thanks for the help. It's working now, but I have another problem. After all
the messages are sent I close the .pst file. The problem is that for the last
messages the send/receive is still active when the close .pst command
executes. I tried with the "Doevents" after the Send/Receive, but it didn't
work. Is there a way of telling the macro to wait until the send/receive
finishes?
Thx!
"Ken Slovak - [MVP - Outlook]" wrote:
You can find the CommandBarControl that represents the Send/Receive menu
item and call its Execute method to perform a Send/Receive action.
Try the DeleteAfterSubmit Boolean, set it true on the mail item and no copy
will be saved after sending.
--
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
"mecg96" wrote in message
...
Hi!
I'm sending emails and saving the same item to a .pst. I am changing the
sent item destination using:
StoreID = objDestinationFolder.StoreID
FolderID = objDestinationFolder.EntryID
Set olNewMessage.SaveSentMessageFolder = objDestinationFolder
It is working fine, but when all the messages are sent the outbox still
shows all the emails there. It seems like it won't move the sent items to
the
.pst until I do a "send and receive" (F9). Is there a way to do this from
code? or how can I avoid saving it to the sent items at all?
Thanks!!