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
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Domski

Well-known Member
Joined
Jan 18, 2005
Messages
7,292
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
 

philfloyduk

Board Regular
Joined
Jan 6, 2011
Messages
82

ADVERTISEMENT

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
 

philfloyduk

Board Regular
Joined
Jan 6, 2011
Messages
82
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!
 

Watch MrExcel Video

Forum statistics

Threads
1,109,424
Messages
5,528,682
Members
409,830
Latest member
KT50

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top