VBA To Print Active Sheet To PDF Auto Save In Specific Folder Then Mail Using Outlook
Jul 17, 2014
How do I write a vba code to print active sheet to pdf, auto save in specific folder then mail using outlook
im using 'Nitro PDF Creator'
also id like it to automatically save the pdf as the same file name as the active worksheet and also auto enter the following when opening the email server:-
Address: Cell D18
Subject: Cell D21
Email body:
find attached quotation
Optional installation available on request
View 2 Replies
ADVERTISEMENT
Aug 28, 2012
I need a macro which will copy an image from a folder location and paste it into a mail (outlook).
I don't want the image to be added as an attachment.
View 9 Replies
View Related
Dec 19, 2008
i want to create folder depending on cell value a1 select data from a1 to h20 save this as "b1 value.xls" my saving directory is c:
eports"a1value" ....
View 9 Replies
View Related
Feb 23, 2014
I was able to create a macro that saves an email attachment based on the subject and then move it to another folder. I would like changing it to do the same thing only based one the sender’s email. I have it currently reading the save path and subject from the Excel worksheet.
[Code] .....
View 2 Replies
View Related
May 20, 2008
http://www.excelforum.com/excel-programming/641622-auto-save-to-a-file-via-macro-or-program.html
i have a macro that saves specifically to a folder
that contains a job number and customer name
ie \serverjob_fileJ5212 - Sumnerdocs
i have encountered a problem where the name is spelt differently
the folder is actually called j5212 - sumner
but if i type j5212 - summer it wont obviously save and comes up with an error because of the spelling mistake
despite my folder being as it is
is there anyway i can get this to save to the folder with just the j5212??
View 14 Replies
View Related
Jul 11, 2007
I have code to print an invoice to PDF, here is the printing part.
Sub Macro3()
Application.ActivePrinter = "Adobe PDF on Ne05:"
ActiveWindow.Worksheets("Sheet1").PrintOut From:=1, To:=1, Copies:=1, ActivePrinter:="Adobe PDF on Ne05:", Collate:=True
End Sub
When the code runs a box appears asking the user to save the PDF as a filename and the user never saves the correct invoice filename. Is there a way to suprees the box and automatically save as a predetermined name say "Invoice 0012 27-01-01"
View 8 Replies
View Related
Apr 29, 2014
Looking for VBA code to automatically save an excel file as an .xlsx format, and saving to a specific folder: C:UserswolfmDesktopLoad Lists
I have been using the attached code, but it's not working. It saves to the desktop, not the folder. Also, when it creates the file name based on sFile = ActiveSheet.Range("C4").Value & ".xlsx", it adds wierd things to the file name. I want the file name to be simply the value in C4.
View 2 Replies
View Related
Jun 16, 2009
I have found out how I save my document as workbook name and date, but now I want to add the saved file to a specific folder instead of just in my dokument folder. This is what I have done so far (SAVING FILE IN A SPECIFIC FOLDER):
View 5 Replies
View Related
Dec 7, 2012
I have a folder called "Report" at C: and inside this folder there are 12 folder named from 1 to 12 ("1","2",...,"12")
I need a macro to save my workbook as a file in C:Report(one of these folders depending on the month of a certain cell)
i.e. if the date in this cell is 8/12/2012 .. then save my file in C:Report12*.xlsm
This is the code i use
Code:
Private Sub CommandButton1_Click()
Dim fname As String
fname = Format$(Range("S8"), "dd-mm-yyyy")
On Error Resume Next
ActiveWorkbook.SaveAs Filename:="C:Reort" & fname & ".xlsm"
End Sub
So what i need now is what to insert after C:Report
View 9 Replies
View Related
Jan 10, 2007
I'm trying to use the code below to paste special my first sheet to remove the formulas, then delete all other worksheets then save as a reference number (which is linked to the worksheet im saving) but I also need it to save in a specific folder.
Sub SaveAsCell()
ActiveWorkbook.Save
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("Cat Nos").Visible = True
Sheets("Supplier Info").Visible = True
Sheets("Codes").Visible = True
Sheets("Buyers").Visible = True.................................
View 3 Replies
View Related
Dec 4, 2007
I recorded a macro to save a workbook to a specific folder using the current file name. However, I've tried to remove the absolute reference to a specific filename but it is not working for me. Am I close?
ActiveWorkbook.SaveAs Filename:= _
"H:Files and DocumentsPROJECTSSR 2 SS Phase Two Component ReliabilityWinTrac Files xt_conversionsexcel_version" & SheetName _
, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
View 2 Replies
View Related
Sep 15, 2014
Code to copy the sheet that get selected by if-then-elseif statement and paste in a new workbook, save the workbook as temp, email it and delete it,
sub sending_mail
Dim OutApp As Object
Dim OutMail As Object
Dim rng As Range
Dim DataWB As Worksheet
[Code] ......
View 2 Replies
View Related
Jan 25, 2014
So, I've been trying to work out a distribution list. So far, my research has shown me how to code to be able to send a message through outlook by typing content into a spreadsheet, but I'm trying to find code that will simply open a new message window in outlook. I don't want to send it through excel as I've found to be possible b/c outlook is asking for permission to send to each recipient on the mailing list and we have a fairly large staff here, so clicking that button 20 times to allow the email to go through is more labor intensive than just verifying who's on the distribution list and sending.
View 3 Replies
View Related
Aug 3, 2012
Is there a way to include my Outlook email signature when using the following macro to send an email?
Code:
Sub EmailReport()
Dim OutApp As Object
Dim OutMail As Object
[Code].....
View 6 Replies
View Related
Mar 24, 2013
Is there a code I can put on commandbutton to show Print Preview on active sheet in excel 2010 ?
View 3 Replies
View Related
Jul 6, 2013
I'm having a little trouble making this code work correctly. This macro, Once finished, is connected to a (Save) command button. Here is what is suppose to happen, First thing to remember is another sheet (Sheet1) has been populated with various information which is used as a receipt. The information came from sheet2. I need to copy sheet1 just as it is, format included, create a new empty sheet, paste the information into the new sheet, name the new sheet with the values from cells in sheet2, E3, D3, and the date formatted as the month and year only. Then I need to create a folder in the my documents folder named from the values from sheet2, E3, D3, and todays date with the current time. If the folder already exists, then I just need it to change to that folder, and save the newly created worksheet (as named above) into that folder. After the save is executed, I need to delete that new sheet from the current workbook. Then I need to return to sheet2 to the last active cell and run the last few lines of code which collects the value of the cell 1 to the right of the active cell and transfers it to the cell 1 to the left of the active cell.
VB:
Public Sub Button11_Click()
Dim wShell, fso, strFldr, xdir As String
Dim newbal As String
[Code].....
View 9 Replies
View Related
Nov 3, 2008
Copy the active sheet that is open in a work book and save it to another file with the date in the name? For example Report_11-03-08.xls
The only problem I see with this. How could I also make it append a letter to report if the file already exits Example saved as
Report1_11-03-08.xls. Then just continue incrementing.
Sub CopySave()
Application.ScreenUpdating = False
ActiveSheet.Copy
Application.DisplayAlerts = False
ActiveSheet.SaveAs Filename:=ThisWorkbook.Path & "/" & "Report_" & Format(Date, "mm_dd_yy") & ".xls"
ActiveWorkbook.Close
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
View 5 Replies
View Related
May 17, 2005
How can I save only the active sheet of a workbook in VBA?
View 9 Replies
View Related
Jan 17, 2013
I need to send 25 mails on daily basis to my client. All fields in mail are common except recipient and attachments. Every mail has 3 excel attchments. So i created a macro in excel which sends mail as per my requirement but picks up only one attachment from the path i have mentioned in the vb code. Whole macro is running perfectly. I just want to know what modification i should do in that code to attach more than one excel file to the mail from the path i have given. Below is the code:
Sub macro1()
Dim sFolder As String
Dim Folder As Object
Dim file As Object
Dim fso As Object
[Code]....
View 1 Replies
View Related
Jul 1, 2014
I have set of send mail Performance from excel through outlook ... I have facing error like
"Run-Time error '-2147467259 (80004005)':
Array lower bound must be zero.
Attachment :
rte.jpg
RuntimeError.xlsb
View 4 Replies
View Related
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
Feb 26, 2009
I am trying to write a macro that publishes the print area as a non-interactive web-page to a file that sits in the same location as the spreadsheet from which the macro is being run.
I am using the the following macro:
View 14 Replies
View Related
Apr 25, 2013
I have created a simple Macro to change the Tab color of a worksheet based on the value of a specific cell. This spreadsheet has many worksheets (>20) and this sheet I have used as an error detection. If it see's an error on some other sheet, this cell will change from "OK" to "Error". The Macro then changes the Worksheet tab color to Red. The Macro works fine but ONLY if that worksheet is the open/active sheet (which kind of defeats the purpose). How can I trigger this Macro when this Worksheet is not the active sheet? Here is a listing of the Macro
Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCell As Range
Set KeyCell = Range("A11")
If KeyCell.Value = "OK" Then
Me.Tab.ColorIndex = 6 ' Yellow
Else
Me.Tab.ColorIndex = 3 ' Red
End If
End Sub
View 3 Replies
View Related
May 5, 2014
I got a workbook with a database in sheet1. I filter that database and copy - paste values the results to a new sheet. Next, I save that new sheet to somewhere on my drive. The thing is that I want to go back to my original database, and continue filtering. But that workbook is no longer the "active workbook". This is how it works:
sub DifferentClients()
For Each FieldWorkBy In Array("Client1, Client2,...")
MyDatabase.AutoFilter Field:=CountryCode, Criteria1:=Array( _
[Code]....
View 3 Replies
View Related
Mar 31, 2008
I would like a macro that will go to a fixed sheet, copy the format, go back to the previous sheet and paste the format. My problems arise going back to the previously activated sheet rather than just a fixed sheet.
View 2 Replies
View Related
May 18, 2007
Anyway to use VBA to print an Excel sheet with the Microsoft Document Image Writer to a specified folder automatically? I understand and use automatic printing all the time, but I don't know how to use VBA to specify the filename and folder once it prints with the Document Image Writer.
Is it possible to do?
View 9 Replies
View Related
Nov 26, 2012
I want to search for a specific text in body of an outlook mail attachment,I am able to search for the string in the body of the mail,I also get mails with mail as an attachment i want to search for the string in the attachment as well.
View 6 Replies
View Related
Jul 1, 2014
I have created an excel file that generate outlook emails ( using Ron de Bruin VB codes)
I have a one more task to do with that.
I have list of contents in a combo box... those contents are short form of the main contents that i want to be in the mail.
if i select an content from the combo box and click mail macro it should open an mail with brief contents corresponding to the short content i selected in combo box.
View 10 Replies
View Related
Jan 19, 2014
a macro to copy the contents of a selected range in an excel table to an outlook mail generated using a macro.
The only thing is that I need the grid along with the formatting of the selected Excel range.
View 3 Replies
View Related
Aug 23, 2007
What is the code to automatically save the new template worksheet in a folder and name defined in a couple of cells.
The folder name will be always be: "Q:AssetsCustomersfolder name"
I need the folder name to come from cell C3 on the spreadsheet and the filename to come from cell R3.
View 2 Replies
View Related