Home All Groups Group Topic Archive Search About
Author
17 Sep 2007 7:27 PM
NewToVB
I have a macro that will send an email.  How do I make that macro run
whenever that particular reminder goes off (not for just any reminder.)  For
example:  When the SendEmail reminder goes off I want the SendMail macro to
run.  Any ideas???  Thanks!

Author
17 Sep 2007 8:01 PM
Ken Slovak - [MVP - Outlook]
When the Application.Reminder event fires examine the Item passed to you to
see if it's an item where you want to send an email. If it is then call your
macro.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


Show quote
"NewToVB" <NewT***@discussions.microsoft.com> wrote in message
news:C9E2ACBD-8250-48AE-90D8-761504E49909@microsoft.com...
>I have a macro that will send an email.  How do I make that macro run
> whenever that particular reminder goes off (not for just any reminder.)
> For
> example:  When the SendEmail reminder goes off I want the SendMail macro
> to
> run.  Any ideas???  Thanks!
Author
17 Sep 2007 8:08 PM
NewToVB
I'm sorry, but I'm really not sure how to do that.  Any other help will be
greatly appreciated, thanks!

Show quote
"Ken Slovak - [MVP - Outlook]" wrote:

> When the Application.Reminder event fires examine the Item passed to you to
> see if it's an item where you want to send an email. If it is then call your
> macro.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "NewToVB" <NewT***@discussions.microsoft.com> wrote in message
> news:C9E2ACBD-8250-48AE-90D8-761504E49909@microsoft.com...
> >I have a macro that will send an email.  How do I make that macro run
> > whenever that particular reminder goes off (not for just any reminder.)
> > For
> > example:  When the SendEmail reminder goes off I want the SendMail macro
> > to
> > run.  Any ideas???  Thanks!
>
>
Author
18 Sep 2007 1:22 PM
Ken Slovak - [MVP - Outlook]
In the Outlook VBA project expand Microsoft Office Outlook Objects and
select the ThisOutlookSession class and select Application in the drop-down
at the top left of the code window. In the right-side dropdown select
Reminder. That event handler is automatically added to the
ThisOutlookSession class. In that code test whatever you want on the Item
object passed to you (subject, body contents, etc.) and decide if that's a
reminder that you want to send your email for. If it is call your macro
code.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


Show quote
"NewToVB" <NewT***@discussions.microsoft.com> wrote in message
news:4D93846A-B928-4C60-85E5-871FA682C8DF@microsoft.com...
> I'm sorry, but I'm really not sure how to do that.  Any other help will be
> greatly appreciated, thanks!
>
> "Ken Slovak - [MVP - Outlook]" wrote:
>
>> When the Application.Reminder event fires examine the Item passed to you
>> to
>> see if it's an item where you want to send an email. If it is then call
>> your
>> macro.
>>
>> --
>> Ken Slovak
>> [MVP - Outlook]
>> http://www.slovaktech.com
>> Author: Professional Programming Outlook 2007
>> Reminder Manager, Extended Reminders, Attachment Options
>> http://www.slovaktech.com/products.htm
>>
>>
>> "NewToVB" <NewT***@discussions.microsoft.com> wrote in message
>> news:C9E2ACBD-8250-48AE-90D8-761504E49909@microsoft.com...
>> >I have a macro that will send an email.  How do I make that macro run
>> > whenever that particular reminder goes off (not for just any reminder.)
>> > For
>> > example:  When the SendEmail reminder goes off I want the SendMail
>> > macro
>> > to
>> > run.  Any ideas???  Thanks!
>>
>>
Author
18 Sep 2007 5:30 PM
NewToVB
could I check the subject of the appointment and trigger it to read the macro
by doing this:

Select Case Item.Class
Case olAppointment.Subject = "Send Email"

       Set myAttachments = objMsg.Attachments
       myAttachments.Add "C:\Test\Test.xls"

End Select
objMsg.Send


Show quote
"Ken Slovak - [MVP - Outlook]" wrote:

> In the Outlook VBA project expand Microsoft Office Outlook Objects and
> select the ThisOutlookSession class and select Application in the drop-down
> at the top left of the code window. In the right-side dropdown select
> Reminder. That event handler is automatically added to the
> ThisOutlookSession class. In that code test whatever you want on the Item
> object passed to you (subject, body contents, etc.) and decide if that's a
> reminder that you want to send your email for. If it is call your macro
> code.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "NewToVB" <NewT***@discussions.microsoft.com> wrote in message
> news:4D93846A-B928-4C60-85E5-871FA682C8DF@microsoft.com...
> > I'm sorry, but I'm really not sure how to do that.  Any other help will be
> > greatly appreciated, thanks!
> >
> > "Ken Slovak - [MVP - Outlook]" wrote:
> >
> >> When the Application.Reminder event fires examine the Item passed to you
> >> to
> >> see if it's an item where you want to send an email. If it is then call
> >> your
> >> macro.
> >>
> >> --
> >> Ken Slovak
> >> [MVP - Outlook]
> >> http://www.slovaktech.com
> >> Author: Professional Programming Outlook 2007
> >> Reminder Manager, Extended Reminders, Attachment Options
> >> http://www.slovaktech.com/products.htm
> >>
> >>
> >> "NewToVB" <NewT***@discussions.microsoft.com> wrote in message
> >> news:C9E2ACBD-8250-48AE-90D8-761504E49909@microsoft.com...
> >> >I have a macro that will send an email.  How do I make that macro run
> >> > whenever that particular reminder goes off (not for just any reminder.)
> >> > For
> >> > example:  When the SendEmail reminder goes off I want the SendMail
> >> > macro
> >> > to
> >> > run.  Any ideas???  Thanks!
> >>
> >>
>
>
Author
18 Sep 2007 5:37 PM
Ken Slovak - [MVP - Outlook]
If you're testing the Class of the item you must have your tests use that
property and the enum values for it, not Subject:

Select Case Item.Class
Case olAppointment
    If Item.Subject = "Send Email"
      ' do whatever
    End If
End Select

Your references to objMsg there are meaningless unless there's more code
that you're not showing that creates objMsg and sets the other properties
like subject.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


Show quote
"NewToVB" <NewT***@discussions.microsoft.com> wrote in message
news:A4F54FD0-F61B-4DB0-8ECA-FC3D6D539212@microsoft.com...
> could I check the subject of the appointment and trigger it to read the
> macro
> by doing this:
>
> Select Case Item.Class
> Case olAppointment.Subject = "Send Email"
>
>       Set myAttachments = objMsg.Attachments
>       myAttachments.Add "C:\Test\Test.xls"
>
> End Select
> objMsg.Send
Author
18 Sep 2007 6:14 PM
NewToVB
Ok, one last thing... how would I add my signature that I've already created
to this email.

Show quote
"Ken Slovak - [MVP - Outlook]" wrote:

> If you're testing the Class of the item you must have your tests use that
> property and the enum values for it, not Subject:
>
> Select Case Item.Class
> Case olAppointment
>     If Item.Subject = "Send Email"
>       ' do whatever
>     End If
>  End Select
>
> Your references to objMsg there are meaningless unless there's more code
> that you're not showing that creates objMsg and sets the other properties
> like subject.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "NewToVB" <NewT***@discussions.microsoft.com> wrote in message
> news:A4F54FD0-F61B-4DB0-8ECA-FC3D6D539212@microsoft.com...
> > could I check the subject of the appointment and trigger it to read the
> > macro
> > by doing this:
> >
> > Select Case Item.Class
> > Case olAppointment.Subject = "Send Email"
> >
> >       Set myAttachments = objMsg.Attachments
> >       myAttachments.Add "C:\Test\Test.xls"
> >
> > End Select
> > objMsg.Send
>
>
Author
18 Sep 2007 6:36 PM
Ken Slovak - [MVP - Outlook]
There's no object model for adding a signature. If you don't have it when
the email is created you will have to simulate it by adding whatever of it
that you can into the Body or HTMLBody property of the item.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


Show quote
"NewToVB" <NewT***@discussions.microsoft.com> wrote in message
news:54AD67AA-E799-40B0-B0A9-495AF1B2FCFC@microsoft.com...
> Ok, one last thing... how would I add my signature that I've already
> created
> to this email.
Author
18 Sep 2007 7:02 PM
NewToVB
When I open up a new message in outlook it has my signature on it, so I'm not
sure why its not showing up when I run the macro.  Also, whenever I close
Outlook and re-open it, its not running the macro.  But I didn't see anything
in the Macro Security to correct this problem.

Show quote
"Ken Slovak - [MVP - Outlook]" wrote:

> There's no object model for adding a signature. If you don't have it when
> the email is created you will have to simulate it by adding whatever of it
> that you can into the Body or HTMLBody property of the item.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "NewToVB" <NewT***@discussions.microsoft.com> wrote in message
> news:54AD67AA-E799-40B0-B0A9-495AF1B2FCFC@microsoft.com...
> > Ok, one last thing... how would I add my signature that I've already
> > created
> > to this email.
>
>
Author
18 Sep 2007 7:16 PM
Ken Slovak - [MVP - Outlook]
Do you have macro security set to medium or high? For high you need to sign
your code, for medium you would get prompted each time Outlook starts up.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


Show quote
"NewToVB" <NewT***@discussions.microsoft.com> wrote in message
news:25AF085C-8ECA-49B2-8AEE-047E125173D0@microsoft.com...
> When I open up a new message in outlook it has my signature on it, so I'm
> not
> sure why its not showing up when I run the macro.  Also, whenever I close
> Outlook and re-open it, its not running the macro.  But I didn't see
> anything
> in the Macro Security to correct this problem.
Author
18 Sep 2007 7:32 PM
NewToVB
well i'm actually running Outlook 2007 and when I go to macro securty there
are only 4 options, i've selected the option that says warnings for all
macros.  I've selected the others but that doesn't work either.

Show quote
"Ken Slovak - [MVP - Outlook]" wrote:

> Do you have macro security set to medium or high? For high you need to sign
> your code, for medium you would get prompted each time Outlook starts up.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "NewToVB" <NewT***@discussions.microsoft.com> wrote in message
> news:25AF085C-8ECA-49B2-8AEE-047E125173D0@microsoft.com...
> > When I open up a new message in outlook it has my signature on it, so I'm
> > not
> > sure why its not showing up when I run the macro.  Also, whenever I close
> > Outlook and re-open it, its not running the macro.  But I didn't see
> > anything
> > in the Macro Security to correct this problem.
>
>
Author
18 Sep 2007 8:02 PM
NewToVB
Thanks for all your help!  I think I've figured out the problem.  Now I just
need to figure out why my signature isn't showing up.  Thanks!!

Show quote
"NewToVB" wrote:

> well i'm actually running Outlook 2007 and when I go to macro securty there
> are only 4 options, i've selected the option that says warnings for all
> macros.  I've selected the others but that doesn't work either.
>
> "Ken Slovak - [MVP - Outlook]" wrote:
>
> > Do you have macro security set to medium or high? For high you need to sign
> > your code, for medium you would get prompted each time Outlook starts up.
> >
> > --
> > Ken Slovak
> > [MVP - Outlook]
> > http://www.slovaktech.com
> > Author: Professional Programming Outlook 2007
> > Reminder Manager, Extended Reminders, Attachment Options
> > http://www.slovaktech.com/products.htm
> >
> >
> > "NewToVB" <NewT***@discussions.microsoft.com> wrote in message
> > news:25AF085C-8ECA-49B2-8AEE-047E125173D0@microsoft.com...
> > > When I open up a new message in outlook it has my signature on it, so I'm
> > > not
> > > sure why its not showing up when I run the macro.  Also, whenever I close
> > > Outlook and re-open it, its not running the macro.  But I didn't see
> > > anything
> > > in the Macro Security to correct this problem.
> >
> >
Author
18 Sep 2007 3:24 PM
NewToVB
Oh ok, so I can do this from a scheduled task or an appointment?

Thank you so much, this has been a big help!


Show quote
"NewToVB" wrote:

> I have a macro that will send an email.  How do I make that macro run
> whenever that particular reminder goes off (not for just any reminder.)  For
> example:  When the SendEmail reminder goes off I want the SendMail macro to
> run.  Any ideas???  Thanks!

AddThis Social Bookmark Button