Outlook From Field Macro

  • Thread starter Thread starter Karliki
  • Start date Start date
K

Karliki

Hello,

I am trying to create a macro that will automatically populate the 'From'
field in an outlook email.

I send a lot of email to different departments and use oft. templates.
However, as I want the replies to go to the group inbox and not I personal
one I am finding that I have to manaually add the group email address into
every email I send.

I have a very limited knowledge of Macro's (especially using them with
Outlook) so any help would be greatly appreciated.
 
For the message that's currently open:

Application.ActiveInspector.CurrentItem.SentOnBehalfOfName = "unique
name or address of mailbox"
 
Thanks for the reply Sue,

When I try to run the Macro I am getting a 'Run-time '91' error: Object
variable or With block variable not set' any idea what this means?

I have the macro set out as

Sub Address()
Application.ActiveInspector.CurrentItem.From = "Email Address Here"
End Sub

Obviously I have the email address I want to go in the From Field in the
quotation marks.

Thanks for any continuing support.
 
Do you have an item open? If not, there's no ActiveInspector.

Why are you using From, a property that doesn't exist on MailItem objects,
rather than the SentOnBehalfOfName property?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
Sue,

Thanks for your help I managed this morning to get it working. The confusion
was due to my general ignorance in the field of Macro creation. Thanks again
for your help.
 
Back
Top