Email Help: Sending Outlook email from Excel VBA

Hi All,

How do I select a specific property in outlook while sending email from excel?

There is an option we can set in outlook outgoing emails call "Voting buttons"
in that feature there is a custom option that we can select called "Have 
replies sent to" its a checkbox. I want it checked when i send an email from 
excel.

Hope i made it clear.

Thanks in advance
0
Utf
1/11/2010 4:24:01 PM
outlook.program_vba 490 articles. 0 followers. Follow

6 Replies
2042 Views

Similar Articles

[PageSpeed] 52

If sending through the Outlook Object Model, use the MailItem.VotingOptions 
property and MailItem.ReplyRecipients collection.

-- 
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
"sam" <sam@discussions.microsoft.com> wrote in message 
news:C8186BBC-9EA2-41F0-94CF-2135FC5E9FC2@microsoft.com...
> Hi All,
>
> How do I select a specific property in outlook while sending email from 
> excel?
>
> There is an option we can set in outlook outgoing emails call "Voting 
> buttons"
> in that feature there is a custom option that we can select called "Have
> replies sent to" its a checkbox. I want it checked when i send an email 
> from
> excel.
>
> Hope i made it clear.
>
> Thanks in advance 


0
Dmitry
1/11/2010 5:26:12 PM
Hey Dmitry,

Thanks for the help.

I am sending the emails through Excel. Is there a way to do it from excel?

Thanks in advance

"Dmitry Streblechenko" wrote:

> If sending through the Outlook Object Model, use the MailItem.VotingOptions 
> property and MailItem.ReplyRecipients collection.
> 
> -- 
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy  - Outlook, CDO
> and MAPI Developer Tool
> -
> "sam" <sam@discussions.microsoft.com> wrote in message 
> news:C8186BBC-9EA2-41F0-94CF-2135FC5E9FC2@microsoft.com...
> > Hi All,
> >
> > How do I select a specific property in outlook while sending email from 
> > excel?
> >
> > There is an option we can set in outlook outgoing emails call "Voting 
> > buttons"
> > in that feature there is a custom option that we can select called "Have
> > replies sent to" its a checkbox. I want it checked when i send an email 
> > from
> > excel.
> >
> > Hope i made it clear.
> >
> > Thanks in advance 
> 
> 
> .
> 
0
Utf
1/11/2010 8:06:02 PM
I don't know Excel Object Model, does it have a function to send e-mails?
Why not use the Outlook Object Model?

-- 
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
"sam" <sam@discussions.microsoft.com> wrote in message 
news:8E22B6FF-A314-4E8D-A4D6-F04BA4DC805C@microsoft.com...
> Hey Dmitry,
>
> Thanks for the help.
>
> I am sending the emails through Excel. Is there a way to do it from excel?
>
> Thanks in advance
>
> "Dmitry Streblechenko" wrote:
>
>> If sending through the Outlook Object Model, use the 
>> MailItem.VotingOptions
>> property and MailItem.ReplyRecipients collection.
>>
>> -- 
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy  - Outlook, CDO
>> and MAPI Developer Tool
>> -
>> "sam" <sam@discussions.microsoft.com> wrote in message
>> news:C8186BBC-9EA2-41F0-94CF-2135FC5E9FC2@microsoft.com...
>> > Hi All,
>> >
>> > How do I select a specific property in outlook while sending email from
>> > excel?
>> >
>> > There is an option we can set in outlook outgoing emails call "Voting
>> > buttons"
>> > in that feature there is a custom option that we can select called 
>> > "Have
>> > replies sent to" its a checkbox. I want it checked when i send an email
>> > from
>> > excel.
>> >
>> > Hope i made it clear.
>> >
>> > Thanks in advance
>>
>>
>> .
>> 


0
Dmitry
1/11/2010 8:16:39 PM
I generate reports in excel using VBA and macros and have created a button 
which email the reports to respective managers once the report is ready. 
Thats the reason I want it in excel.

There is no inbuilt function in excel that sends email through outlook, You 
have to manually code in VBA to make it happen. I have already coded it such 
that It sends the email to the respective managers with the voting buttons 
option enabled, But I am struggeling with selecting this specific custom 
option in voting button that I want checked when the email is sent.

I think, we can code the same way as we would code in outlook to make this 
to work. But I dont know how to get this specific thing to work.

Could you please show me how it is done in outlook, So I can try and do it 
in excel.

Thanks in advance

"Dmitry Streblechenko" wrote:

> I don't know Excel Object Model, does it have a function to send e-mails?
> Why not use the Outlook Object Model?
> 
> -- 
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy  - Outlook, CDO
> and MAPI Developer Tool
> -
> "sam" <sam@discussions.microsoft.com> wrote in message 
> news:8E22B6FF-A314-4E8D-A4D6-F04BA4DC805C@microsoft.com...
> > Hey Dmitry,
> >
> > Thanks for the help.
> >
> > I am sending the emails through Excel. Is there a way to do it from excel?
> >
> > Thanks in advance
> >
> > "Dmitry Streblechenko" wrote:
> >
> >> If sending through the Outlook Object Model, use the 
> >> MailItem.VotingOptions
> >> property and MailItem.ReplyRecipients collection.
> >>
> >> -- 
> >> Dmitry Streblechenko (MVP)
> >> http://www.dimastr.com/
> >> OutlookSpy  - Outlook, CDO
> >> and MAPI Developer Tool
> >> -
> >> "sam" <sam@discussions.microsoft.com> wrote in message
> >> news:C8186BBC-9EA2-41F0-94CF-2135FC5E9FC2@microsoft.com...
> >> > Hi All,
> >> >
> >> > How do I select a specific property in outlook while sending email from
> >> > excel?
> >> >
> >> > There is an option we can set in outlook outgoing emails call "Voting
> >> > buttons"
> >> > in that feature there is a custom option that we can select called 
> >> > "Have
> >> > replies sent to" its a checkbox. I want it checked when i send an email
> >> > from
> >> > excel.
> >> >
> >> > Hope i made it clear.
> >> >
> >> > Thanks in advance
> >>
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
1/11/2010 9:14:02 PM
So what is your VBA code tha tyou are having problems with?

-- 
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool
-
"sam" <sam@discussions.microsoft.com> wrote in message 
news:E77FBE92-5973-4D23-AB1F-5DDB7AD2E45D@microsoft.com...
>I generate reports in excel using VBA and macros and have created a button
> which email the reports to respective managers once the report is ready.
> Thats the reason I want it in excel.
>
> There is no inbuilt function in excel that sends email through outlook, 
> You
> have to manually code in VBA to make it happen. I have already coded it 
> such
> that It sends the email to the respective managers with the voting buttons
> option enabled, But I am struggeling with selecting this specific custom
> option in voting button that I want checked when the email is sent.
>
> I think, we can code the same way as we would code in outlook to make this
> to work. But I dont know how to get this specific thing to work.
>
> Could you please show me how it is done in outlook, So I can try and do it
> in excel.
>
> Thanks in advance
>
> "Dmitry Streblechenko" wrote:
>
>> I don't know Excel Object Model, does it have a function to send e-mails?
>> Why not use the Outlook Object Model?
>>
>> -- 
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy  - Outlook, CDO
>> and MAPI Developer Tool
>> -
>> "sam" <sam@discussions.microsoft.com> wrote in message
>> news:8E22B6FF-A314-4E8D-A4D6-F04BA4DC805C@microsoft.com...
>> > Hey Dmitry,
>> >
>> > Thanks for the help.
>> >
>> > I am sending the emails through Excel. Is there a way to do it from 
>> > excel?
>> >
>> > Thanks in advance
>> >
>> > "Dmitry Streblechenko" wrote:
>> >
>> >> If sending through the Outlook Object Model, use the
>> >> MailItem.VotingOptions
>> >> property and MailItem.ReplyRecipients collection.
>> >>
>> >> -- 
>> >> Dmitry Streblechenko (MVP)
>> >> http://www.dimastr.com/
>> >> OutlookSpy  - Outlook, CDO
>> >> and MAPI Developer Tool
>> >> -
>> >> "sam" <sam@discussions.microsoft.com> wrote in message
>> >> news:C8186BBC-9EA2-41F0-94CF-2135FC5E9FC2@microsoft.com...
>> >> > Hi All,
>> >> >
>> >> > How do I select a specific property in outlook while sending email 
>> >> > from
>> >> > excel?
>> >> >
>> >> > There is an option we can set in outlook outgoing emails call 
>> >> > "Voting
>> >> > buttons"
>> >> > in that feature there is a custom option that we can select called
>> >> > "Have
>> >> > replies sent to" its a checkbox. I want it checked when i send an 
>> >> > email
>> >> > from
>> >> > excel.
>> >> >
>> >> > Hope i made it clear.
>> >> >
>> >> > Thanks in advance
>> >>
>> >>
>> >> .
>> >>
>>
>>
>> .
>> 


0
Dmitry
1/11/2010 10:51:55 PM
I got it to work, 
I just had to add this like to the code: ReplyRecipients.Add ("abc@def.com")

Thanks for you time

"Dmitry Streblechenko" wrote:

> So what is your VBA code tha tyou are having problems with?
> 
> -- 
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy  - Outlook, CDO
> and MAPI Developer Tool
> -
> "sam" <sam@discussions.microsoft.com> wrote in message 
> news:E77FBE92-5973-4D23-AB1F-5DDB7AD2E45D@microsoft.com...
> >I generate reports in excel using VBA and macros and have created a button
> > which email the reports to respective managers once the report is ready.
> > Thats the reason I want it in excel.
> >
> > There is no inbuilt function in excel that sends email through outlook, 
> > You
> > have to manually code in VBA to make it happen. I have already coded it 
> > such
> > that It sends the email to the respective managers with the voting buttons
> > option enabled, But I am struggeling with selecting this specific custom
> > option in voting button that I want checked when the email is sent.
> >
> > I think, we can code the same way as we would code in outlook to make this
> > to work. But I dont know how to get this specific thing to work.
> >
> > Could you please show me how it is done in outlook, So I can try and do it
> > in excel.
> >
> > Thanks in advance
> >
> > "Dmitry Streblechenko" wrote:
> >
> >> I don't know Excel Object Model, does it have a function to send e-mails?
> >> Why not use the Outlook Object Model?
> >>
> >> -- 
> >> Dmitry Streblechenko (MVP)
> >> http://www.dimastr.com/
> >> OutlookSpy  - Outlook, CDO
> >> and MAPI Developer Tool
> >> -
> >> "sam" <sam@discussions.microsoft.com> wrote in message
> >> news:8E22B6FF-A314-4E8D-A4D6-F04BA4DC805C@microsoft.com...
> >> > Hey Dmitry,
> >> >
> >> > Thanks for the help.
> >> >
> >> > I am sending the emails through Excel. Is there a way to do it from 
> >> > excel?
> >> >
> >> > Thanks in advance
> >> >
> >> > "Dmitry Streblechenko" wrote:
> >> >
> >> >> If sending through the Outlook Object Model, use the
> >> >> MailItem.VotingOptions
> >> >> property and MailItem.ReplyRecipients collection.
> >> >>
> >> >> -- 
> >> >> Dmitry Streblechenko (MVP)
> >> >> http://www.dimastr.com/
> >> >> OutlookSpy  - Outlook, CDO
> >> >> and MAPI Developer Tool
> >> >> -
> >> >> "sam" <sam@discussions.microsoft.com> wrote in message
> >> >> news:C8186BBC-9EA2-41F0-94CF-2135FC5E9FC2@microsoft.com...
> >> >> > Hi All,
> >> >> >
> >> >> > How do I select a specific property in outlook while sending email 
> >> >> > from
> >> >> > excel?
> >> >> >
> >> >> > There is an option we can set in outlook outgoing emails call 
> >> >> > "Voting
> >> >> > buttons"
> >> >> > in that feature there is a custom option that we can select called
> >> >> > "Have
> >> >> > replies sent to" its a checkbox. I want it checked when i send an 
> >> >> > email
> >> >> > from
> >> >> > excel.
> >> >> >
> >> >> > Hope i made it clear.
> >> >> >
> >> >> > Thanks in advance
> >> >>
> >> >>
> >> >> .
> >> >>
> >>
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
1/13/2010 8:57:03 PM
Reply:

Similar Artilces:

Help setting value for several checkboxes
Hi everyone, I am new to VBA as well as being new to this newsgroup. I am having a problem trying to set a group of checkboxes to a common value (on clicking a button). I expected the following code to work: Private Sub CLRALL_Click() Dim i As Integer For i = 1 To 7 CheckBox(i).Value = 0 Next i End Sub However, it brings up the following Error Message: Compile Error: Sub or Function not defined. The Help Menu is very unhelpful and I don't understand it. I have only been able to get my code to work this way: Private Sub CLRALL_Click() CheckBox1.Value = 0 CheckBox2.Value = 0 CheckBo...

Mailbox full sends message to senders
I notice that after configuring "storage limits": Prohibit send and receive at :100MB Every time I send a message to an user that has a full-mailbox, I get an automatic reply that advises that recipient has a full-mailbox. Questions is this, is it possible turn off such auto-notification that reminds that user's mailbox is full, and if so, is that recommended ? Exch2003SP1. Marlon, If you are asking if you can prevent non-delivery reports from being send when some one tries to send a message to a mailbox that is full the basic answer is no. This is by design as the mes...

Exporting email addresses from Outlook
I have many large email groups set up in Outlook. Is there a way to export only a group and not ALL email addresses in my address book? -- Roger Explain what you mean. Outlook does not use groups. -- Russ Valentine [MVP-Outlook] "Roger" <Roger@discussions.microsoft.com> wrote in message news:A798E063-4F7B-44B6-86FD-9B627AFD4A2B@microsoft.com... >I have many large email groups set up in Outlook. Is there a way to export > only a group and not ALL email addresses in my address book? > -- > Roger ...

remove vertical lines on left of received email documents
Emails I receive that have been forwarded have a vertical line on the left of the text and sometimes forces the text on the right off the page. How do I remove the line so that I can view and print the entire text? This is in Outlook You cannot always do this without disturbing the message or edit it in a HTML editor. One sure way of getting rid of it is by switching the message to Plain Text. -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuring Microsoft Outlook 2003 http://www.howto-outlook.com/ Outlook FAQ, HowTo, Downloads, Add-Ins and more http://www.msoutlook....

"Show All" in Excel
Is there a "Show All" or something similar in Excel like there is in Word? I am having trouble with hidden text (spaces) in the "COUNTA" function. Paul No "show all" available in Excel. If you have spaces or other junk in cells, you can try the TRIM or CLEAN Functions. Download Chip Pearson's CELLVIEW add-in from http://www.cpearson.com/excel/CellView.htm Load through Tools>Add-ins. Select the data and Chip's add-in will show you what the characters are. David McRitchie's TRIMALL macro will also be of assistance. Cleans up what TRIM and C...

Help! Messages don't show up with email!
I receive the to, from, subject and time and date - but no messages show up in the preview pane! Can't access the actual mail at all! The folders where I store old messages, also corrupt! Can't access old messages either -- just the info lines above, no actual messages! I depend on these daily for all my business! I'm up a creek without a paddle! Help me please! Thanks in advance for your kindness! charnet1@optonline.net ...

PLEASE HELP!! Project Tasks are Causing My Tasks to appear Blank
Happy New Year, everyone. Perhaps you all can assist me with an issue that no one seems to know to fix. Recently, we have seen that some submitted tasks are causing the status managers issues when trying to approve the tasks in My Tasks. What I mean is this: - Resource adds time to a task in My Tasks - Resource submits the time to the Status Manager - Status Manager goes into PWA and navigates to Task Approvals - The Status Manager’s Task Approvals screen freezes and after a short while, they are brought to a blank My Tasks page which shows ever...

Outlook 2003 clients cannot recover deleted items in cached mode
Running Outlook 2003 with Exchange 2003. Clients are not able to recover deleted items in cached mode. If I have cached mode enabled, the users are able to go into "Recover deleted items" and select something to recover, but it just disappears. No error, it never shows up (we have been waiting for days). If I turn off cached mode, restore deleted items works beautifully and imediately. We have already tried hitting F9, shift F9, etc. and have had not luck. Does anyone have any suggestions? Thanks. No issues here. Out of curiosity, have you applied SP1 for Office/Outlo...

How do I set up a payroll master in Excel or Access?
Here is the problem....I have set up a worksheet in Excel to do all of the calculations for jobs that have been done. There are three employees per job that split a portion of the job amount. I need to be able to pick out each individual employee and link them to their own worksheet so that they can get paid what they are due. I have tried to do a database in Access, and believe it or not, it seems that it just is not able to do what I need it to do. I know it is vague, but if there is anyone out there who can help me, I would appreciate it so much. ...

Excel Pivot Table
I have created a Pivot table with the following fields: Customer; Product; Actual; Budget; Variance where 'Variance' is calculated Item within field name 'Version' using formul 'Actual-Budget'. (ie Some records in the raw data have version set t 'Actual' and others have version set to 'Budget'. I am trying t compare Actual and Budget). The problem I have is that when I use thi calculated Item, the results displayed include combination of ever possible Product and Customer even if the data does not include such combination. This means that I have a hug...

Rule to save Email to file, Outlook 2000
I need to create a rule that automatically saves special incoming emails as text-files to the file system. I know it's possible to start an application for this event (which works), but I don't know how to get the email text within the application. Thank you very much in advance! Marc Dzaebel ...

Import excel into publisher
It would be beneficial, if Publisher had the capibilities to import Excel spreadsheets to keep data up-to-date. I read that it is NOT possible, or is there something I missed? Import excel into publisher wrote: > It would be beneficial, if Publisher had the capibilities to import Excel > spreadsheets to keep data up-to-date. I read that it is NOT possible, or is > there something I missed? You can Mail Merge from Excel spreadsheets, and you can insert an Excel sheet as an OLE object. Does that not cut the mustard? -- Ed Bennett - MVP Microsoft Publisher http://ed.mvps.org ...

Outlook 2007 loosing connectivity to Exchange 2003
Hi all! We have an Exchange server 2003 and Outlook 2003 and 2007 clients connecting to it. Most of our users are having laptops, and when then undock them, their LAN connection is closed, and WLAN takes over. This setup is working fine on Win XP + Office 2003. But those users having Office 2007 installed (on both Vista and XP) are experiencing that often Outlook looses connection, goes Offline having no connection to the Exchange server! Usually it helps to restart the machine, but sometimes not even that! We've tried a lot of things, repairing the profile, deleting the profile ...

Screen Blinks when I have Outlook 2007 Open
My Screen Blinks when I have Outlook 2007 Open and then open a write a New email. It only does this with New emails, not appointments of calendar, just New emails. ...

Check List in VBA
Check List in VBA Hello, I=92m looking for advice on the following: Let=92s say you wanted to check a list of values (same data type, same length, etc) without using a table in VBA. Something like=85 If strValue in ( Value1, Value2, Value3, ValueN) Then do something With a short list, a simple case statement would suffice, but because of its structure (TestExpression), (ExpressionList), (StatementBlock), it could get rather long. What I=92m trying to do is verify a list of user ID=92s in code without using a table object (which would be linked). Am I crazy or can...

How can deleted data reappear in a refreshed pivot table in Excel
I am using Excel 2003. I have a worksheet full of data and built a pivot table on another sheet (within the existing datasheet). Nothing too complicated. I updated my data by pasting new data over the top of the old data and updated my pivot table. The problem is that in the pivot table one of the fields still allows me to select on data that no longer exists in the data. More specifically, I have a column in the base data entitled "Vendors" and have approximately 20 different vendors that appear throughout the data. When I update my pivot table, in the vendor select...

Outlook 2007 local help does not work
Hi, i also have another machine that does not load local help or online help. The error dialogue for the local help is: "the file does not have a program associated with it for performing this action. Create an association in the Folder Options control panel." thanks Paddy ...

Outlook 2007 Calendar: Private by default
I ran into a scenario where a user was running Outlook 2007, and needed every appointment to be marked as Private by default. Because the form differs so much between Outlook 2003 and 2007, Microsoft's published instructions (http://office.microsoft.com/en-us/outlook/HA011456981033.aspx) do not apply at all to Outlook 2007. I had to figure this out on my own. Here is the procedure in case anyone out there needs this functionality: Outlook 2007: 1) Tools >> Forms >> Design A Form 2) Select Appointment, click Open 3) When the Form Designer comes up, look in the (All Fields...

how do I backup outlook 2000 signature templates?
I use several signature templates in Outlook 2000 and I am looking for a way to back them up. I recently lost most of them after having to reinstall Outlook... Thnak you, JG ...

Going away: Need to save pic from daily email
I am going away on a conference and would like to have Outlook (2002) download my mail each day while not at home - which I know I can do. One of the emails I receive is a daily html comic email with the strip in it. Is there a way that I can automate to save the pic in a folder while away from my computer if I leave Outlook running to auto download? The pic is on this comic server and only allows a few of the comics before the present date so I can't do it when I come back 'cause then I will have missed it. Thanks ...

How do I change the column heading in Excel to display "A" "B" "C
I have Excel 2003 and when I start is up, the new worksheet display the column heading as "1" "2" "3" etc. How do I change it to A, B, C etc? Tools>Options>General tab>Uncheck R1C1 reference style -- Kind regards, Niek Otten Microsoft MVP - Excel "Thai" <Thai@discussions.microsoft.com> wrote in message news:FA01EA9C-1A7E-45AA-80C9-45DEC8382C19@microsoft.com... |I have Excel 2003 and when I start is up, the new worksheet display the | column heading as "1" "2" "3" etc. How do I change it to A, B, C etc? ...

Excel 2003 02-02-10
Is it possible to clear a range of cells so that it defaults back to template once the user clicks the button, below is code to attach the excel woorkbook in an email and once emails i want it to clear certain cells. Sub Mail_Button66_Click() 'Working in 97-2007 Dim wb As Workbook Set wb = ActiveWorkbook If Val(Application.Version) >= 12 Then If wb.FileFormat = 51 And wb.HasVBProject = True Then MsgBox "There is VBA code in this xlsx file, there will be no VBA code in the file you send." & vbNewLine & _ ...

Outlook 2002 hanging #2
My Outlook 2002 has recently started hanging up. It can either happen immediately when I start it, or hang during "send/receive", or even randomly after a few minutes of successfully starting. Then Outlook eventually becomes "Not Responding". Restarting the notebook doesn't seem to help any for me. Even starting in Safe Mode doesn't help, if I'm lucky and can even start in Safe Mode. Today it won't even let me start in Safe Mode. I usually see two Outlooks in the Windows Task Bar Applications screen when I have only hit the Outlook icon once. ...

Outlook 2003 Navigation Pane
Whenever I switch to Outlook Today, the Mail bar appears in the Navigation Pane. (Evidently this is the default) How do I change this, to, say, the Shortcut Bar? In other words, I want the Shortcut Bar displayed whenever I display the Outlook Today window. ...

Filtering incoming email questions
I'm about to set up an Exchange server for the first time on SBS 2003. The client wants to know if an email is sent to more than one person, can we have a rule/filter that delivers it only to the first addressee and no one else? Basically not allow mulitple addressees of any kind, either in the main "to:" field, the "cc:" field, blind copy, etc. It would be nice if this was configurable by the user but if it had to be policy for the whole Exchange server site, that would be OK, too. Apparently their customers are making a habit of sending things to mulitple em...