VBA for Move Items dialog?

D

Doug B

Prior to my computer crash, I had two 'profiles' in Outlook 2007, whic
seemed logical, but was actually somewhat of a pain. Using one profil
for friend/general emails, and another for soccer/swim emails for th
kids' teams.

After the crash, I decided it's easier to combine them, and I was right
so much easier having it send/receive 6 email addresses in one profil
instead of splitting it up. So now, here's my dilemna.

Manually, I will move an email to the proper subfolder (such a
soccer/daughter, or swimming/volunteer) and then click Reply. This i
nice so that it keeps the reply in the same folder with the origina
message. If I reply first, the message goes to the 'sent' folder, the
I need to move messages from the sent folder as well as the sourc
folder.

Using the traditional method, I either right click and choose move, o
hit Ctrl-V. It opens up the Move Items dialog, which lets me choose
folder.

I wrote some VBA code that will 1) mark the item as read, b) move th
item to folder XXX, and c) reply to that item. This accomplishes m
goal about 50%.

I added an inputbox asking "push d for daughter, v for volunteer" an
then it lets me plug in the folder name. This got me about 75% towar
my goal. But those are hard coded.

What I really want is to be able to show that Move Items dialog so I ca
pick a folder dynamically, in case I want to choose a less-used folde
for my storage.

Any tips on opening that dialog box, or anything else that might make m
code easier, would be well appreciated.

Thanks,

Doug B
 
M

Michael Bednarek

[snip]
What I really want is to be able to show that Move Items dialog so I can
pick a folder dynamically, in case I want to choose a less-used folder
for my storage.

Any tips on opening that dialog box, or anything else that might make my
code easier, would be well appreciated.

Maybe the PickFolder method can help.

I vaguely remember a more complicated method where you locate the Move
command in the menu structure (Commandbars) and use the Execute method
on it.

Good luck.
 
M

marshal_hubs

Doug said:
Prior to my computer crash, I had two 'profiles' in Outlook 2007, whic
seemed logical, but was actually somewhat of a pain. Using one profil
for friend/general emails, and another for soccer/swim emails for th
kids' teams.

After the crash, I decided it's easier to combine them, and I was right
so much easier having it send/receive 6 email addresses in one profil
instead of splitting it up. So now, here's my dilemna.

Manually, I will move an email to the proper subfolder (such a
soccer/daughter, or swimming/volunteer) and then click Reply. This i
nice so that it keeps the reply in the same folder with the origina
message. If I reply first, the message goes to the 'sent' folder, the
I need to move messages from the sent folder as well as the sourc
folder.

Using the traditional method, I either right click and choose move, o
hit Ctrl-V. It opens up the Move Items dialog, which lets me choose
folder.

I wrote some VBA code that will 1) mark the item as read, b) move th
item to folder XXX, and c) reply to that item. This accomplishes m
goal about 50%.

I added an inputbox asking "push d for daughter, v for volunteer" an
then it lets me plug in the folder name. This got me about 75% towar
my goal. But those are hard coded.

What I really want is to be able to show that Move Items dialog so I ca
pick a folder dynamically, in case I want to choose a less-used folde
for my storage.

Any tips on opening that dialog box, or anything else that might make m
code easier, would be well appreciated.

Thanks,

Doug B.

Hi Doug,

Using Outlook VBA, you can try: Pickfolder method to get the folder/ope
the dialog box. In order to move ahead, i attached a small VBA cod
snippet:

Try this out and let me know, how it goes..

+-------------------------------------------------------------------
|Filename: Step.jpg
|Download: http://www.outlookbanter.com/attachment.php?attachmentid=25
+-------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top