Avatar of Errol Farro
Errol FarroFlag for Aruba

asked on 

Split MS Word document in PDF

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?
PDFMicrosoft Word

Avatar of undefined
Last Comment
Joe Winograd
Avatar of Paul Sauvé
Paul Sauvé
Flag of Canada image

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

If not, you will overwrite any duplicate invoices!
Avatar of Errol Farro
Errol Farro
Flag of Aruba image

ASKER

Each customer has one and one invoice only
SOLUTION
Avatar of Paul Sauvé
Paul Sauvé
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Paul Sauvé
Paul Sauvé
Flag of Canada image

@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...
SOLUTION
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

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.
Microsoft Word
Microsoft Word

Microsoft Word is a commercial document editing program that is part of the Microsoft Office suite. It features numerous text-editing tools for creating richly formatted documents, along with tools for the use of macros in Word documents. Word's native file formats are denoted either by a .doc or .docx file extension. Plugins permitting the Windows versions of Word to read and write formats it does not natively support, such as the OpenDocument format (ODF) are available. Word can import and display images in common bitmap formats such as JPG and GIF. It can also be used to create and display simple line-art.

30K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo