PDA

View Full Version : Better to create PDF file from Excel or from Word?



neilsolaris
01-14-2024, 09:16 AM
Hello,
I've developed VBA code in Excel to generate financial documents like invoices and remittance advices in PDF format. The process involves extracting data from one Excel sheet and saving it as a PDF on another sheet, and it functions well.
While the current approach is effective, I'm considering whether utilizing a Word file for creating the PDF might offer advantages. Specifically, I'm wondering if formatting, especially for the header and footer, could be more straightforward in Word. Additionally, handling aspects like font size and design might be more user-friendly in a Word document.
I would appreciate your insights and advice on this matter.
Thank you.

June7
01-14-2024, 12:26 PM
Yes, Word should be more user-friendly for editing output. If user-friendly is a priority, use Word. Then the hard part falls onto you, the developer, to build an effective interface because the more user-friendly, the more code.

neilsolaris
01-14-2024, 12:41 PM
Yes, Word should be more user-friendly for editing output. If user-friendly is a priority, use Word. Then the hard part falls onto you, the developer, to build an effective interface because the more user-friendly, the more code.

Many thanks for your advice. I'll have a go and see how I get on.

June7
01-14-2024, 01:27 PM
Raises question of why using Excel. If this is using Excel to perform like a database, maybe consider migrating to an actual database application like Access.

neilsolaris
01-14-2024, 01:39 PM
Raises question of why using Excel. If this is using Excel to perform like a database, maybe consider migrating to an actual database application like Access.

That's a very good point. I do use Access for the database. But I have written code to link the database with Excel. One of the reason I use Excel for the payment files is because I can copy and paste in the data that the director sends me. And I can perform many other tasks on the data before sending to Access.

June7
01-14-2024, 02:25 PM
So maybe build Access reports? But if you want to allow user to edit report, maybe Access/Word merge?

neilsolaris
01-14-2024, 02:42 PM
So maybe build Access reports? But if you want to allow user to edit report, maybe Access/Word merge?

Oh yes, I did create the Access reports some time ago, but i didn't end up using them in the end. I'd need to also write another program to loop through the reports and send to Outlook as well (I have this code in Excel).

June7
01-14-2024, 09:18 PM
Simple code in Access can also send reports as PDF attached to Outlook email.

I like to avoid inter-app automation when possible. But your situation sounds unique. Glad it works for you.