Message Not Posting

  • Thread starter Thread starter Tye Davis
  • Start date Start date
I have set up a rule on my InBox to check for specific
words and move emails to my Work folder. Now I review
emials in my Work folder and drag and drop them into 1 of
4 folders based on a number 1-4. After clicking on the
folder, I need to perform the following on each of the
four folders:

Click on first email in the folder
Clt+A (to select all the emails in the folder)
Ctl+C (to copy)
Drag the selections to a folder name HH
Click #_Button (customized button set to send an email)
Ctl+v (to paste the contents in the body of the email)
Click Send

Steps without the comments:

Click folder
Click first email
Ctl+A
Ctl+C
Drag Selection to HH folder
Click #_Button
Ctl+V
Send

Can you help me with this code?
Thanks
..
 
Outlook code doesn't work that way. (Perhaps you're more accustomed to
working with recorded Word macros?) In Outlook, the pseudo code would be
something like:

Get starting folder (Application.ActiveExplorer.CurrentFolder)
Get first subfolder (MAPIFolder.Folders)
Get the first item in the subfolder (MapiFolder.Items)
Copy the item to the another folder (Copy, Move)
Keep information from the item for later use (Body, To, Subject, etc.)
Repeat for all other items in the folder
Create a message with the information kept for later use
(Application.CreateItem)
Send the message (MailItem.Send)
Repeat for the other subfolders

You will need to learn the Outlook objects that allow you to perform these
tasks. I've listed the ones that are most relevant, and you can get sample
code for virtually all of them in Outlook VBA Help.

Also, your Outlook version will affect your options for sending a message.

If you want to learn Outlook VBA, these web pages should help you get
started:

http://www.winnetmag.com/Articles/Index.cfm?ArticleID=21522&pg=1
http://www.outlookcode.com/d/vb.htm

Once you've tried a couple of things,
 
Thankks for responding! I will give it a try and post my
result if successful or should I say when successful.
Tye
 
Back
Top