Outlook From Field Macro

Status
Not open for further replies.
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.
 
S

Sue Mosher [MVP]

For the message that's currently open:

Application.ActiveInspector.CurrentItem.SentOnBehalfOfName = "unique

name or address of mailbox"

Sue Mosher

"Karliki" <Karliki> wrote in message

news:B6F8FA73-DB50-4548-8A1C-E2CB432C2C3A@microsoft.com...
> 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.
>
 
K

Karliki

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.

"Sue Mosher [MVP]" wrote:


> For the message that's currently open:

> Application.ActiveInspector.CurrentItem.SentOnBehalfOfName = "unique
> name or address of mailbox"

> > Sue Mosher
> > >

> "Karliki" <Karliki> wrote in message
> news:B6F8FA73-DB50-4548-8A1C-E2CB432C2C3A@microsoft.com...
> > 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.
> >


>
 
S

Sue Mosher [MVP]

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

"Karliki" <Karliki> wrote in message

news:46596DC1-D63E-4FA3-BCDE-4E8D575A94A9@microsoft.com...
> 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.

> "Sue Mosher [MVP]" wrote:
>
> > For the message that's currently open:
>

>> Application.ActiveInspector.CurrentItem.SentOnBehalfOfName = "unique
> > name or address of mailbox"



>

>> "Karliki" <Karliki> wrote in message
> > news:B6F8FA73-DB50-4548-8A1C-E2CB432C2C3A@microsoft.com...
> > > 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.
 
K

Karliki

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.

"Sue Mosher [MVP]" wrote:


> 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
> > >

> "Karliki" <Karliki> wrote in message
> news:46596DC1-D63E-4FA3-BCDE-4E8D575A94A9@microsoft.com...
> > 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.
> > "Sue Mosher [MVP]" wrote:
> >
> >> For the message that's currently open:
> >
> >> Application.ActiveInspector.CurrentItem.SentOnBehalfOfName = "unique
> >> name or address of mailbox"

>
> >
> >> "Karliki" <Karliki> wrote in message
> >> news:B6F8FA73-DB50-4548-8A1C-E2CB432C2C3A@microsoft.com...
> >> > 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.


>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
L Outlook 2007 Macro to Contact From a Field Using Outlook 3
L Outlook 2007 Macro to Add Text to a Contact Field Using Outlook 10
L Outlook 2007 Macro to Email Field Using Outlook 31
I Outlook 2003 shows html code when To: field is empty Using Outlook 7
Terry Sullivan Sender's Name Doesn't Appear in the From Field on Outlook 365/IMAP Using Outlook 2
D Outlook Contacts Notes Field Photos to Smartphone Using Outlook 0
C Copy Outlook contact field value to another field Outlook VBA and Custom Forms 1
V Making a Date field mandatory in outlook form Outlook VBA and Custom Forms 2
B Outlook Business Contact Manager with SQL to Excel, User Defined Fields in BCM don't sync in SQL. Can I use VBA code to copy 1 field to another? BCM (Business Contact Manager) 0
C Import Outlook 2016 contacts into to: field Using Outlook 1
T Source of Outlook 2016 Address field dropdown "Other Suggestions" Using Outlook 3
Caio "From" field doesn't show extra email addresses in Outlook 2016. Using Outlook.com accounts in Outlook 6
George Simpson "Switch to HTML" in Outlook 2016 notes field Using Outlook 1
S Outlook User defined date field (UDF) not syncing Using Outlook 2
Diane Poremsky Create a custom field for Outlook messages Using Outlook 0
Diane Poremsky Create a Custom Numbering Field for Outlook messages Using Outlook 0
T Uploading Outlook 2016 Contacts to Exchange Server Drops "Company" field data in 30% of records Exchange Server Administration 4
Diane Poremsky Display the Created Date field of any Outlook item Using Outlook 0
K Passing a form field as a parameter from Outlook Using Outlook 12
J Can Click to Drag Custom Form Field But Cannot Drop When Designing in Outlook 2007 Outlook VBA and Custom Forms 2
M Update field codes when opening Outlook Template Outlook VBA and Custom Forms 2
J Outlook 2003-2010 PST Field Editor Using Outlook 1
JohnP From field in outlook 2007 Using Outlook 6
Tech Checkers Make Outlook add Contact Card Address in Location Field based on Appointment Subject Name. Using Outlook 2
L Outlook 2007 Copy Email Address in To Field Using Outlook 11
M moving custom field data between outlook and excel? Using Outlook 4
M Any way to edit the message field on a 2010 Outlook Form? Using Outlook 3
F Outlook 2010 - Need help with a custom field. Using Outlook 3
L Outlook 2007 Copy Text Field Using Outlook 8
L Outlook Contact Field Delete Using Outlook 7
O Outlook 2013 contacts - Where to find "Display as"-field Using Outlook 2
J outlook auto-completing the 'To field' with an unknown email address Using Outlook 1
J Outlook 2010 Forms Help Needed "A field in this form requires a value." Using Outlook 6
H How can you add a URL field in a Outlook Custom Contact form? Using Outlook 6
M OUTLOOK New Mail Field Availability Outlook VBA and Custom Forms 3
K Can't use links in Outlook custom form text field Outlook VBA and Custom Forms 1
O Outlook 2007: Phone List View - Field Names Outlook VBA and Custom Forms 1
O Outlook 2007: change field names Outlook VBA and Custom Forms 3
B Outlook 2007 form into access field format Outlook VBA and Custom Forms 9
S Make field searchable in custom form in outlook 2007 Outlook VBA and Custom Forms 1
D Office 365 Outlook desktop app prompts for all account passwords on startup Using Outlook 2
D Alerts in outlook Using Outlook 1
richardwing Auto forward email that is moves into a specific outlook folder Outlook VBA and Custom Forms 2
L Recommendations for Utility to Backup Outlook 365 Account Settings Using Outlook 0
J Recommendations for Outlook Duplicate Email Remover Using Outlook 6
O Outlook - How to embed font ? (If at all possible) Using Outlook 2
Z New minimum Outlook for Windows version requirements for Microsoft 365/Exchange Online Using Outlook.com accounts in Outlook 1
T How to configure Outlook for two users on a single Windows account Using Outlook 3
R Outlook 2021 Having problem setting up outlook 2021 with windows 11. I have 3 gmail accounts and I want the 3 gmail, emails to merge into the same outlook input. Using Outlook.com accounts in Outlook 0
e_a_g_l_e_p_i Outlook 2021 all appointments not showing in calendar Using Outlook 2

Similar threads

Top