[mso] Re: Repetitive Tasks....Mary Jean?...Greg?.....Macro people?

  • From: "Greg Chapman" <greg@xxxxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Sat, 25 May 2002 00:31:09 -0500

Okay, this is late, it is late at night and I have never coded Outlook
before. However, ignorance and being perceived as such has never seemed
to get in my way.<g>

That said, the following code (loose, no declared variables or data
type) will forward each selected piece of mail once you insert it in a
Macro:

'===================================================
Set MySelectedItems = ActiveExplorer.Selection
Set myOlApp = CreateObject("Outlook.Application")


For Each objSelectedItem In MySelectedItems
    Set myNameSpace = myOlApp.GetNamespace("MAPI")
    Set myForward = objSelectedItem.Forward
    myForward.Recipients.Add "greg@xxxxxxxxxxxxx"
    myForward.Send
Next objSelectedItem
'===================================================

However, there is a snag here: Lookout XP is finally aware of someone
sending mail via code and how bad that can be. So, when the code starts
to run, you'll be asked if you want to allow the actions and for how
many minutes the code should be allowed to transmit. Once you tell it
and click OK, it will prompt you for each piece of mail that is being
forwarded to see if you still want to send the item. The annoying part
of that is that you have to wait a second or two before Lookout will
enable the "Yes" button.

Use this code if you can tolerate that behavior. Otherwise, you'll need
to investigate whether self-signing the macro with a digital certificate
will allow you to get past this issue.

Hope that helps!

Greg Chapman
http://www.mousetrax.com 
"Counting in binary is as easy as 01, 10, 11!
With thinking this clear, is coding really a good idea?"


> -----Original Message-----
> From: mso-bounce@xxxxxxxxxxxxx 
> [mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf Of Linda Johnson
> Sent: Thursday, May 23, 2002 11:27 AM
> To: mso@xxxxxxxxxxxxx
> Subject: [mso] Re: Repetitive Tasks....Mary 
> Jean?...Greg?.....Macro people?
> 
> 
> 
> Hi Steve......I'm sure this would require a macro but since 
> Outlook doesn't allow you to record macros like the other 
> Office programs (why IS that anyway?), you would have to use 
> VBA, which I don't know at all....but if you can write a 
> macro for the different forwarding addresses, then you 
> definitely can assign a toolbar button to it in
> Tools>Customize
> 
> Linda
> Publisher ~ ABC ~ All 'Bout Computers
> Owner ~ Linda's Computer Stop 
> http://personal-computer-tutor.com/main.htm
> Author/Teacher ~ 
> MS Office EBooks/Classes 
> http://personal-computer-> tutor.com/services.htm
>  
> 
> 

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: