Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / October 2007

Tip: Looking for answers? Try searching our database.

move mailitem in ItemSend

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shubhangi - 26 Oct 2007 15:00 GMT
hi!
I need to copy mailitem to other folder when it is sent.I used
Application_ItemSend event
used below code

'added Xheaders to the item
Item.save
Item.Move(ObjFolder) 'ObjFolder set to copy folder
Item gets moved to this folder But When I open that mailitem it doesn't show
me Xheader info
as well as I get "This message has not been sent" heading above the
message.It is shown as compose mail msg.Do I need to use then
SentItems_ItemAdd event to make a copy or is there
any other way  to do this in vb.net?
I'm using Outlook 2007 & VSTO addin
Thanks
Dmitry Streblechenko - 26 Oct 2007 19:09 GMT
Moving an item being sent would certainly confuse Outlook: Move() returns a
brand new item in the target folder, while Outlook will keep trying to send
the current item.
Secondly, when ItemSend event fires, the item hasn't been sent yet, so no
sender relatred props are available and it is still in teh unsent state.

Why not simply set the MailItem.SaveSentMessageFolder property to the folder
where the item is supposed to be saved after submission?

Item.SaveSentMessageFolder = ObjFolder

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

> hi!
> I need to copy mailitem to other folder when it is sent.I used
[quoted text clipped - 12 lines]
> I'm using Outlook 2007 & VSTO addin
> Thanks
sd - 29 Oct 2007 15:35 GMT
Thanks !! Item.SaveSentMessageFolder  worked

On Oct 26, 11:09 pm, "Dmitry Streblechenko" <dmi...@dimastr.com>
wrote:
> Moving an item being sent would certainly confuse Outlook: Move() returns a
> brand new item in the target folder, while Outlook will keep trying to send
[quoted text clipped - 29 lines]
>
> - Show quoted text -
sd - 29 Oct 2007 15:36 GMT
On Oct 26, 11:09 pm, "Dmitry Streblechenko" <dmi...@dimastr.com>
wrote:
> Moving an item being sent would certainly confuse Outlook: Move() returns a
> brand new item in the target folder, while Outlook will keep trying to send
[quoted text clipped - 29 lines]
>
> - Show quoted text -

Thanks It worked
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.