PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

How do create a macro to forward email to a specific address?

 
 
=?Utf-8?B?QXJsb1NtdXJm?=
Guest
Posts: n/a
 
      23rd Dec 2006
I use OfficeXP Outlook for email. I want to be able to use a macro or
shortcut to
select a message header, then enter a 2-3 key shortcut to forward the
message to
a specific address as an attachment and then delete the original message.
Tools => Macros just brings up the VB editor. I don't know how to use it,
or how
to begin interfacing with Outlook. Is there an easier way, such as a
keystroke
recorder?
--
ArloSmurf
 
Reply With Quote
 
 
 
 
John Blessing
Guest
Posts: n/a
 
      24th Dec 2006
"ArloSmurf" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I use OfficeXP Outlook for email. I want to be able to use a macro or
> shortcut to
> select a message header, then enter a 2-3 key shortcut to forward the
> message to
> a specific address as an attachment and then delete the original message.
> Tools => Macros just brings up the VB editor. I don't know how to use
> it,
> or how
> to begin interfacing with Outlook. Is there an easier way, such as a
> keystroke
> recorder?
> --
> ArloSmurf



No keystroke recorder in OL, so you would have to learn vbscript. But you
can get external windows programs that will do this (google for macro or
keystroke recorder). Unless you can achieve what you need using a rule in OL
--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook, find/replace,
send newsletters


 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      5th Jan 2007
For VBA basics, see http://www.outlookcode.com/d/vbabasics.htm Once you have your macro security set and can get a Hello World message working, you can try putting this code in a new code module:

Sub ForwardA()
Dim objMail As Outlook.MailItem
Set objItem = GetCurrentItem()
Set objMail = objItem.Forward
objMail.To = "(E-Mail Removed)"
objMail.Display
Set objItem = Nothing
Set objMail = Nothing
End Sub

Sub ForwardB()
Dim objMail As Outlook.MailItem
Set objItem = GetCurrentItem()
Set objMail = objItem.Forward
objMail.To = "(E-Mail Removed)"
objMail.Display
Set objItem = Nothing
Set objMail = Nothing
End Sub

Function GetCurrentItem() As Object
Dim objApp As Outlook.Application
Set objApp = Application
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = _
objApp.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = _
objApp.ActiveInspector.CurrentItem
Case Else
End Select
End Function

ForwardA and ForwardB are macros that each forward the current item to a different person.

For shortcuts, you'll need to add them to your toolbar (View | TOolbars | Customize); see http://www.slipstick.com/outlook/toolbar.htm#macro

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"ArloSmurf" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>I use OfficeXP Outlook for email. I want to be able to use a macro or
> shortcut to
> select a message header, then enter a 2-3 key shortcut to forward the
> message to
> a specific address as an attachment and then delete the original message.
> Tools => Macros just brings up the VB editor. I don't know how to use it,
> or how
> to begin interfacing with Outlook. Is there an easier way, such as a
> keystroke
> recorder?
> --
> ArloSmurf

 
Reply With Quote
 
=?Utf-8?B?QXJsb1NtdXJm?=
Guest
Posts: n/a
 
      7th Jan 2007
Thank you Sue,

I entered this into a new VB code module and saved it, then set it up on my
toolbar
as SPAM -- saves me a few steps each time I use it to report spam to comcast
and the
national spam center.

Sub SPAM()
Dim objMail As Outlook.MailItem
Set objItem = GetCurrentItem()
Set objMail = objItem.Forward
objMail.To = "(E-Mail Removed); http://www.pcreview.co.uk/forums/(E-Mail Removed)"
objMail.Display
Set objItem = Nothing
Set objMail = Nothing
End Sub

Function GetCurrentItem() As Object
Dim objApp As Outlook.Application
Set objApp = Application
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = _
objApp.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = _
objApp.ActiveInspector.CurrentItem
Case Else
End Select
End Function


Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

End Sub

--
ArloSmurf


"Sue Mosher [MVP-Outlook]" wrote:

> For VBA basics, see http://www.outlookcode.com/d/vbabasics.htm Once you have your macro security set and can get a Hello World message working, you can try putting this code in a new code module:
>
> Sub ForwardA()
> Dim objMail As Outlook.MailItem
> Set objItem = GetCurrentItem()
> Set objMail = objItem.Forward
> objMail.To = "(E-Mail Removed)"
> objMail.Display
> Set objItem = Nothing
> Set objMail = Nothing
> End Sub
>
> Sub ForwardB()
> Dim objMail As Outlook.MailItem
> Set objItem = GetCurrentItem()
> Set objMail = objItem.Forward
> objMail.To = "(E-Mail Removed)"
> objMail.Display
> Set objItem = Nothing
> Set objMail = Nothing
> End Sub
>
> Function GetCurrentItem() As Object
> Dim objApp As Outlook.Application
> Set objApp = Application
> On Error Resume Next
> Select Case TypeName(objApp.ActiveWindow)
> Case "Explorer"
> Set GetCurrentItem = _
> objApp.ActiveExplorer.Selection.Item(1)
> Case "Inspector"
> Set GetCurrentItem = _
> objApp.ActiveInspector.CurrentItem
> Case Else
> End Select
> End Function
>
> ForwardA and ForwardB are macros that each forward the current item to a different person.
>
> For shortcuts, you'll need to add them to your toolbar (View | TOolbars | Customize); see http://www.slipstick.com/outlook/toolbar.htm#macro
>
> --
> Sue Mosher, Outlook MVP
> Author of Configuring Microsoft Outlook 2003
> http://www.turtleflock.com/olconfig/index.htm
> and Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
> "ArloSmurf" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> >I use OfficeXP Outlook for email. I want to be able to use a macro or
> > shortcut to
> > select a message header, then enter a 2-3 key shortcut to forward the
> > message to
> > a specific address as an attachment and then delete the original message.
> > Tools => Macros just brings up the VB editor. I don't know how to use it,
> > or how
> > to begin interfacing with Outlook. Is there an easier way, such as a
> > keystroke
> > recorder?
> > --
> > ArloSmurf

>

 
Reply With Quote
 
=?Utf-8?B?QXJsb1NtdXJm?=
Guest
Posts: n/a
 
      7th Jan 2007
Thanks for thehelp John,

I want to use this to report spam -- since the "senders" change
addresses each week, a rule only works for a short time.

--
ArloSmurf


"John Blessing" wrote:

> "ArloSmurf" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I use OfficeXP Outlook for email. I want to be able to use a macro or
> > shortcut to
> > select a message header, then enter a 2-3 key shortcut to forward the
> > message to
> > a specific address as an attachment and then delete the original message.
> > Tools => Macros just brings up the VB editor. I don't know how to use
> > it,
> > or how
> > to begin interfacing with Outlook. Is there an easier way, such as a
> > keystroke
> > recorder?
> > --
> > ArloSmurf

>
>
> No keystroke recorder in OL, so you would have to learn vbscript. But you
> can get external windows programs that will do this (google for macro or
> keystroke recorder). Unless you can achieve what you need using a rule in OL
> --
> John Blessing
>
> http://www.LbeHelpdesk.com - Help Desk software priced to suit all
> businesses
> http://www.room-booking-software.com - Schedule rooms & equipment bookings
> for your meeting/class over the web.
> http://www.lbetoolbox.com - Remove Duplicates from MS Outlook, find/replace,
> send newsletters
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How to create a rule in which all email with a specific subject line causes message to have specific color Roady [MVP] Microsoft Outlook Discussion 0 13th Oct 2009 11:36 PM
Re: How to create a rule in which all email with a specific subject line causes message to have specific color Diane Poremsky [MVP] Microsoft Outlook Discussion 0 13th Oct 2009 09:46 PM
Re: How to create a rule in which all email with a specific subject line causes message to have specific color Roady [MVP] Microsoft Outlook Discussion 0 13th Oct 2009 09:43 PM
Receiving Email but cannot create new,reply or forward Email on nugget.man Microsoft Outlook Discussion 4 24th Aug 2009 03:30 PM
trying to forward email but dont want to forward spam how? =?Utf-8?B?TGludXM=?= Microsoft Outlook Discussion 1 7th Jun 2005 04:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:08 AM.