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 VBA / July 2004

Tip: Looking for answers? Try searching our database.

problem e-mail item moving

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PeterQ - 30 Jul 2004 13:18 GMT
hello Team !

I am trying to move an e-mail item from one folder to another:

omItem and cpyItem are of type MailItem
X and Y are assumed Folder names

CODE:

omItem.FlagStatus = olFlagComplete
omItem.Save

'THIS LINE WORKS WELL:            
Set cpyItem = Application.ActiveInspector.CurrentItem
'THIS LINE GIVES ERROR, SAYING I CANNOT MOVE NON-SENT ITEMS
cpyItem.Move m_oMailbox.Folders.Item("X").Folders.Item("Y")

I am looking for a nice solution or work-around to solve this problem.

Please, is there anyone who can help me ?
Sue Mosher [MVP-Outlook] - 30 Jul 2004 13:53 GMT
I think the message means what it says. Why are you trying to move an unsent
MailItem?

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> hello Team !
>
[quoted text clipped - 16 lines]
>
> Please, is there anyone who can help me ?
Ken Slovak - [MVP - Outlook] - 30 Jul 2004 14:10 GMT
Move is a function that returns a new item, so set the return value to a new
item. Also, close the open item before you try to move it. Save the open
item so you have an EntryID, get that EntryID and use
NameSpace.GetItemFromID to retrieve it again and then do the move. See if
that works.

Signature

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

> hello Team !
>
[quoted text clipped - 16 lines]
>
> Please, is there anyone who can help me ?
 
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.