D
Dan
I am using a macro to copy styles from one document (gendoc) to another (newdoc). Basically, I have a program that generates a document, and then I am using macros to pull in data from that generated document. I need to copy the styles over in order to pull in the tab stops that the generated document has created.
Now, sometimes this works just fine, other times it causes Word to crash. I thought it was because the file I was copying to was not yet saved in a real location, and thus the .fullname reference I'm using with the organizercopy command didn't really mean anything yet, but using a saved document has still caused Word to crash seemingly randomly. Any idea if there is something simple I could be missing? I should note that the styles that I'm copying do already exist in the document I'm copying them to (newdoc), I'm just trying to overwrite them. I would delete those styles first, before overwriting them, but wouldn't that lose any references to those styles in the document (newdoc) I'm trying to copy these styles to?
Any help would be appreciated.
Now, sometimes this works just fine, other times it causes Word to crash. I thought it was because the file I was copying to was not yet saved in a real location, and thus the .fullname reference I'm using with the organizercopy command didn't really mean anything yet, but using a saved document has still caused Word to crash seemingly randomly. Any idea if there is something simple I could be missing? I should note that the styles that I'm copying do already exist in the document I'm copying them to (newdoc), I'm just trying to overwrite them. I would delete those styles first, before overwriting them, but wouldn't that lose any references to those styles in the document (newdoc) I'm trying to copy these styles to?
Any help would be appreciated.