Automatically create a PDF invoice

philfloyduk

Board Regular
Joined
Jan 6, 2011
Messages
82
Hi.

I use an excel spreadsheet with visual basic to manage our domestic appliance repairs and sales business. Currently when a job is completed a paper invoice is generated and an email automatically sent to confirm the details of the repair/ sale delivery. Ideally, the email would have a PDF invoice attached which would save time and money. I have third party PDF software installed, but is there a way to create the file and save it to a specific destination with a specific file name?

I'll be very greatful if anyone can help...

Thanks in advance

Phil
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Never come across Primo PDF so don't know if it can be controlled with VBA. If you're on 2007/10 you should be able to use the code in the link above. If not you might want to have a look at this which uses another free pdf creator.

Dom
 
Upvote 0
I've had a play with the code for PDF creator but I'm getting an error when I try to run it:

"Compile error" then "user defined type not defined"

Most of my system has been created with the help from people on this site, my base knowledge of visual basic is quite poor so this means nothing to me! Is this something simple you can help me with or would I be better off upgrading to 2007 and doing it that way?

Thanks again

Phil
 
Upvote 0
I'd forgotten to check PDFcreator in references....

Appears to work now, just need adjust the code to save the correct thing in the correct place.

Thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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