#1   Report Post  
Posted to microsoft.public.word.docmanagement
Mary Mary is offline
external usenet poster
 
Posts: 138
Default word 2007

I have numerous word docs with links which point to a network drive with more
word docs. however, I want to move all the docs to a cd and give to someone
outside our network. I tried search and replace, but it doesn't find the
link info; for example "file \\mmmmm\mmuser\public\filename.doc". Does
anyone know of an easy way to udate the numerous links?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP on news.microsoft.com Doug Robbins - Word MVP on news.microsoft.com is offline
external usenet poster
 
Posts: 407
Default word 2007

You can use the following macro

' Macro created 26/10/01 by Doug Robbins to update links in a document
'
Dim alink As Field, linktype As Range, linkfile As Range
Dim linklocation As Range, i As Integer, j As Integer, linkcode As Range
Dim Message, Title, Default, Newfile
Dim counter As Integer


counter = 0
For Each alink In ActiveDocument.Fields
If alink.Type = wdFieldLink Then

Set linkcode = alink.Code
i = InStr(linkcode, Chr(34))
Set linktype = alink.Code
linktype.End = linktype.Start + i
j = InStr(Mid(linkcode, i + 1), Chr(34))
Set linklocation = alink.Code
linklocation.Start = linklocation.Start + i + j - 1
If counter = 0 Then
Set linkfile = alink.Code
linkfile.End = linkfile.Start + i + j - 1
linkfile.Start = linkfile.Start + i
Message = "Enter the modified path and filename following this
Format " & linkfile
Title = "Update Link"
Default = linkfile
Newfile = InputBox(Message, Title, Default)
End If
linkcode.Text = linktype & Newfile & linklocation
counter = counter + 1
End If
Next alink

See the article "What do I do with macros sent to me by other newsgroup
readers to help me out?" at:

http://www.word.mvps.org/FAQs/Macros...eateAMacro.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Mary" wrote in message
...
I have numerous word docs with links which point to a network drive with
more
word docs. however, I want to move all the docs to a cd and give to
someone
outside our network. I tried search and replace, but it doesn't find the
link info; for example "file \\mmmmm\mmuser\public\filename.doc". Does
anyone know of an easy way to udate the numerous links?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2007/Excell 2007 - random loss of field contents on mailmerge John Mailmerge 4 February 20th 09 09:53 PM
format field percentage merge Word 2007 from excel 2007 LoisInAlaska Mailmerge 3 September 15th 08 06:47 PM
Word 2007 Linked OLE Object to Excel 2007 file performance problem Aaron LaBeau Microsoft Word Help 0 September 5th 08 01:42 PM
Unable to download templates using Word 2007 (MS Office 2007 Stand The Big K Microsoft Word Help 2 April 19th 07 03:10 AM
multi-page visio 2007 in word 2007 with automatic figure caption russ Microsoft Word Help 0 March 20th 07 09:44 PM


All times are GMT +1. The time now is 02:01 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"