![]() |
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
|
|||
|
|||
![]()
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!! |
Ads |
#2
|
|||
|
|||
![]()
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!! |
#3
|
|||
|
|||
![]()
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!! |
#4
|
|||
|
|||
![]()
There's no way to tell if the send/receive is finished usually.
You can use the SyncObjects collection and initiate a synch in your code and then handle the synch end event. That would work, usually most people have 1 defined send/receive group, but if there are more it can be very hard to tell which accounts are being sent with which groups. Look at http://www.outlookcode.com/threads.a...essageid=16184 for some sample code using syncobjects, it might help. -- 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 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! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
messages stuck in outbox | Kelly | Outlook Express | 2 | June 16th 06 12:04 AM |
Messages stuck in Outbox | Precious_Stone | Outlook Express | 6 | May 23rd 06 10:04 PM |
Messages stuck in Outbox | Taurean | Outlook Express | 4 | May 15th 06 08:56 PM |
Stuck in Outbox ? | McHenry | Outlook - General Queries | 1 | April 1st 06 05:48 AM |
messages stuck in outbox | Bruce Hagen | Outlook Express | 4 | March 14th 06 08:42 PM |