Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word 2007/Excell 2007 - random loss of field contents on mailmerge | Mailmerge | |||
format field percentage merge Word 2007 from excel 2007 | Mailmerge | |||
Word 2007 Linked OLE Object to Excel 2007 file performance problem | Microsoft Word Help | |||
Unable to download templates using Word 2007 (MS Office 2007 Stand | Microsoft Word Help | |||
multi-page visio 2007 in word 2007 with automatic figure caption | Microsoft Word Help |