We help IT Professionals succeed at work.

Split MS Word document in PDF

Errol Farro
Errol Farro asked
on
100 Views
Last Modified: 2018-01-17
Good day,

I have a large MS Word document containing invoices for customers.

Each invoice is one page long and contains a row denoting customer number.

A sample invoice is

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Date:       2017-03-20
Customer number: 586
Invoice number: 25641
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


I would like to use a macro to  automatically create one page for each invoice  in PDF and have the PDF name  be the customer number? Is this possible?
Comment
Watch Question

Paul SauvéRetired
CERTIFIED EXPERT

Commented:
just out of curiosity, does each customer have one, and only one, invoice?

If not, you will overwrite any duplicate invoices!

Author

Commented:
Each customer has one and one invoice only
Paul SauvéRetired
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Developer
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Paul SauvéRetired
CERTIFIED EXPERT

Commented:
@Joe Winograd - the VBA solution link i provided above was written by Graham Skan who, as you well know, posts quite often on Word solutions in EE...
Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

Commented:
We haven't heard from the asker in four weeks, and without feedback, it's impossible to go any further. The Graham Skan solution posted by Paul has value and is worthy of some points, although, as Paul notes, it produces sequential page numbers only, NOT utilizing a value from the document, which is a key requirement for the asker (i.e., Customer Number). The method mentioned in my posts is a proven solution that I have implemented successfully in many custom programs. It is worthy, imo, of being the Accepted Solution and, along with my follow-up post, getting the lion's share of the points.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.