2nd word document

T

Tim

Chuck I got ur routines on adding a doc to the end of a doc but have not
been able to make any sense of it. What do you reference and import?
I have had absolutely no luck getting it to work.
 
C

Chuck

The macros I posted manipulate Word document objects. (I know the code works
because I tested it before posting.) You need to edit the code to suit your
circumstances.

For instance, in the line

Set doc1 = Documents.Open("c:\temp\testdoc.doc")

you need to specify the path and file name for the document you want to use.
There are various ways to do that. For simplicity sake I hard coded a file
name. Alternatively you can loop through all the files in a folder or drive
for instance, get their names, test whether you want to perform your actions
on them and then run that code; or you can create a user form that allows the
user to choose a file to run the code on -- which files you work on is up to
you.

The simplest way to test the code I posted would be to create dummy
documents in a test folder, edit the code to reflect those path and file
names and then play around.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top