simple move to personal folder

Status
Not open for further replies.
V

vbaNEWBIE

Hello....newbie here. Hopefully this is quick and easy for someone to help

me with. I have looked all over and found some of what I need but cannot put

it all together. The main issue for me is the code to specify the folder I

want to move the emails to. Most samples seem to be using some variation of

the default Inbox and are not specifying a particular path to the folder.

I am hoping to use the code to learn how to create others by having a

template or format which to base it on. If I can get one to work I can

probably make others work :)

I would like code to move emails from the default Inbox to a personal folder

in a PST file. If the PST name must be included in the path then the

destination path for the folder is:

P:\PST\TestDataFile\TestDataFileNAME\TestDataFileNAMEfolder

The PST file is P:\PST\TestDataFile.pst

and I believe to get to the actual folder (TestDataFileNAMEfolder) you use

this path:

\TestDataFileNAME\TestDataFileNAMEfolder

I would like to create code to move email from the email address

emailaddress@sample.com to the folder noted above. Eventually I would like it

to check for multiple emails and then move them to the correct corresponding

folders.

Also, is there a way to have the same sub to check for multiple different

email addresses and then move them to their corresponding folders ?

Thanks for any help or advice.

:)
 
S

Sue Mosher [MVP]

To get a non-default folder, you need to walk the folder hierarchy using the

Folders collections or use a function that does that for you. For examples,

see:

http://www.outlookcode.com/codedetail.aspx?id=628 - uses a folder path

string

http://www.outlookcode.com/codedetail.aspx?id=492 - searches for a folder by

name

The folder path is constructed of the names of the folders in the Folder

List navigation pane in Outlook, starting with the root folder for the data

store that holds the target folder. The .pst file name and path on the

computer drive are irrelevant (unless the .pst file is not already visible

in Outlook's Folder List).

Sue Mosher

"vbaNEWBIE" <vbaNEWBIE> wrote in message

news:48B57239-12A6-493D-A50B-AA5883361359@microsoft.com...
> Hello....newbie here. Hopefully this is quick and easy for someone to
> help
> me with. I have looked all over and found some of what I need but cannot
> put
> it all together. The main issue for me is the code to specify the folder
> I
> want to move the emails to. Most samples seem to be using some variation
> of
> the default Inbox and are not specifying a particular path to the folder.

> I am hoping to use the code to learn how to create others by having a
> template or format which to base it on. If I can get one to work I can
> probably make others work :)

> I would like code to move emails from the default Inbox to a personal
> folder
> in a PST file. If the PST name must be included in the path then the
> destination path for the folder is:
> P:\PST\TestDataFile\TestDataFileNAME\TestDataFileNAMEfolder

> The PST file is P:\PST\TestDataFile.pst
> and I believe to get to the actual folder (TestDataFileNAMEfolder) you use
> this path:
> \TestDataFileNAME\TestDataFileNAMEfolder

> I would like to create code to move email from the email address
> emailaddress@sample.com to the folder noted above. Eventually I would like
> it
> to check for multiple emails and then move them to the correct
> corresponding
> folders.

> Also, is there a way to have the same sub to check for multiple different
> email addresses and then move them to their corresponding folders ?

> Thanks for any help or advice.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
Rupert Dragwater Is there a genuine simple way to move Eudora address to Outlook 2010 Using Outlook 2
GregS Simple calendar sharing doesn't work Using Outlook 6
F Simple code to look for a specific line Outlook VBA and Custom Forms 2
K Ask about a simple script about save a incoming mail as file on local PC Outlook VBA and Custom Forms 3
P Simple contact and project manger like MissingLink for Outlook Using Outlook 1
L Simple Macro Using Outlook 1
B Is there a simple way to share email folders w/o exchange server? Using Outlook 0
C Need Help with Simple Code Correction Using Outlook 11
F I want simple syncing between my 3 PCs and Android devices. Using Outlook 1
H Too simple I would think but.. Using Outlook 1
D Help with simple macro - looping though all emails in my inbox Using Outlook 3
T Location and simple copying of emails and settings, OL 2010 and Win 7 64bit. Using Outlook 3
R Simple Sharing of Outlook Profile Using Outlook 1
R BCM with MS Office Accounting... Simple question BCM (Business Contact Manager) 0
P Simple Marketing Campaign Question BCM (Business Contact Manager) 1
B Simple way to insert file text - macro? Outlook VBA and Custom Forms 1
T Simple MAPI send and Outlook COM addin Outlook VBA and Custom Forms 3
J Quick steps delete original email and move reply/sent email to folder Using Outlook 1
N How to add or delete items to Move dropdown Menu Using Outlook 0
Commodore Unable to move message Using Outlook 3
N Line to move origEmail to subfolder within a reply macro Outlook VBA and Custom Forms 0
C Move or copy from field to field Outlook VBA and Custom Forms 0
T Outlook 365 Move newly created tasks automatically on save. Outlook VBA and Custom Forms 1
NVDon Create new Move To Folder list Outlook VBA and Custom Forms 0
P Print attachments automatically and move the mail to an existing folder called "Ted" Outlook VBA and Custom Forms 4
T Macro to move reply and original message to folder Outlook VBA and Custom Forms 6
F VBA to move email from Non Default folder to Sub folders as per details given in excel file Outlook VBA and Custom Forms 11
F Excel VBA to move mails for outlook 365 on secondary mail account Outlook VBA and Custom Forms 1
J Dopey move - deleted profile Using Outlook 1
GregS Outlook 2016 Move Outlook to new computer? Using Outlook 4
witzker Macro to move @domain.xx of a Spammail to Blacklist in Outlook 2019 Outlook VBA and Custom Forms 7
G Move tasks up/down todo list by VBA Outlook VBA and Custom Forms 1
S Macro to move “Re:” & “FWD:” email recieved the shared inbox to a subfolder in outlook Outlook VBA and Custom Forms 0
S Outlook Macro to move reply mail based on the key word in the subjectline Outlook VBA and Custom Forms 0
D Move Email with Attachment to Folder Outlook VBA and Custom Forms 3
Eike Move mails via macro triggered by the click of a button? Outlook VBA and Custom Forms 0
G Cannot Move Autocomplete File to New Computer Using Outlook 15
M Move to Folder Using Outlook 1
P Move emails between 2 mailboxes. Using Outlook 0
C Copy Move item won't work Outlook VBA and Custom Forms 2
N Macro to move all recipients to CC while replying Outlook VBA and Custom Forms 0
Commodore Move turns into "copy" Using Outlook 3
R List folders in a combo box + select folder + move emails from inbox to that folder + reply to that email Outlook VBA and Custom Forms 1
Jennifer Murphy Ctrl+Tab sometimes will not move through text a word at a time Using Outlook 1
V Outlook 2016 will not move emails in search results Using Outlook 4
M move to iCloud not working in outlook calendar Using Outlook 12
A Create date folder and move messages daily Outlook VBA and Custom Forms 1
Commodore Folders always closed in move/copy items dialog box Using Outlook 3
C Move Outlook 2007 to new PC with Outlook 365 Using Outlook 3
C Can't move folder, the folder is full Using Outlook 0

Similar threads

Top