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 / January 2006

Tip: Looking for answers? Try searching our database.

Update links

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
emferrari@gmail.com - 20 Jan 2006 15:12 GMT
Hello

I have a word document that has some links to other doc files, such as
a default signature.

My company will change the address and I don't want to go to every
single document (1500+) and update the links.

I want to write a program to go to this documents and do the function
update link as they are with the option "Manual update" enabled.

I tried to record a macro of that but I think it's not possible to
record a macro for this operation.

Someone has already done something similar and could give me a tip in
how to start building this application?

Thanks!

Eduardo
Dave Lett - 20 Jan 2006 17:10 GMT
Hi Eduardo,

In pseudo-code then, you want to

1. Open all documents
2. Update all fields in every storyrange
3. Save Document
4. Close document

You can accomplish 1. by using the code in one of these two articles:
"How to read the filenames of all the files in a directory into an array" at
http://word.mvps.org/faqs/macrosvba/ReadFilesIntoArray.htm (you will use this
one if all the documents are in the same folder--no subfolders)

If, however, you do not have the documents in a single folder, but in a
"master" folder with several subfolders, then you will want to use the above
combined with the article "How to get the names of all the folders in the
folder tree, starting from a specified folder" at
http://word.mvps.org/faqs/macrosvba/ReadFoldersIntoArray.htm

This will certainly get you started. After that, you'll want to be able to
ACCESS every storyrange in the document. To do that, you can borrow a portion
of the code from the article "Using a macro to replace text where ever it
appears in a document including Headers, Footers, Textboxes, etc." at
http://word.mvps.org/FAQs/MacrosVBA/FindReplaceAllWithVBA.htm

Once you combine these, saving and closing is easy.

Hope this gets you started,

Dave

> Hello
>
[quoted text clipped - 16 lines]
>
> Eduardo
 
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.