To whom it may concern,
How do I include "Voting Buttons" in an Outlook email message using a macro
from Excel 2003? I have tried adding them as objects within the email
portion of the macro code, but have not been successful. Any help would be
Senior Business Analyst
Similar Excel Video Tutorials
Excel Will Talk To You
- Add the Speak Cells On Enter button to Excel. See how to add a button to the Excel 2007 Quick Access Toolbar. Learn how to show the Text To Speech Too ...
Stop Automatic Copyright symbol ©
- See how to turn off the AutoCorrect feature for the Copyright symbol.
1) Click on the Office Button (2007) or File tab (2010) (upper left c ...
Macro & Form Button
- See how to create a basic Macro and then assign the Macro to a Form button.
See how to fix a formula with an error with the IFERROR, IF, an ...
I've got the below code that sends an E-mail from outlook via VBA coding in a macro, I would like someone to help me add into the code the following;
Custom Voting Buttons: Approve; Reject; Hold ECS
Redirect replies to another E-mail address.
Dim Email_Subject, Email_Send_To, Email_Cc, Email_Bcc, Email_Body As String
Dim Mail_Object, Mail_Single As Variant
Email_Subject = "Automatic Message: Re-sale Register"
Email_Send_To = "[EMAIL="TestEmail@Test.co.uk"]TestEmail@Test.co.uk[/EMAIL]"
Email_Bcc = "[EMAIL="AnotherEmail@Test.co.uk"]AnotherEmail@Test.co.uk[/EMAIL]"
Email_Body = "New comments have been added to a part you've subscribed to"
On Error Goto debugs
Set Mail_Object = CreateObject("Outlook.Application")
Set Mail_Single = Mail_Object.CreateItem(0)
.Subject = Email_Subject
.To = Email_Send_To
.BCC = Email_Bcc
.Body = Email_Body
If Err.Description <> "" Then MsgBox Err.Description
If you like these VB formatting tags please consider sponsoring me in support of injured Royal Marines
I know the following question is not to do with Excel but it's related and I need to re-think how to do the above if this isn't possible:
Is it possible to have an E-mail address in outlook look at all incoming E-mails and change a spreadsheet depending on what the E-mail says?
I know theres a few complex questions, feel free to ask more.
Hi. I'm trying to send an email to several hundred people using an excel database containing the email address and a customer reference number. I want the email to have a subject line containing the reference number. Can anyone help me with this?
What's more I need the email body to contain some static text, BUT for the recipient to reply to a fixed email address using voting buttons. I thought maybe replacing the voting buttons with maybe a mailto hyperlink which populates the reply subject with the vote option and the reference number.
Any help you can give would be greatly appreciated.
I have created a macro which sends an email out with voting buttons Approve and Reject.
Problem is, when the receiver of the email hits Approve, it only gets send to the sender of the origin email (user of the program). I wanted it set up so that when the receiver hits Approve,it gets sent to the user of the program as well as me. I tried putting both names in the TO field but the response only gets sent to the user of my application that sent the email out. Is there any way to get around this?
HI please can you help. I am not good with code and was wondering if the following is possible.
I have managed to pull together a code, which is probably not the best of code and a mixture of all different things but seems to work so far. It currently emails an attachment to a supervisor email address and cc's. to an administrator email address. The email generated also has the voting buttons included however, When you use the voting option to reply it is only sent to the person who it, is there a way of also replying to the administrator cc email address?
I hope the above make sense
I'd like a button on the toolbar of a new Outlook 2003 message that does a
few things .
First it checks two options under "Voting and Tracking options" under
"Message Options", "Request a delivery receipt...." and "Request a read
receipt..."for this specific message.
Then i'd like for the macro/vba to attach the following file "C:\FTPLOG\ftp.log"
Then I would like for it to automatically "Send" the message.
Lastly, I would like for it to delete the file it just sent
"C:\FTPLOG\ftp.log", to be ready for the next transmission.
Where do i even start to get this going?
Please help...thanks in advance,
hi all, not sure if this is vba, but is there a way using outlook on a network that i can schedule a meeting in calendar from responses to yes no maybe voting buttons in an email, as always thanks in advance
I've had assistance in creating pdf's in Excel 2003 using VBA. The macro creates pdf's for all sheets (from sheet 4 onwards) and saves them as follows: c:\temp\"sheet name".pdf
I would also like to e-mail the created pdf every time using Outlook 2003. This will be e-mailed to different e-mail addresses using the macro. I will put the email address somewhere on the relevant sheet (e.g. cell A1).
I attach an example spreadsheet including the current code creating the pdf's.
I have also noted that Outlook 2003 automatically gives a security warning because "another program is trying to access Outlook". Is it possible to have the macro "delete" or "ignore" this message automatically?
What i need to do is fairly simple but i can't manage to do it...
What i need is a Macro that can do the following:
i want a serie of button called "coaching" on row h4 to h1000, all the button are identical and do the same purpose.
When we click on the button i want the name to change from "coaching" to "email sent", and i want outlook to open with a email adress in the "to" field, and want the subject of the email to be "agent that need coaching".
So each time i fill a row, if i need a coaching to be done, i click the coaching button and it open up outlook with a "to" and a "subject", and i can then, manually finish the email.
So a quick resume:
series of button that fit individually in cell h4 to h1000, called coaching
when i click it change to email sent
And open outlook with a "to" email and "subject" prefilled.
Anyone can help?
I have added voting buttons to the following macro, is there anyway og getting the voting buttons to reply to multiple recipients or in the case "email1"
Dim myOutlook As Object
Dim myMailItem As Object
Set otlapp = CreateObject("Outlook.Application")
Set otlNewMail = otlapp.Createitem(olMailItem)
fname = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
Email1 = Cells(10, 2).Value
requistioner = Cells(4, 2).Value
.To = " "
.CC = Email1
.Subject = " "
.Body = Chr(13) & "Hi," & Chr(13) & Chr(13) & "Please process the attached order at your earliest convenience" & Chr(13) & Chr(13) & "Regards," & Chr(13) & requistioner & Chr(13) & Chr(13)
.VotingOptions = "Accept;Reject"
I have an Excel macro that sends an Outlook message with an attachment. The code works perfectly, but the request to send the email does result in the message: "A program is trying to send email on your behalf...".
I found a similar problem noted he
One of the three solutions offered was to sign one's macros. I've done that (internal digital certificate) and have configured both Excel and Outlook to "honor" this signed macro by having them listed under Tools, Macro, Security/Trusted Publishers.
I still get the message about the email. I tried this under both High and Medium level security.
Our IT infrastructure guys tell me that there is nothing that they have in place that would cause this to occur.
Does anyone know why this is occurring? I'm running Outlook 2003 SP3 and Excel 2003 SP3.
I'm using a standard little Excel macro to send an individual email to each person in a list:
Msg = "All," & Chr(10) & Chr(10) & "As part of normal support and maintenance, this week we updated your store to v" & .[X1] & Chr(10) & Chr(10) & "Any questions please contact me directly."
Set Emails = .Range("T2", .Range("T" & .Rows.Count).End(xlUp)).SpecialCells(xlFormulas, 2)
For Each Email In Emails
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
Subject = Email.Offset(, -19) & " - System Update"
.To = Email.Text
.CC = ""
.BCC = ""
.Subject = Subject
.Body = Msg & Chr(10) & Chr(10) & Signature
'.Display 'or use .Send
Email.Offset(, -1) = "Done"
Problem, I'd like to set the "Save Sent Message To:" option on each of these emails, too, to file this email into a specific archival folder in Outlook. Is there a way to do this in Excel VBA? I could just copy all these emails manually out of the SENT EMAILS folder, but if it's possible to file them using the macro, even better.
Bonus question: Is there any way to add an existing Signature in Outlook to these emails? I have a default signature that occurs automatically on all NEW emails I create in Outlook, but this VBA method of creating an email does not get that default signature, seems to skip that. In the code above I'm using another signature I created for the macro, but it's not the cool formatted signature I have usually in Outlook.
(also posted here with no response so far...)
I have a macro that sends a worksheet via email [Outlook] to a list of recipients. Everytime an email is created, outlook pops up a confirmation window and waits for user input "yes".
Can I set up vba or outlook to skip that step?
I really want to create a macro with a loop to go through a list of files, execute a macro in each one, save the files and send emails to various people. This process will create about 40 emails and I don'd want the admin person to have to sit there and confirm each message going out.
Any help would be apprecited.
Just wondering if somone could help me with some VBA. I have written a macro so when I press a button, it creates an email with the email addresses, relevant attachment and text in the body of the email.
However, I also want to add data from one tab called 'stats' (A5:A8 to be precise) below my first line of the body of the message. Can anybody help. My exisiting code is below:
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
.To = "firstname.lastname@example.org"
.CC = ""
.BCC = ""
.Subject = "Hello"
Dim strbody As String
strbody = "Please find attached today's spreadsheet and statistics below." & vbNewLine & vbNewLine & _
"Kind regards" & vbNewLine & _
Set OutMail = Nothing
Set OutApp = Nothing
I have a spreadsheet with a number of different actions with various different dates associated to them. Is it possible to create a macro that will automatically send an email to my outlook inbox (or somebody elses) when the date is due or upcoming?
Also is it possible to include different content in the email based on say the title of the action etc?
Any help would be greatly appreciated, thanks in advance
I am using outlook 2003, and currently I am trying to run this email macro on my excel and send an excel file to specific email. And when i execute the code, Mic. outlook popup a window saying
"A program is trying to access e-mail address stored in outlook. Do you want to allow this? then i have to check the allow access box and select the minutes. Is there anyway I can bypass this or automate this in the macro?
Thanks for all the help.
I currently use the following code to open any of my 4 types of email accounts, such as hotmail, gmail, juno etc. Now I am adding Outlook and I don't know how to incorporate it into my code.
As an Ex: I have a seperate worksheet that I place the name hotmail.com and the following code will open it. I use a separte cell for each email address along with a separate macro for each email name.
I doubt that I can use this same code. I think that I have to use Outlook.exe ?????
Help would be appreciated.
Dim sUrl As String
sUrl = "http://" & Sheets("Setup").Cells(9, 5).Value
Set oShell = CreateObject("Wscript.Shell")
I'm looking for a sample of code to open an excel file attached to an outlook message.
1) Preferably, from the selected email in my inbox
2) Also good, from the current open message
3) Best, to loop through all emails in a specific outlook folder and either open the files or save them to a specific directory.
Thanks if anyone has suggestions - my attempts at working with outlook objects hasn't proved too successful yet.
The first two parts of this macro work just fine, it's the closing part of it which doesn't work. The strange thing is, if I isolate the close part of the macro and run it as it's own macro, it will work. However, it will not work as part of a larger macro, or even if called from a higher macro which contained the open portion. Here is my code:
Dim Outlook As Outlook.Application
Set Outlook = CreateObject("Outlook.Application")
Dim ns As Outlook.Namespace
Dim Folder As Outlook.MAPIFolder
Set ns = Outlook.GetNamespace("MAPI")
Set Folder = ns.GetDefaultFolder(olFolderInbox)
Set myOlApp = CreateObject("Outlook.Application")
Set mailItem = myOlApp.CreateItem(olMailItem)
Set myRecipient = mailItem.Recipients.Add("email@example.com")
mailItem.body = "testing"
mailItem.Subject = "test email"
Set Outlook = CreateObject("Outlook.Application")
Set Outlook = Nothing
If anyone can explain what I'm doing wrong with the last part, I would appreciate it. Also, if any other part of my code could use some cleaning up, feel free to let me know.
I received a request for a macro that, on pondering over later, I realised was a little naive and possibly superfluous as well. However, here goes.
On the Compose Messages window, in addition to the "Send" button that Outlook provides, I need another button that, when clicked, will perform the same function as the default "Send" button, but will also add the text "Follow-up" to the subject line and forward the email to a specific email address. I also need to have a way of changing the email address when I want to, and have Outlook remember the address every time I close and open it.
Any help on this would be appreciated.
Is there any way of getting the voting buttons in Outlook to automatically reply to multiple recipients
I imported some business card info into Outlook 2003 in the following way.
First I imported the data into Access. (I created the access file format by doing an EXPORT from Outlook to Access, so the file format would be recognizable to Outlook).
I then input the contact data from the Access table into Outlook. It worked beautifully.
One glitch !! When creating an email to one of these contacts, the recipient address displays in the top of the new mail message as follows:
Elizabeth M Jensen LSW (Business Fax)
This is true for all these contacts.
I do not know why "Business fax " appears. How do I fix this?
The field "Phone 3 selector" does contain the text "Business fax", but I did not populate that field.
Many thanks for any assistance.
Hi again everyone,
Thanks for all the help on my first part of my code.
I wish to add something to my current list of code...
So here's my code
Dim btn As Button
Dim rng As Range
For i = 4 To 1000
Set rng = .Range("h" & i)
Set btn = .Buttons.Add(rng.Left, rng.Top, rng.Width, rng.Height)
.Caption = "Coaching"
.Font.Size = 8
.OnAction = "EmailSent"
This code works absolutely fine, it creates a list of button with action linked to my second action "email sent" wich is:
This code once again works fine, it calls up outlook when i click, but i would like to modify it.
First modification i would like:
Change the caption of the cell from "coaching" to "email sent" once i click on it.
When outlook pops, can i auto populate a new email with the "to" field to "firstname.lastname@example.org" and the subject to "Agent to be coached" ?
So i won't have to filled that up everythime? i will do manually the body, but would save us tons of precious time if this can be auto populate!
I have a macro that will send the active spreadsheet and also a specified file as an attachment in an email using Outlook, but I want to be able to choose the email address rather than specifiying one in the macro. Here's my code:
Dim aOutlook As Outlook.Application, aEmail As Outlook.MailItem
Set aOutlook = GetObject(, "Outlook.Application")
If aOutlook Is Nothing Then Set aOutlook = New Outlook.Application
Set aEmail = aOutlook.CreateItem(olmailitem)
aEmail.Subject = "I/E Report"
aEmail.Body = "The report that you requested is attached."
aEmail.Attachments.Add "C:\My Documents\CURRENTGL.XLS"
Any suggestions would be greatly appreciated. I have just started working with VBA.
I'm putting this in the Excel section, but what I want to do is have one of my Excel macros run upon receipt of an automated email in my Outlook inbox. I setup a rule to monitor my Outlook mail looking for this specific email message. Right now it displays a message box to alert me when the message has arrived. Does anyone have an example of how I can modify the code and have it automatically run a macro from one of my Excel files?
Recently I upgraded to Outlook 2007, and found a problem. Outlook 2007 has it's own VBA. I had a macro that I created in Word 2003 and used in Outlook 2003, now the new version won't recognize that macro.
Would this be the site where I could past the old macro and get some help to make it work in Outlook 2007. It's a simple macro that effectively places a word "Confirmed" and a date and time stamp on an email that I would reply to?