VBA: Userform Sending Email

Jan 16, 2009

I'm working with an excel file, a userform and a command button. The command button is the main question here. Bascally when this button is clicked and email is sent to a specific person, me. This email also contains an attachment, and currently that is the active workbook open behind the userform. This works well, sort of. I sent this excel file to 5 co-workers to test. All but 1 worked OK. One, however, did not.

When the button was selected the standard Outlook message came up: "...an automated email is being sent on your behalf...select YES to continue..."...It all looks fine, but nothing happens...nothing shows up in their sent items folder and I do not receive this message.

Has anyone experienced this before? Is there a sitting with this users Outlook that prohibits the sending of automatic emails? I've added my command button code below...incase someone sees thing strange...(I am rather new to vba coding...)

View 4 Replies


ADVERTISEMENT

Sending Email Using Users Preferred Email Client

Jul 29, 2009

When I test the email link on my computer, the 'Outlook Express setup' wizard initiates. However, I don't use Outlook Express (Yahoo and Zimbra).
I am wondering of it is possible to automatically ensure that in cases where a user doesn't use Outlook Express by default that Excel will open the users default email client- which could be a web browser or another application? Is this something determined by each users (Control Panel?Registry?) settings for handling email hyperlinks? Is there a piece of VBA code I could include in the workbook which identifies the relevant email client to open?

I know I can simply provide my email address on the workbook and allow a user to copy/paste it into their email application but I feel that by minimising the amount of effort required by a user to provide a rating that I'll be more likely to receive user rating feedback.

View 3 Replies View Related

Email Sending Through Excel?

Aug 30, 2013

editing the code below. what i want is when i filter column X, all email addresses appearing in column V will be included in the TO field in my mail.

Option Explicit
Sub SendEmail()
Dim OutApp As Object

[Code]....

View 1 Replies View Related

Sending Email Via VBA In Excel

Jan 23, 2014

I have written code in VBA to send emails via Excel based on a name that is held in a spreasheet that is then looked up against an organisation address book. What I need to know is there anyway that you can save mails into the Draft folder that were unable to send for example if they have an email adress that is incomplete or not recognised or if the email box has reached capacity?

With OutMail
.SentOnBehalfOfName = "XXX"
.To = Emails
'.CC = "XXX"
.BCC = ""
.Subject = pi.Name & " - Enablement Request"

[code]......

View 4 Replies View Related

Sending Linked Spreadsheets Via Email

Oct 21, 2013

I have two workbooks in the same folder which are linked bidirectionally. I send the files to a colleague, he updates them, increments the version number and then sends them back to me. I store them both in the same folder before opening them. However, on opening all links in one workbook have the form:

[Code] .....

The filename is correct (the updated book) but the sheet name, which hasn't changed, is now a #REF. Redefining the links restores the functionality but is going to become difficult when the plan is shared more widely.

Why this is happening and what I can do to make the links work permanently?

View 1 Replies View Related

Compose Outlook Email Without Sending

Jun 17, 2014

I am trying to write a macro to compose an email in outlook without sending it. Ideally the macro would compose the email and the email would be left open for me to inspect before sending. Below are the details.

Column A contains the addresses
Column B contains the CC addresses
Cell C2 contains the message

I can change where the above info is located/arranged if need be.

My spreadsheet automatically generates the email addresses, which are dynamic. For control purposes my employer does not want me to have the email automatically sent, being the reason for me to want to inspect the email before sending it.

View 2 Replies View Related

Sending Email From Excel Via Web Outlook (OWA)

Jun 23, 2014

i have the following code in my Excel worksheet. This code successfully send out email to our customers when if the criteria is true. I have tested this at home and it works perfectly as I use Outlook at home. However when I take this code to work I couldn't get this working as at work we use Outlook 365 and we use web Outlook, OWA.

Is there a setting I can specify to use OWA as I don't think I am allowed to install outlook at work.

[Code] .....

View 5 Replies View Related

Sending Email With A Picture In Body

Mar 21, 2014

I have a process metric that I need to send via email.

I would like to automate this.

I am looking for the following

1. upon clicking send mail button the smart art used on the excel should be mailed.
2. the smart art should be pasted as Image on the body of the email.
3. The body should contain a text message like " dear receiver," <line break> " Please find the below process health for this week" <line break> "Regards," <line break> "Sender"
4. The size of the image on the email body should be height 3 inches and width should be 5 inches.

I have attached the spreadsheet for reference.

View 10 Replies View Related

Sending Email Via VBA - Add Hyperlink In The Body

Aug 14, 2012

I am using the below code to send a email by VBA in Excel but I am trying to add a hyperlink in the body of the email.

I would like to use '"Click Here" to go to Google - I only want to show "Click Here" in the email not the full web address

Sub SendEmailData()
Dim iMsg As Object
Dim iConf As Object
Dim cell As Range
'Dim strbody As String
' Dim Flds As Variant

[Code] ........

View 9 Replies View Related

Sending Personalized Email Via Outlook

Dec 9, 2012

Determining the problem with my settings for the failure of this line of code executing.

Set OutlookApp = New Outlook.Application

I was expecting the statement to create a new outlook instance, but got this message

Run-time error '-2147319779 (8002801d)':

Automation error Library not registered.

View 9 Replies View Related

Excel Sending Email Via SMTP

Dec 10, 2013

I have a database file that I use for tracking "Requested Laptops" ( so that technicians can request the model they need ) and what model they want. There are three of us that distribute laptops ( asset managers ), and we have a box that we use to say we distributed it. For example:

TECH REQUESTING .. . . . DATE . . . . MODEL NEEDED. . . . . FOR WHO . . . . . . . STATUS OF REQUEST . . . . . SERIAL NUMBER PROVIDED. . . . . . ASSET TAG PROVIDED.

Those are the columns. The "Status of Request" Column uses data validation "list" and can either say:

NOBODY/PENDING
Wes Distributed
Person2 Distributed
Person3 Distributed

When the technician first requests, he selects "NOBODY/PENDING" and there is Conditional formatting that highlights the row RED so that we can easily see that there is a pending request. Once laptop is distributed, we change this field to Wes distributed for example, and the row is highlighted green.

Now that you have the basics of the file, what I'm looking to do is find out if an email can be sent either by Outlook or SMTP, so that when a technician enters the request and changes that field to NOBODY PENDING, an email is sent to all 3 asset managers saying "Please be advised that an asset has been requested by [TECH REQUESTING]. expedite."

View 1 Replies View Related

Sending Email Using Lotus Notes

Oct 30, 2006

I have developed many macros that generate automatic emails from excel using Outlook, with the excellent help I've found here. Now due to recent buyouts, we have changed our email from Outlook to Notes. I'm looking for the simplest method of changing my macros so they will work with Notes. Below is the typical code I'm currently using. Is there an easy way to change it for Notes?

Public Sub SendEmail()

Dim OutApp As Object
Dim OutMail As Object
Dim Dist As String
Dim supplierinfo As Range

Dist = WorksheetFunction.VLookup(Supplier, Workbooks("ScarForm.xls").Sheets("Supplier Information").Range("a9:z1000"), 3, 0)

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.to = Dist
.CC = "emailnames"
.BCC = ""
.Subject = "email subject"
.Body = "Text of email"

Windows(Fname & ".xls").Activate
.Attachments.Add ActiveWorkbook.FullName
.Display
End With
Set OutMail = Nothing
Set OutApp = Nothing

End Sub

View 9 Replies View Related

Sending Email Based On Cell Value And Range

Aug 3, 2012

I am looking to set up a vba code for sending an email to a recipient based on whether the row AI19:AI30 shows the value 3,6,9 and i want it to send an email showing all of the 3 data all of the 6 data and all of the 9 data.

I have attached my code so far.

VB:
Private Sub Workbook_Open()
Dim w As Worksheet, c As Comment
For Each w In ThisWorkbook.Worksheets
If UCase(w.Name) <> "All Trades" Then
Select Case w.Range("AI19:AI30").Value
Case Is = 3, 6, 9

[Code]....

View 1 Replies View Related

Sending Excel Worksheet As XLS Attachment Through Email?

Feb 14, 2013

I need to know how to send an excel worksheet as an xls attachment by email.

View 2 Replies View Related

Sending Email By Selecting From A List Of Addresses

Dec 2, 2008

I am attaching a workbook with the VBA code for sending email.

I found the code on this forum and changed a little bit to make it work for my application.
I am not sure if this is the most effective way, but it works.

The user would select from a list of names on sheet1 and click "send_mail" button. What I need done is to send sheet2 as an attachment.

The problem: The code is looking for address in cell "H7" on sheet2. I want to keep the address on sheet1, but send out sheet2.

If I copy the address from sheet1 to sheet2 in cell "H7", everything works fine. So I need soemone to help me change the code, so it will send out sheet2, but read address on sheet1.

View 9 Replies View Related

Sending To Multiple Email Addresses From Cells

Apr 5, 2009

I'm a primary school class representative and I want to create an excel contact list of the parents email addresses so that I can click a button, it will open the default email (in my case MS Outlook) and then populate the "To" email address field with the email addresses (separated by a comma).

Can anyone provide me the VB code that I can paste into my worksheet VBA that will look at a range of cells (say E2:E30) that contain email addresses, and put them in the "To" field of a blank email?

I have put a button on the page and it's called "EmailButton" but I don't know what VB to put with it. I'm using MSExcel 2007 (at home) and 2003 (at work)

View 7 Replies View Related

Sending Spreadsheets - How To Add Text To The Body Of Email

Dec 16, 2011

I am using the following code to create several spreadsheets and send via email. This all works perfectly, but I would like to add text to the body of the email. What would I need to add to enable me to add text to the body of the email?

From Bottom of Code:

' Copy the Report sheet to a new book and e-mail
Sheets("Report").Copy
Application.Dialogs(xlDialogSendMail).Show _

[Code].....

View 2 Replies View Related

Sending Automatic Email Dependent Upon Value In A Cell

Mar 22, 2012

I have a spreadsheet set up to track questions coming into a mailbox, some of which we have to refer on to other areas. What I am wanting is for an email to be sent back to the mailbox (same email address each time) when the query has been referred to another area for 14 days (chaser) and 28 days (urgent chaser).

Details

Column B = Name of person query belongs to
Column J = Query text
Column L = this should be checked to see if it = "Referred" to indicate that the query is referred to another area
Column N = Name of the area/person the query is referred to
Column AE = holds the number of days that the query has been referred for

What i would ideally like is that when AE reaches 14 an email is sent in the following format

Subject: Name of person: Query outstanding for 14 days Body: You have a query outstanding with "Column N" as follows "Column J in bold text".

And then once it reaches 28 days

Subject: Name of person: Query outstanding for 28 days Body: You have a query outstanding with "Column N" as follows "Column J in bold text".

View 1 Replies View Related

Sending Outlook Email Messages From Excel

Nov 29, 2013

I am trying to send outlook E-mail messages from excel but at the last I am receiving allow and deny message...How can I avoid this message.

Sub Button2_Click()
'Microsoft outlook 14.0 object lib (library name)
Dim olapp As Object
Dim msg As Outlook.MailItem
Set olapp = Outlook.Application

[Code] ..........

View 2 Replies View Related

Wrong Range Selected While Sending Email

Feb 25, 2010

I am wrote below code to send email using VBA:

Sub SendEmail()
'References needed :
'Microsoft Outlook Object Library
'Microsoft Scripting Runtime
Dim olApp As Outlook.Application, olMail As Outlook.MailItem
Dim FSObj As Scripting.FileSystemObject, TStream As Scripting.TextStream
Dim rngeSend As Range, strHTMLBody As String
Dim Range1 As Range, Range2 As Range
alertsSheet = ActiveWorkbook.Name
Workbooks(alertsSheet).Activate
Sheets("STATS").Select

Issue with this code is it is selecting wrong source range while generating email.

MsgBox Range1.Address is giving results as "$A$1:$B$1,$BX$1:$CA$1" and
MsgBox Range2.Address is giving results as "$A$32:$B$38,$BX$32:$CA$38" but
MsgBox rngeSend.Address is giving results as "$A$1:$B$38"

And the email generated as output is having only the data from range "$A$1:$B$38". Is there anything wrong with the way I am specifying the source range ??

I need that the code should replace strHTMLBody with the data in Range1 and Range2. I checked the tempsht.htm file and found that this file also have the same wrong data i.e. data from range "$A$1:$B$38"

Needless to specify that I am working with data having few hidden columns and need to consider only visible data.

View 9 Replies View Related

Sending Email Based On Information In Excel Sheet?

Feb 10, 2014

I have a file with the following columns:

ID Number - Name - Email - Comments

Is there a way that for each row and email is sent with the ID number, name and comments?

View 1 Replies View Related

Sending Lotus NOTS Email - Numerous Times

Oct 12, 2004

I am trying to send 7 different emails in this sub, the sendnotes sub is not recognizing my GOLOOP value

As you can see I stole this code from this site. You all are terrific!

Sub SendFiles()
Sheets("Menu").Select
Range("C23").Select
Filename = ActiveCell.Value

GoLoop = "1"
SendNotesMail

GoLoop = "2"
SendNotesMail

GoLoop = "3"
SendNotesMail

GoLoop = "4"
SendNotesMail...................

View 9 Replies View Related

Edit VBA Code For Lotus Note To Display Email Instead Of Sending Out?

May 28, 2013

below is the code i use to create a lotus note email.

i would like it to display my email and send it manually instead of sending out automatically.

' Open and locate current LOTUS NOTES User
Set Session = CreateObject("Notes.NotesSession")
UserName = Session.UserName

[Code].....

View 4 Replies View Related

Excel 2010 :: Sending Email Notification Reminder Based On Dates

Mar 4, 2014

Would like to find a formula or macro which would automatically send an email to let me know when a date entered into the specific cell is coming close to expiration. e.g. if the date 01/05/2014 is entered into a cell i would like an email to be sent to me a month before the date is reached (01/04/2014).

Using Microsoft Excel 2010.

View 10 Replies View Related

Excel 2010 :: Getting Outlook Warning (2010) While Sending Email Through Macro

Mar 25, 2014

I am trying to send bulk emails from my excel 2010 - however I am getting a POP UP. find the screen shot in the enclosed word document So every time a new mail is sent from excel we need to press the button allow Is there a way where I can turn off this warning.

View 6 Replies View Related

Sending Email When Date Reached In Cell Date

May 27, 2014

I have a "to do" spreadsheet as follows.....

Column A - nothing
Column B - Subject (thing to be done)
Column C - not relevant for this
Column D - not relevant for this
Column E - not relevant for this
Column F - importance
Column G - Deadline date

I would simply like excel to send an email to my boss (example@example.com) and if possible myself 5 days before the deadline date: email subject - '5 days left' . Email content - what ever is in the subject column for the relevant duty.

View 3 Replies View Related

Using Code To Email A Sheet But Need To Strip The Code Before Sending

Feb 2, 2009

I am using the code below that I got off of these forums to email a particular sheet in my workbook, but I need to strip all of the VBA code and the command button from the sheet being sent.

View 14 Replies View Related

Send Data From Userform To Worksheet AND Send Userform Fields In Email?

Jul 12, 2014

I have used a database template from this site and changed it to suit my needs but I have a bit of a problem with some of the code. I know how to update the worksheet with the relevant userform text fields and in another project I did I have successfully sent userform text fields in the body of an email.

For this project I want to update the worksheet AND send an email at the same time. However, using the two pieces of code together is causing an error that I can't seem to solve (using my very limited vba knowledge!). The code I am working on is below and I have highlighted the line that is getting the error message. C

VB:
Private Sub cmdSubmit_Click() 'Submit new record
Dim ws As Worksheet, lRow As Long, Str As String [code]....

View 1 Replies View Related

Userform Email Sent Items?

Jul 24, 2012

I've create a userform1 that sends information via email. I have seen userforms that do the same, but that after sending, the sent email doesnt show in the sent items from outlook.

The userform has 2 tectboxes and when the person sends the email the text from the second box comes right after the first one, no space or anything. How do I separate the text by space or paragraph.

View 2 Replies View Related

Email UserForm Macro

Dec 13, 2006

I have cobbled together a userform that works great, it prints, saves and clears as desired. Now i want to email a copy of the userform to a specific email receipiant.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved