inserting files - problems with formatting

  • Thread starter Thread starter JulieD
  • Start date Start date
J

JulieD

i have a user who has 300 files that he wants to insert into one word
document .. okay, no problem, have code that will do this - however, each of
these documents is formatted inconsistently to the others but he wants each
one to retain its own formatting. I thought that placing a section break
before the insertion of the first file & in code after the insertion of each
additional file would mean that the documents retain their own formatting
but its not happening.

Font colour is staying okay but font type / size / borders etc is being
"lost" and changed to the document that the other documents are being
inserted into. Any ideas?

Cheers
JulieD
 
Hi Julie,

Any styles in the source documents will automatically take on the
definitions given to styles of the same name in the target document. There's
not a lot you can do about that, except for using hard formatting (eg
formatting the paras as Normal style but then formatting their text to
something different than what the style definition says) or different style
names in the source documents

Cheers
 
Hi Macropod

thanks for this ...
do you know of any way of programatically changing the name of the style in
a document - i'm thinking appending the name of the file to the style name
might be one way to solve the problem.

Cheers
JulieD
 
Hi Julie,

I'm sure this could be done with vba, looping through all Word files in a
folder and renaming styles. I think you'd come undone trying to rename any
of Word's built-in styles, though, but you could make new styles with your
new names based on them. You might do well to pose that problem in one of
the word.vba forums.

Cheers
 
Hi macropod

all the refs i could find basically say that you can't do this with the
built in styles so i gave up.

thanks for your input

Cheers
JulieD
 
Back
Top