View Single Post
 
Old 01-31-2012, 09:50 PM
Marrick13 Marrick13 is offline Windows XP Office 2010 32bit
Competent Performer
 
Join Date: Jun 2006
Posts: 102
Marrick13 will become famous soon enough
Default

Paul,

I commented out all the lines starting with "wdTmp.Documents" because of the variable, but that was because I also commented out the variable declaration. I probably could have left that, but I still would have had to comment out most of the code that pertained to the separate Word session.

I recall that at the beginning of this project, I thought I could do all the style copying without opening any files, then discovered I had to open the source. So I did that and closed it as soon as I grabbed its styles (it needed to be opened only to capture its style list, not to copy them). The styles can be copied to the dest files without opening them. So I didn't think much about the possible problems of opening files.

I created Style Copier primarily out of a need I saw for copying styles to multiple files, which the Organizer cannot do, and secondarily to get around Organizer's template defaults. The need for copying to multiple arose out of a client I was working for who had tons of existing documents which made no use of styles, but many of them did use multilevel (outline) numbering. That numbering almost always goes awry unless it is set up in a list style or similar style. I configured those styles in a non-template and used that to copy to other documents; there was no need for a template since I wasn't creating new documents. I'm not working there anymore but thought other technical writers might find Style Copier useful, but since I'm not in touch with any of them anymore, there probably won't be any users! But at least I will have this utility if I ever run into a similar scenario again.

Again, thank you for all your help - I couldn't have finished it without you!
Reply With Quote