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

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,026
Messages
5,856,928
Members
431,838
Latest member
mydayisgood

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
Top