Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


VBScript move Outlook Mail/post item from one public folder to another public folder folder

Posted on 2004-11-30
Medium Priority
Last Modified: 2008-01-09
Hi All..

I need to move a post/mail item in a folder to another folder with VBScript on a customised form.  The form will have a button which will save/close the item and move it to a new lfolder..

Please can anyone assist?


Question by:Delboy

Accepted Solution

michaeldade earned 500 total points
ID: 12714450
If its strictly vbscript then this should do
    Set myOlApp = CreateObject("Outlook.Application")
    Set myNameSpace = myOlApp.GetNamespace("MAPI")
    'get a reference to the sent items folder
    Set mySentItems = myNameSpace.GetDefaultFolder(5)
    Item.Move mySentItems

Author Comment

ID: 12714491
It only worked!!!!  I am sure I did something similar, but it didn't work..

Many thanks

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question