Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2005

Tip: Looking for answers? Try searching our database.

2nd word document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim - 16 Mar 2005 02:03 GMT
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.
Chuck - 16 Mar 2005 14:09 GMT
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

> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.