![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I am using Outlook 2003. I have written vba for macros in other office apps
but not Outlook. We get a lot of emails with sales details. Many are forwarded to another email address outside the company once they have been checked. Because they have to be checked and decision made re forwarding or not, I cannot use the autoforward as part of a rule. I want a simple macro to forward a message I highlight in the inbox to a nominated email address, using the message's subject line as the subject line in the forwarding email (ie using the default subject). Is this possible from within Outlook ? thanks Roger |
Ads |
#2
|
|||
|
|||
![]()
Yes, Outlook has a VBA environment, accessed just like that in other
applications with Alt+F11 or Tools | Macros | VBA. These pages can help you get started: http://www.outlookcode.com/article.aspx?id=49 http://www.outlookcode.com/article.aspx?ID=40 The item selected in the current window is returned by Application.ActiveExplorer.Selection(1), so your macro would be something like this: Sub MyMacro() Dim msg As Outlook.MailItem Set itm = Application.ActiveExplorer.Selection(1) Set msg = itm.Forward msg.To = " msg.Send Set msg = Nothing Set itm = Nothing End Sub -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Roger" wrote in message ... I am using Outlook 2003. I have written vba for macros in other office apps but not Outlook. We get a lot of emails with sales details. Many are forwarded to another email address outside the company once they have been checked. Because they have to be checked and decision made re forwarding or not, I cannot use the autoforward as part of a rule. I want a simple macro to forward a message I highlight in the inbox to a nominated email address, using the message's subject line as the subject line in the forwarding email (ie using the default subject). Is this possible from within Outlook ? thanks Roger |
#3
|
|||
|
|||
![]()
Great, thanks
Roger "Sue Mosher [MVP]" wrote in message ... Yes, Outlook has a VBA environment, accessed just like that in other applications with Alt+F11 or Tools | Macros | VBA. These pages can help you get started: http://www.outlookcode.com/article.aspx?id=49 http://www.outlookcode.com/article.aspx?ID=40 The item selected in the current window is returned by Application.ActiveExplorer.Selection(1), so your macro would be something like this: Sub MyMacro() Dim msg As Outlook.MailItem Set itm = Application.ActiveExplorer.Selection(1) Set msg = itm.Forward msg.To = " msg.Send Set msg = Nothing Set itm = Nothing End Sub -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Roger" wrote in message ... I am using Outlook 2003. I have written vba for macros in other office apps but not Outlook. We get a lot of emails with sales details. Many are forwarded to another email address outside the company once they have been checked. Because they have to be checked and decision made re forwarding or not, I cannot use the autoforward as part of a rule. I want a simple macro to forward a message I highlight in the inbox to a nominated email address, using the message's subject line as the subject line in the forwarding email (ie using the default subject). Is this possible from within Outlook ? thanks Roger |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Set off VBA macro on email receipt then that macro accesses the emailcontent | [email protected] | Outlook and VBA | 3 | February 5th 09 12:14 AM |
OL 2003 crashes on macro (Alt-F8) or macro editor (Alt-F11) | mikewillnot | Outlook - General Queries | 0 | May 5th 08 03:42 PM |
Outlook macro abends but Word macro runs successfully | Jreue | Outlook and VBA | 0 | December 13th 06 11:55 PM |
Call macro stored in Excel workbook from Outlook's macro | Gvaram | Outlook and VBA | 5 | October 4th 06 06:26 AM |