Excel 2007 :: Save Files XLS In Macro Workbook And Send Email

Sep 3, 2012

I am using 2007. This may be something simple but I can't seem to find a solution to this, I have an excel macro enabled workbook which produces a daily report the final task is to save and send an email but I need the file to save as an xls rather than xlsx as some of the recipients are unable to open the file here is the code used for the tasks in the

workbook:Sub Step1_Refresh()
'
' Step1_Refresh Macro
'
'
ActiveWorkbook.RefreshAll
End Sub
Sub step2_save_close()

[Code] ........

View 1 Replies


ADVERTISEMENT

Excel 2007 :: Save Files XLS In Macro Workbook And Send Email?

Sep 3, 2012

I am using 2007, I have an excel macro enabled workbook which produces a daily report the final task is to save and send an email but I need the file to save as an xls rather than xlsx as some of the recipients are unable to open the file.

Here is the code used for the tasks in the:

workbook:Sub Step1_Refresh()
'
' Step1_Refresh Macro
'
'

[Code]....

View 7 Replies View Related

Excel 2007 :: Salary Payslip Save As PDF And Automatically Send Email Using Outlook

Sep 13, 2013

I am using Excel 2007 and have to send monthly payslips to respective email ids. I have the Name and Email ids in Sheet 2 Range B1:C59 , and employee codes in A1:A59. And in Sheet 1 i have the Payslip format which was automatically displayed when i select the employee code from drop down list in the cell E7 in sheet 1.

Every time i manually save the files as PDF and send to their Emails. I want the out put as whenever i select the employee code from drop down list , it should automatically save as PDF with Name of that employee ( Name of the employee is located in B1:B59 in Sheet 2 ) and attachment should automatically go to that employee's email Id.

View 2 Replies View Related

Excel 2007 :: Send Email With Outlook Using VBA?

Aug 4, 2014

I have my data in column A as Reminder Description and in column B as Due Date.

I was wishing to send an email using excel 2007 with outlook using excel vba... I want to send email 2 days before due dates and also i want excel to type in when the email was sent... Is this possible....???

A B C D E
Reminder Description Due Date Send Email1 Send Email2 Send Email3
Insurance due date is 06/08/14 06/08/14 04/08/14 05/08/14 06/08/14

Also can this vba code be executed whenever workbook opens....???

View 1 Replies View Related

Excel 2007 :: Send Email Based On Cell Value?

Feb 21, 2012

send the sheet to an email address based on the email address in a cell.

The cell populates from a dropdown list a user selects.

The email will be sent to myself, and one authoriser. If a second authoriser is required then the first authoriser will send this on. I'm trying to make this simple, so when a user clicks a 'send' button on the form this happens automatically.

The code I'm using to send to myself is

Application.Dialogs(xlDialogSendMail).Show arg1:="bibbyd01@myemailaddress.com", _
arg2:="Auth Details"

Nice and easy. So how do I replace that email addres with the email address in a cell? I assume I have to create a DIM to hold the data, then use it to populate the address field?

I'm using excel 2007 if it makes any difference.

View 1 Replies View Related

Send Excel Workbook By Email

Oct 10, 2011

I have a macro that will send an excel workbook by email when an image is 'Clicked on' however, I need the attachment to be renamed as the text used in cell B9 of this worksheet.

So far I have the macro below which auto populates the 'email to' address and the 'subject' line which is great but how do I get to rename the attachment?

Sub SendIt()
Application.Dialogs(xlDialogSendMail).Show
arg1:="test@test.com", _ arg2:="test 1" End Sub

View 2 Replies View Related

Excel 2010 :: Send Workbook In Email With Subject And Message?

Nov 29, 2012

I did this 10 years ago so I admit I am rusty at this but here are what I had in my notes that worked with Excel XP. I am currently using Excel 2010

With ThisWorkbook
.HasRoutingSlip = True
With .RoutingSlip

[Code]....

The last line will send the workbook but I need a Subject and Message to go with it.

View 9 Replies View Related

Excel 2007 :: VBA To Save And Close All Open Workbooks Except Macro Workbook?

Mar 8, 2013

I have a macro that opens all workbooks from one directory and runs a macro for each workbook to clean up the data. I cannot figure out how to take all those open workbooks and save them to another directory and close the workbook. Also, I do not want the macro workbook (xlsm) to save. I only want it to close. I am working in 2007 Excel.

View 8 Replies View Related

Macro To Send Email In Excel

Mar 20, 2014

Im looking to create a reporting mechanism for a shared worksheet that im putting together.

I am looking to create some that will automatically create an email (either through outlook, or using a userform) and automatically populate with my email address in the 'To' section and automatically populate the subject with 'Error/Info Change'. The user can then populate the main email body with whatever they want to notify me of.

Im then hoping that the code can be run through a macro which has been added to the quick access toolbar.

View 2 Replies View Related

Macro To Send Email With Active Excel Sheet Attached

May 21, 2014

How to modify the below vba code? It sends an email with an attachment right away after pressing the macro button. I would like the user to see the email in outlook before it gets send... and then press 'send' in Outlook .....

Sub Mail_ActiveSheet()
'Working in Excel 2000-2013
'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
Dim FileExtStr As String
Dim FileFormatNum As Long

[Code] .....

View 1 Replies View Related

Macro To Send Email From Excel Through Outlook Basis Of Different Conditions

Aug 11, 2014

creating a macro to send email from excel through Outlook basis of different conditions and with embedded text and subject.

There 2 workbooks attached with this post. The workbook named "Data" contains the data and the workbook named "Emails" contains the Dealer Names (in Column A), the Email ids of the contact person (Column B, C and D), the subject (in Column E) and mail content (in Column F).

I need a Macro which first split the data basis of "Dealer Name" Column F into multiple sheets from "Data" sheet. Now, each sheet will contain only the Individual dealer's data. The data whose ageing is 2 or more than 2 days (in Column H) is highlighted in yellow.

Now, I need to send a separate email to dealers with their data details from range A to F (including headers) as an embedded text with subject and mail content which is present in "Emails" workbook.

Now the twist is, if any dealer having the Aging value in Column H is 2 or more than 2 days (highlighted in yellow color) than the email should be sent in CC to Column D email ids but if there is no Aging more than 2 days than the email should be sent in CC to Column C email ids.

"To" email ids (in Column B), subject (in Column E) and mail body (in Column F) will remain same in both conditions. Column A is containing the Dealer Names through which macro will identify the email ids.

View 4 Replies View Related

Excel Macro To Send Email Through Outlook When Expiry Nearing

Aug 15, 2014

I am trying to make an inventory list with the expiry date of various chemicals. There is a user form which I have not coded yet. What I hope to do is have the macro send an email regarding which chemical is expiring within 90 days to a group of people.

View 3 Replies View Related

How To Send Excel Invoice To Email Address Using Macro Code

Jan 22, 2013

I have a template invoice in excel. What I want is a macro code that when it is run the open template invoice should be sent to a specific email address !!

View 5 Replies View Related

How To Send Files Via FTP With Excel Macro

Sep 22, 2012

I want to send via FTP to a linux server the following.

1- All files that are named checked.XXX.YY.mtc to path /var/docs
2- All files where the name begins with checked.conf to path /etc

PD: I have the IP address, user and password of the server.

View 1 Replies View Related

Save As PDF And Send Via Email

May 8, 2009

I have the code that saves it a a PDF, but a nicety would be to email it as well: -

inputfileSaveName = Application.GetSaveAsFilename(fileFilter:="PDF Files (*.pdf), *.pdf")

'export it - works just fine!
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=filesavename, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=False

'OK up to here!

Application.Dialogs(xlDialogSendMail).Show arg1:="", _
arg2:=EmailTitle, arg3:=Receipt

It now sends the "workbook" as an attachment and not the PDF..

How do I remove the attachment and attach the PDF Ive just created?

View 3 Replies View Related

Excel 2007 :: (Save Files In Format) Settings Keeps Changing

Sep 28, 2011

I am having trouble getting Excel 2007 on my work computer to save as .xlsx by default.

I have opened the Office Button > Excel Options > Save > Save files in this format and selected "Excel Workbook (*.xlsx)," and if I save as before closing Excel then it works perfect and saves the file as .xlsx. However if I close Excel, re-open it later and save a new file the default "Save as type:" is "Excel 97-2003 Workbook (*.xls)" and if I open the save options again the "Save files in this format" option is reverted back to "Excel 97-2003 Workbook (*.xls)."

I have finally overcome the [Compatibility Mode] issue by saving a file named "Book.xltx" (not "Book1.xltx") in the two default locations "C:Program FilesMicrosoft OfficeOffice12XLSTART" and "D:Documents and SettingsusernameApplication DataMicrosoftExcelXLSTART" (we use the D: drive at work for personal files). I thought this would solve the save as issue but it hasn't. I have also changed the "Save files in this format" before saving the .xltx files in the locations to apply the settings to those specific files but that hasn't worked.

It is on my work computer so I am limited in what settings I can change because they have them pretty well locked down.

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

How To Send Email To Different Persons With Different Information / Files

Sep 14, 2013

I am running a small size company, creating several excel works to automate the order/ shipment / invoice work. Try very hard to know how send invoice / AR summary email to different customers.

View 2 Replies View Related

Save Copy As Then Send As Email Attachment

Apr 15, 2014

I've been searching for a way to save a copy of a workbook as an .xlsx by bringing up the save as dialogue box so the user can name and choose the location and then to open a new email with the send as attachment function so the copy can be sent to user defined recipients.

Any similar requests that I've seen are asking for a specific file name and specific directory.

View 2 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 2007 :: Macro To Send File As PDF From Outlook To Multiple Users?

May 13, 2013

I currently have a spreadsheet setup on a Macro to send & distribute a message from an 2007 Excel file to multiple users through Microsoft Outlook 2007. It is currently setup to send as an attachment. I need to find a way to have this file be sent as a PDF file. I know you can save Excel as PDF's so there must be a way to send them & attach them to as a PDF.

View 3 Replies View Related

Excel Macro For Attaching Multiple Files To One Email

Jan 15, 2014

I am currently attempting to use an excel macro to allow me to send a list of files to one person. I have managed to create a dynamic list where one sheet of the workbook has the list of files and checkboxes, and as certain ones are selected they appear in a list on the 'front sheet' of my workbook, which has the button to send the email.

My front sheet is set up in a way that in cell B3 I have the desired email address, B4 contains the subject and from B5 to B30 I have the list of selected attachments (although the length of the list obviously varies depending on the amount of files selected, when all are selected the list extends to B30).

I have the below vba code that allows me to create an email with the address and subject and attaches the file address from cell B5, but I would like to attach all the files in the list and am struggling to change the code to do so.

Code:
Sub CreateMail()

Dim objOutlook As Object
Dim objMail As Object
Dim rngTo As Range
Dim rngSubject As Range
Dim rngAttach As Range

Set objOutlook = CreateObject("Outlook.Application")

[Code] ........

I can add more by creating new ranges (rngAttach1, rngAttach2, rngAttach3 etc) and setting these to their respective locations but if, for example, only two files are selected, the list only covers cells B5 and B6, so when the macro looks up the file directory in B7 (rngAttach3) it returns an error because obviously there is nothing for it to find.

I have attempted to compile a loop and change the code to the version shown below but am having no luck.

Code:
Sub CreateMail()

Dim objOutlook As Object
Dim objMail As Object
Dim rngTo As Range
Dim rngSubject As Variant
Dim rngAttach As String
Dim iLoop As Long

[Code] ....

View 4 Replies View Related

Excel 2007 :: Protecting Worksheet / Workbook On Save?

Nov 24, 2011

Intention is to (automatically) fully protect each completed worksheet/workbook on "save"/"save as" in MS Excel 2007... Is this possible by means of a macro? Which one? Saving in a ".xlsm" format is required?

View 9 Replies View Related

Send Email Before Workbook Close?

Jul 2, 2014

Does anyone know if its possible to run a macro to send email before the workbook is closed?
I know theres a code for it

Private Sub Workbook_BeforeClose(Cancel As Boolean)

Right now, it seems like my macro is send email macro is not running when i close the workbook.

View 2 Replies View Related

Send Workbook Via Email To Multiple Recipients

Nov 23, 2008

I am using the following code to try and send a workbook via attachment to multiple email recipients however it will not work. If I only include one recipient then the code runs fine however it crashes when there is more than one.

View 8 Replies View Related

Macro To Save Excel Files As PDF With Password

Mar 3, 2014

I am looking to convert 2000 excel files in PDF and include a unique password (password ideally will be their employee number). Is this possible using VBA, I am thinking that if I have a seperate excel file with the name of each file and the applicable password it might be but not sure?

View 3 Replies View Related

Excel 2007 :: Copy / Paste All Rows For Each Unique Name And Save In Separate Workbook

Dec 11, 2011

I am using Excel 2007

I have a spreadsheet with 1,000 rows in multiple columns

In column "B" i have 8 unique names.

What I am trying to work out is to copy and paste all the rows for each unique name and save in a separate workbook named as the unique name.

View 2 Replies View Related

Excel 2007 :: Generate Single Sheet Workbook And Save To Sharepoint Site

Jan 4, 2012

Automating Excel from Access, I'm attempting to generate a single sheet workbook and save to a Sharepoint site. This process works fine on my machine (XL2007, XP), but on a coworkers computer (XL2003, XP), the code throws a 1004 error on the save as line. However, the really odd thing is that stepping through the code doesn't throw an error on the coworkers machine.

Here's the sub being ran; the line it errors out on is the first branch in the .saveas block.

Code:
Private Const csSharePointSaveAs = "\sharepoint-us.mycompany.comsitesfinance adminlah blahlah-blahCustomer Publication Tracking.xls"

Private Sub PublishXLtoMOSS()
Dim objXL As Excel.Application 'Object
Dim wb As Excel.workbook 'Object
Dim ws As Excel.Worksheet 'Object
Dim rs As DAO.Recordset
Dim i As Long

'Set objXL = CreateObject("Excel.Application")

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

View 1 Replies View Related

Using Excel To Send And Delete Email VBA?

Jan 6, 2012

I'm using some code to send an email from Excel to Outlook via VBA, I of course got it from [URL]

I'm using it to send a mass email to some of our customers, it uses information from a sheet and then attach's some PDF files totalling 5MB.

The trouble I'm having is that I can send around 16 emails and then the mailbox reaches it's limit and it just comes to a halt until I can empty the 'Sent Items' and then the 'Deleted Items' folder.

I've spoke to the tech guys here at work about it and they seem to be doing a lot of shaking their heads about increasing the size of the mailbox () so I'm wondering if I can the routine automatically delete the email once it's been sent... ?

Here's the code I've got dealing with the mail;

Code:
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

[Code].....

View 1 Replies View Related

VBA Code To Send / Email From Excel

Feb 3, 2012

I have a macro that is currently set up to save a draft of my email from Excel. Feedback I've received from my peers is that they would like this macro to Open the drafted email it creates instead of the user having to navigate to the draft folder to open it up.

Is there a part of the code below I can modify so this happens?

//Sub Mail_workbook_Outlook_1()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

[Code]....

View 1 Replies View Related







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