webspeedway
asked on
Outlook 2007: Macro - Open Msg in Forward form, then over to a folder
I have looked and looked for a macro to open the current selected message in message view, and once I forward then move to a archived folder. In other words I'm looking for a Delegate Macro for messages that I'm delegating to someone else (not always the same person) and then wanting to archive for search purposes. Thoughts?
ASKER
Yeah that would work, would you juts prompt for a name out of address book? Because it will not always be the same person.. Also i will make another question so you can get points also, but what do you think about a file button also that marks the msg read and moves to the folder designated in the code??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
"... what do you think about a file button also that marks the msg read and moves to the folder designated in the code??"
That's simple. Send me a link to the question when you open it and I'll post a solution.
That's simple. Send me a link to the question when you open it and I'll post a solution.
ASKER
BlueDevilFan, I installed the code but the folder link is not setup the way I'm use to.. Can you give me some insight?
'Change the folder path on the following line'
Set olkFolder = OpenOutlookFolder("Inbox\2009")
olkMsg.Move olkFolder
Is the folder 2009 under the default inbox?
ASKER
Yes
Change line 17 from
Set olkFolder = OpenOutlookFolder("Persona l Folders\Archive")
to
Set olkFolder = Session.GetDefaultFolder(o lFolderInb ox).Folder s("2009")
You can also delete the OpenOutlookFolder and IsNothing functions.
Set olkFolder = OpenOutlookFolder("Persona
to
Set olkFolder = Session.GetDefaultFolder(o
You can also delete the OpenOutlookFolder and IsNothing functions.
ASKER
Perfect, works.. But i thought of a issue.. I usually write something in the e-mail that I'm delegating.. Any way to either show the fwd msg before it sends or add a line of text? Sorry..
Which do you prefer?
ASKER
Let's open FWD msg before it sends..
The other Question:
https://www.experts-exchange.com/questions/24046239/Outlook-2007-Macro-Mark-Unread-and-file-into-a-sub-folder-of-Inbox.html
The other Question:
https://www.experts-exchange.com/questions/24046239/Outlook-2007-Macro-Mark-Unread-and-file-into-a-sub-folder-of-Inbox.html
Change line 15 from
olkForward.Send
to
olkForward.Display
You'll have to click Send manually.
olkForward.Send
to
olkForward.Display
You'll have to click Send manually.
ASKER
BlueDevilFan, I'm getting a debug error now..
Run-Time Error '91'
Obeject variable or With block variable not set
It references the following:
Set olkMsg = Application.ActiveInspecto r.CurrentI tem
Run-Time Error '91'
Obeject variable or With block variable not set
It references the following:
Set olkMsg = Application.ActiveInspecto
You have to have an item open for that one to work. I can change that if you want.
ASKER
Yeah, i will be running from the main inbox voew with preview on.
Ok. Change this line
Set olkMsg = Application.ActiveInspecto r.CurrentI tem
to
Set olkMsg = Application.ActiveExplorer .Selection (1)
Set olkMsg = Application.ActiveInspecto
to
Set olkMsg = Application.ActiveExplorer
While it's possible to do this the way you described, there is a simpler approach. Instead of keying on forwarding a message, how about a macro that handles the forward and archive all at once? In other words, you have a "Delegate" button that when clicked forwards the message to the delegate and archives it?