Create pdf from spreadsheet and email All using code

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219
We use Primopdf to convert a spreadsheet to pdf.
I was wondering if there is a way to write code that will:
1) Current print area go to print to Primopdf
2) enter the name for the file from Cell C6
3) Send this file to Outlook
4) Enter the email address from cell M5

Thank You,
Michael
 

Some videos you may like

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219
This is what I have so far:

Code:
Sub PrintToPrimo()

    Application.ActivePrinter = "PrimoPDF on Ne00:"
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
        "PrimoPDF on Ne00:", Collate:=True
    Application.ActivePrinter = "EPSON Stylus C86 Series on Ne02:"
End Sub

Any ideas to get me further??

Thank You,
Michael
 

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219

ADVERTISEMENT

bump
 

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219

ADVERTISEMENT

Any ideas?
 

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219
Maybe save the file as another name in excel first. Then save as pdf. Then close the primo pdf program somehow. Then open attach the file to an email with that extention????

Any ideas you email gooo rooo's

Michael
 

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219
So far I save the original file, save as a certian file name, then send it to primopdf...
Now how do I email it???


Code:
ActiveWorkbook.Save
    Path = "C:\Emailed Proposals\"
        On Error Resume Next
        ActiveWorkbook.SaveAs Filename:= _
            Path & "Proposal" & _
        Str(Application.Range("O3").Value), FileFormat:=xlNormal _
            , Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
            CreateBackup:=False
        On Error GoTo 0
    Application.ActivePrinter = "PrimoPDF on Ne00:"
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
        "PrimoPDF on Ne00:", Collate:=True
    Application.ActivePrinter = "EPSON Stylus C86 Series on Ne02:"


Michael
 

Watch MrExcel Video

Forum statistics

Threads
1,114,398
Messages
5,547,729
Members
410,810
Latest member
lilwayne
Top