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
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top