View Single Post
 
Old 08-27-2014, 07:59 AM
kramer74 kramer74 is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Aug 2014
Posts: 4
kramer74 is on a distinguished road
Default Split file using variable delimiter

Hi,

I was wondering if it would be possible, using VBA, to split a large file with multiple pages into smaller individual files using a similar, but not identical, delimiter that begins with a word and several other characters which will vary, for example: -

Abcde 1A01BC [XYZ]
Abcde 9Z87YX [FE]
Abcde 4P44EE [RTEEY]

"Abcde" remains constant but the rest, with the exception of the square brackets, is variable, including the number of letters between the square brackets. "Abcde" also appears in the document in the middle of other words, or at the beginning of another statement, but is never followed by a space character and a number apart from at locations at which I want to split the document.

The delimiter always appears as the first thing on a page, but not on every page if that makes things easier?

I would like to keep the same margins/indents/formats etc. in the new documents.

Each new document needs to be saved using the full delimiter as the filename, e.g. "Abcde 4P44EE [RTEEY].doc"

Any help you can offer would be appreciated.

Last edited by kramer74; 08-27-2014 at 02:01 PM.
Reply With Quote