Automatically Attach And Send By E-mail

Jan 16, 2009

In a generated workbook I have 2 e-mail adresses in seperate cells that I'd like the users to be able to easily send the workbook to.

One as the recipient and the other as cc.

So is it possible to either use a link or userform that takes both adresses and automatically attaches this workbook?

View 13 Replies


ADVERTISEMENT

VBA Send Mail With Lotus Notes Attach ONLY With Worksheet Not Workbook

Apr 22, 2013

I am using a version of the following code that sends a mail using Lotus notes and attaches the Workbook - I am wondering if there is anyway I can make it attach the WORKSHEET instead ?

Code:
'The procedure for executing the main task:
Sub SendWithLotus()
Dim noSession As Object, noDatabase As Object, noDocument As Object
Dim obAttachment As Object, EmbedObject As Object
Dim stSubject As Variant, stAttachment As String
Dim vaRecipient As Variant, vaMsg As Variant

[code]...

View 1 Replies View Related

Send Mail On Last Day Of Every Month If Last Day Is Saturday / Sunday Send Mail On Thursday

Mar 11, 2014

I am trying to write a macro to send mail on every Friday and also on last day of every month. If the last day of the month falls on Saturday or Sunday then the macro should mail on Friday. I have written a separate macro to send a mail. I have also written to check day(ie Monday, Tuesday etc) of today. If today is Friday or month end i can send mail. I dont know how to tell the macro to send mail on friday if the month last date is saturday or sunday.

Sub done()
Dim Dat As Date, x As Integer, y As Date, sorry As String
Dim str As String
sorry = "Today is not friday or month end. So i cannot send mails"
str = WeekdayName(Weekday(Now()))

[Code] ........

View 1 Replies View Related

VBA Code To Send Mail Automatically From Outlook

Feb 28, 2014

I need to send a mail on a daily basis from outlook at 6.00 pm.

Containing a shared link to particular mail I'd.

View 10 Replies View Related

Attach Zip File To Mail Item

Aug 7, 2009

I have 3 routines to (1) create an empty zip folder, (2) place a file into the zip folder and (3) create a mail item and attach the zip folder to it.

The zip folder is successfully created. The mail item is also created and displayed, yet the zip file does not get attached.


Option Explicit

Dim FileNameZip

Sub NewZipFile(strFilePath As String)
If Len(Dir(strFilePath)) > 0 Then Kill strFilePath
Open strFilePath For Output As #1
Print #1, Chr$(80) & Chr$(75) & Chr$(5) & Chr$(6) & String(18, 0)
Close #1
End Sub

Sub MakeZipFile(strPath As String)

Dim strFileName As String
Dim objApp As Object

With Application
.EnableCancelKey = xlDisabled
.ScreenUpdating = False.......................

View 9 Replies View Related

VBA To Mail Merge And Attach Hyperlink File

Mar 30, 2012

I have an Excel file that has a persons name in column A, company name in column B, email address in column C and a hyperlink to a specific file to be sent with the email in column D.

I have the code to send the email and it works fine.

I've searched the net for mail merge and hyperlinks and have only become confused.

Here is what I want to do, attach the mail merge created file to the email, then the file associated with the hyperlink, I want to attach the actual file from the hyperlink into the email.

View 1 Replies View Related

Macro - Print Excel Area As PDF And Attach To Mail

Dec 4, 2012

I would like to send a Excel printing area to a mail recipient by using a macro that:

2) Save the printing area as a pdf - file - use a temporary filename
1) Opens MS Outlook mail
3) Attach the temp-file to the mail

View 6 Replies View Related

Mail Macro - Attach Saved PDF File To Email

Nov 21, 2013

I have written a macro but unable to make it work. The macro works but not the way I would like it to.

The macro has to save an excel sheet to a separate folder as a pdf format, a message box should pop up confirming the pdf file and then attach the same saved pdf file to an email.

Now the macro saves the pdf file where I need it to be saved, the msg box pop up and then the pdf file opens up on top of the msg box. If I close the pdf file the msg box which was hidden under the file is now shown. When I click "OK" it goes straight to outlook with the email addresses attached but the saved pdf file is not attached.

I've attached the script.

Sub Macro1()
'
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:UserReportsPDF Reports" & Range("Q3").Value _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True

[Code] ........

View 8 Replies View Related

Auto Email Attach And Send Via Lotus

Feb 10, 2009

I wrote this code years ago to Auto Send Emails from Outlook...

Sub Emailfile()

Dim OutlookApp As Object
Const olMailItem = 0
Set OutlookApp = CreateObject("Outlook.Application")
Dim EmailContent As String
With OutlookApp.CreateItem(olMailItem)
EmailContent = Range("A1").Value
.To = "Test"
.Subject = "LSG Data File"
.Body = EmailContent
.Attachments.Add ("P:MI TeamICCE LEADS EXTRACTSLSGLSG Data File")

End With

End Sub

I can't figure out how to get it working for Lotus notes... So 2 things I guess really... Firstly is it possible? Second: If it is, how can I get it to send say 16 emails each with a specific attachment but the same commentary?

View 9 Replies View Related

Send E-mail

Jan 5, 2007

I have a spread sheet with all vehicle drivers license expiration dates. there are about 300 drivers to track.

What I am looking for is a way to have an E-mail sent to me 30 days prior to the expiration date with that persons name and date of expiration so I can forward the e-mail to his supervisor. And I need this to happen without having to open the file every day. ("Excel" itself will open daily, if that helps. )

Note: I am using me as the first person, actually this will be for our fleet manager.

I have searched Google and this board this whole week and all I can find is links to threads that are dated 2000 thru 2003 that doesn't come close to what I'm looking for.

I'm not sure if any of those links will get me started because they reference Excel 97, 98, & 2000. I am useing XP and we are set up with Outlook.

I guess what I am asking for is, does anybobdy have a link or some what of a code that will work with XP and Outlook, so maybe I can figure out what to do with this?

This is a snippet of what I have as a data base if it will help: ...

View 13 Replies View Related

Send Mail Through VBA

Nov 23, 2009

I have written a code to send e-mail with attachments. However, the mail doesn't include my standard signature.

For I = 2 To 8

Set MItem = OutApp.CreateItem(0)
With MItem
.to = wb.Sheets("Mail").Range("C" & I).Value
.Cc = wb.Sheets("Mail").Range("D" & I).Value
.Bcc = wb.Sheets("Mail").Range("E" & I).Value
.Subject = wb.Sheets("Mail").Range("F" & I).Value
.body = wb.Sheets("Mail").Range("G" & I).Value

For Each fil In fldpdf.Files
LenFilName = Len(wb.Sheets("Mail").Range("B" & I).Value)
If wb.Sheets("Mail").Range("B" & I).Value = Left(fil.Name, LenFilName) Then
MItem.Attachments.Add fldpdf & "" & fil.Name
Exit For
End If
Next fil

.display
End With
Next I

View 14 Replies View Related

Send A Mail

Dec 3, 2009

Step 1 - I have a Read Only excel template which I would fill with the required data.
Step 2 - The data in cell C8 (Text) should be taken as file name and should be Saved as file name.
Step 3 - The above saved as file should be attached to the mail to outlook. I would give the email address manually.

View 9 Replies View Related

Send Mail

Feb 15, 2007

I am using the following macro:

Sub SendActiveWorkbook()
ActiveSheet.SendMail _
Recipients:="Joeb@something.com", _
Subject:="Try Me " & Format( Date, "dd/mmm/yy")
End Sub

Is there another method I can use that will display the Email instead of just sending it?
Is there a method called DisplayMail?

View 4 Replies View Related

Send Mail To All In Range

Jul 23, 2014

I need a macro that will send a separate mail to each person in range (Data sheet), with body from Mail sheet of attached excel workbook.

For attached example it should send 5 mail, that have to be like : test mail.xlsx‎

View 14 Replies View Related

Send Mail Error

Jun 19, 2007

i use Excel 2007.............

The SendMail Method took it from OzGrid web does not work with me . It gives me an error msg : Method send mail of object workbook failed...........

Do i have to refrence 2 particular library. i use OP windos vista (windows mail)

Sub SendActiveWorkbook()
On Error Rsume Next
ActiveWorkbook.SendMail _
Recipients:="dump@ozgrid.com", _
Subject:="Try Me " & Format( Date, "dd/mmm/yy")
On Error Goto 0
End Sub

View 7 Replies View Related

Send Mail To Filtered People?

Feb 5, 2012

I have an excel workbook which is a result of a sports survey I conducted. It basically shows who likes which sport, what level they're at, preferred time of play, etc, and their email address.

A colleague has created a type of form (using formulas, not VBA) wherein you select your criteria (Sport, Gender, Level etc) and it displays the matching names.

What I'd like is to be able to select, via a check box or similar, 1 or more names from the list of results for that sport, click a button, and their addresses automatically open in a new Outlook mail window for the person to send a mail to those people.

View 4 Replies View Related

VBA Send Lotus Mail From Different Address

Oct 9, 2012

HTML Code:
'The procedure for executing the main task:
Sub Test2()
Dim noSession As Object, noDatabase As Object, noDocument As Object

[Code]....

However I now have a requirement to send it from my Team mailbox - which I have access to

View 1 Replies View Related

Pop Up Or Auto Send E-mail If Value Is True

Oct 7, 2009

is it possible for Excel to generate a pop-up or auto send an e-mail when a value is true? I'm wanting to be notified on a lengthy spreadsheet either by e-mail or by pop-up when an item is within 90 days of its due date.

Something like:

IF(H2-90>=TODAY,SEND E-mail/generate pop-up code,"")

View 9 Replies View Related

Enable Macro Automatically - Then Send Send Email

Sep 7, 2008

I used Scheduled Task to set up my spreadsheet to open daily. I have the code with assistance to pull out the due date items and place them into an email.

I have come across XLSTART/AUTOEXEC/ACTIVATE...ETC...
But cannot figure out the code that will automatically "enabling macro" once Scheduled Task opens the spreadsheet?

Then once the macro runs, the email with the due dates, how can this auto send without user interaction?
(currently I would have to hit send)

I am trying to make the process totally automated to open the spreadsheet at a certain time, send the email with due dates and close the spreadsheet.

Following code in ThisWorkbook--

Private Sub Workbook_Open()
Check_Date_Send_Mail
End Sub
Code in Module1--

Option Explicit
Sub Check_Date_Send_Mail()
Dim wbBook As Workbook
Dim wsSheet As Worksheet
Dim rnDate As Range, rnValue As Range
Dim stAddress As String, stMsg As String
Dim stRecipient As String, stSubject As String
Dim stPost As String
Set wbBook = ThisWorkbook
Set wsSheet = wbBook.Worksheets("Sheet1")
With wsSheet
Set rnDate = .Range("d2:t23")
End With

View 9 Replies View Related

Unable To Send Mail Using CDO (remote Server)

Feb 11, 2009

I have CDO set up on in an excel workbook contained on our network. We have been using the following code for well over a year. It works flawlessly on 12 of our 13 computers. I can send mail through Excel using the following code on my computer. But not on a particular computer. The user at that particular computer can't send mail through the CDO code from her computer but can from other computers.
This problem is definitely isolated to a computer. I had tech support un-install office, use a cleaning tool, then re-install office. The problem persists. Is there a particular setting on this computer that needs to be set that I am unaware of?
Here is the code...

View 3 Replies View Related

Send Mail With Attachment Of Csv With Unique Number

Jan 13, 2010

The file which I want to send as a CSV needs to be named in a certain way. It would be the contents of cell A2, then the date it was sent and the time. Here is my current code. How can I get it to pick up data from a cell and then add it to the list. Also, the list has to be one string, so for example, 23459 Cell A2, 1310 Date and 192859 would be time. So the renamed file would be named 234591310192859. Here is my code which may make what I'm saying a bit more into a bit more sense. Currently the name which is outputted is 'Name of Spreadsheet.xls 13-Jan-10 19-31-59'.

View 6 Replies View Related

Send Mail By Click On Command Button

Sep 8, 2009

I have a command button in my excel sheet, if I or my team person clicks on it, the same file has to go to my manager's mail ID from my or my team person's (who clicks) outlook.

View 9 Replies View Related

Timesheet: Send Out A Mail Template Everyweek To All The Department

May 23, 2006

I send out a mail template everyweek to all the dept. employees using outlook. I attach a excel sheet to the mail so the employees can type in their hours and then sent it back. Then i go in manually each sheet and copy the info in THE timesheet excel sheet and sent it to the HR. Any easy way automate this process? What id like is to send a mai lcontaining the excel sheet, the emlpoyees fill it and the data tranfers to a excel sheet...

View 2 Replies View Related

Search For File Locate User Send Mail

May 11, 2007

I need to build vb that will move threw a folder earch files this source folder will be s:dc eports there will be multiple types of files. If the file ends with .ERR and the file size is > 0.1 KB THEN take file and open it then find the user id this will be 6 didgets .. this then needs to be located(if u look at attached spreadsheet “CTR208088.ERR” and go too column “AB” you will see “FA2 INPUT BY:311752 CODE) and then take and match THIS CODE (311752) to a workbook called “cashfrontieradmin11” there will be a “user name” column ‘A” in a “input names” tab and next to it column “B” “ full name” it will then register name and attach an email to user saying they have error “processing idx file into hiport”.

It will then attach error file to email and send to appropriate user(that is written in error log ) Example file is here ..the only issue I guess is being able to read the character placing(user id) in the message file..to pick this up and map back to admin file I will attach both files

View 5 Replies View Related

Send Mail Through Outlook To Team Members For Their Pending Trainings?

Jan 5, 2014

I am using an excel where I want to send mail to my team members for their trainings pendings,

Few trainings are once in a year and few traings are monthly.

View 1 Replies View Related

Send Mail On Outlook Based On Number Of Days Left To Deadline?

Jun 28, 2014

I have an excel sheet with one column containing deadline dates. I want the excel sheet to take each day's date and subtract it from the deadline date. If number of days left is less than 60. Send a mail via outlook to the email against that column.

View 3 Replies View Related

Mail Merge In Word And Then Copy / Paste Into Outlook Message And Send It Out

Jul 6, 2012

I have a spreadsheet with client names, email addresses, and appointment info. I export a .csv file from outlook. I have been doing a mail merge in word and then coping and pasting into an Outlook message and sending it out. I did some reseach and found code that I have made changes to. Of course they it doesn't work. I can't get anything to happen when I run this code.

Code:
Sub Qualls_Email_Confirms()

Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range

Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")

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

View 3 Replies View Related

Macro To Send Mail Via Lotus Notes Diff Recipients With Range?

May 22, 2013

Am trying for a code which will send mail to recipients mentioned in column A [to] Coulmn B [CC] & formatted range should be pasted as body of email lets say C:F. Each time formatted header should remain same is it will contain column heading. I have a code which sends mail to specified recipients mentioned in code .

Code:

Sub Send_Formatted_Range_Data() Dim oWorkSpace As Object, oUIDoc As Object Dim rnBody As Range Dim lnRetVal As Long Dim WB6 As Workbook Set WB6 = Application.Workbooks.Open("C:TESTDaily_BKG.XLS") Const stTo As String =

[Code]....

View 3 Replies View Related

Excel 2010 :: Macro To Send Email Now Fails With Runtime Error 1004 - Mail System Failure

Aug 23, 2012

I've been using a macro successfully for the last couple of years, but this morning when I went to use it, it decided to fail. I have a workbook which contains various spreadsheets. The macro that has failed performs the following tasks:

1. It copies a list of email addresss from an external workbook to a sheet in the current workbook (still works)
2. It copies the referral sheet I want to send to a new file, and saves it with an appropriate filename to an appropriate folder (still works)
3. The macro then creates an email with a standard subject line, attaches the new worksheet and emails it to each of the addresses as above (broken)

The error message is from Microsoft Visual Basic. "Run-time error '1004': Mail system failure. Check your mail installation."

I'm guessing there is a setting somewhere in Excel that has changed as part of an update.

I've been through a number of the options in the developer menu to remove any obvious restrictions (& reopened excel afterwards), but so far it hasn't resolved the problem.

For what it's worth, here is the macro code.

With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Run "PullInSheet1"
Dim oldbook As String

[Code] .......

In case you're wondering about the pullinsheet code, I'll add it below - but I probably grabbed it from this forum a couple of years ago (like some of the above) & just made some changes.

Code:
Sub PullInSheet1()
Dim AreaAddress As String
'''''' Sheet11.UsedRange.Clear
Dim ClRange As String
ClRange = "= 'L:ADMINEMPLOY SERVICES" _

[Code] ........

There are a couple of things I've wanted to do to improve the macro, but I couldn't justify the need to spend time working it out (since writing spreadsheets isn't really my job). Since it's broken at the moment, I can...

1. I'd like to create a subject line that reflects the name of the person being referred. For some reason though, anything other than text in the cell reference caused an error for me. eg, I tried using concatenate to create my subject line, but it didn't work.

2. I'd like the copied sheet to contain all of the formatting of the original sheet. Presumably there is a paste option that will do this and I just picked the wrong one.

The mailsystem we use is Groupwise 8. I couldn't find any settings in that program that have been changed, or that I could change.

I should change the extension from xls to xlsx in the code since I'm using Excel 2010 (but changing it doesn't fix the problem).

View 4 Replies View Related

Excel 2010 :: Email Automatically Loads Outlook Mail?

Jan 24, 2012

what is the proper terminology for the Outlook "Thing" that opens up in excel (shown below)? Is it simply a toolbar? Add-in?

Second question, I have a excel file that automatically loads the outlook "Toolbar" each time it is opened.

The file was made in 2010 and password protected and locked, sent to a worker who edited the appropriate fields and saved, and then they sent the file back to me (2003 Format). Now this file automatically loads the outlook toolbar. I am trying to trouble shoot so what would cause this behavior?

View 4 Replies View Related







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