Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Update Hyperlink Base Address across multiple Word 2007 documents
I need to update the Hyperlink Base Address (found in the Summary tab of the
document's Advanced Properties) in multiple documents in Word 2007. Doing it manually takes much time, especially given the volume of documents needing to be updated. Compounding the problem is that the file path has changed multiple times, further inflates the time spent managing the hyperlink base address. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Update Hyperlink Base Address across multiple Word 2007 documents
See the article "Getting access to the Document Properties of a Word file"
at: http://www.word.mvps.org/FAQs/MacrosVBA/DSOFile.htm You can use ActiveDocument.BuiltInDocumentProperties(wdPropert yHyperlinkBase) = "C:\Temp" to change the Hyperlink Base of each document -- 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 "Chuck Whittemore" wrote in message ... I need to update the Hyperlink Base Address (found in the Summary tab of the document's Advanced Properties) in multiple documents in Word 2007. Doing it manually takes much time, especially given the volume of documents needing to be updated. Compounding the problem is that the file path has changed multiple times, further inflates the time spent managing the hyperlink base address. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Update Hyperlink Base Address across multiple Word 2007 docume
Thanks for the prompt response. Here's what I found/learned so far:
1. On Vista, I needed to run Command as Adminstrator in order to properly register the DLL. 2. When I try to run the List File Properties add-in in Word, I get a Visual Basic run-time error '5111'. This Microsoft Knowledgebase article addresses the issue: http://support.microsoft.com/kb/920229. 3. Unfortunately, I'm not a VBA programmer (or any type of programmer), so while I'm quite certain using "ActiveDocument.BuiltInDocumentProperties(wdProper tyHyperlinkBase) = "C:\Temp"" would do the trick, I don't have the first clue how to use it. So, that leaves me with the same issue as I started with. I do appreciate your response, and if there is any other way a novice like me can accomplish this task I'd be grateful to be made aware of the solution. Chuck "Doug Robbins - Word MVP" wrote: See the article "Getting access to the Document Properties of a Word file" at: http://www.word.mvps.org/FAQs/MacrosVBA/DSOFile.htm You can use ActiveDocument.BuiltInDocumentProperties(wdPropert yHyperlinkBase) = "C:\Temp" to change the Hyperlink Base of each document -- 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 "Chuck Whittemore" wrote in message ... I need to update the Hyperlink Base Address (found in the Summary tab of the document's Advanced Properties) in multiple documents in Word 2007. Doing it manually takes much time, especially given the volume of documents needing to be updated. Compounding the problem is that the file path has changed multiple times, further inflates the time spent managing the hyperlink base address. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Update Hyperlink Base Address across multiple Word 2007 docume
Here's a method that does not involve using the DSO File. It will ask you
to browse to the folder containing the documents for which you want to update the HyperLinkBase, then it will ask you to browse to the folder that is at the end of the HyperLinkBase, and then it will open each of the documents in the folder and update the HyperLinkBase in each one and save and close it. Public Sub UpdateHyperlinkBase() Dim myFile As String Dim PathToUse As String Dim HyperLinkBase As String Dim myDoc As Document 'Close all open documents before beginning Documents.Close SaveChanges:=wdPromptToSaveChanges 'Browse to the folder containing the documents With Application.FileDialog(msoFileDialogFolderPicker) .AllowMultiSelect = False .title = "Select the folder containing the files to be updated." If .Show 0 Then PathToUse = .SelectedItems(1) Else MsgBox "Dialog cancelled" Exit Sub End If End With 'Get the new location of the HyperLinkBase With Application.FileDialog(msoFileDialogFolderPicker) .AllowMultiSelect = False .title = "Select the new path for the Hyperlinks." If .Show 0 Then HyperLinkBase = .SelectedItems(1) Else MsgBox "Dialog cancelled" Exit Sub End If End With myFile = Dir$(PathToUse & "*.doc") While myFile "" 'Open document Set myDoc = Documents.Open(PathToUse & myFile) 'Change the HyperLinkBase and Save the Document With myDoc .BuiltInDocumentProperties(wdPropertyHyperlinkBase ) = HyperLinkBase .Close SaveChanges:=wdSaveChanges End With 'Next file in folder myFile = Dir$() Wend End Sub If you don't know what to do with the code, 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 "Chuck Whittemore" wrote in message ... Thanks for the prompt response. Here's what I found/learned so far: 1. On Vista, I needed to run Command as Adminstrator in order to properly register the DLL. 2. When I try to run the List File Properties add-in in Word, I get a Visual Basic run-time error '5111'. This Microsoft Knowledgebase article addresses the issue: http://support.microsoft.com/kb/920229. 3. Unfortunately, I'm not a VBA programmer (or any type of programmer), so while I'm quite certain using "ActiveDocument.BuiltInDocumentProperties(wdProper tyHyperlinkBase) = "C:\Temp"" would do the trick, I don't have the first clue how to use it. So, that leaves me with the same issue as I started with. I do appreciate your response, and if there is any other way a novice like me can accomplish this task I'd be grateful to be made aware of the solution. Chuck "Doug Robbins - Word MVP" wrote: See the article "Getting access to the Document Properties of a Word file" at: http://www.word.mvps.org/FAQs/MacrosVBA/DSOFile.htm You can use ActiveDocument.BuiltInDocumentProperties(wdPropert yHyperlinkBase) = "C:\Temp" to change the Hyperlink Base of each document -- 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 "Chuck Whittemore" wrote in message ... I need to update the Hyperlink Base Address (found in the Summary tab of the document's Advanced Properties) in multiple documents in Word 2007. Doing it manually takes much time, especially given the volume of documents needing to be updated. Compounding the problem is that the file path has changed multiple times, further inflates the time spent managing the hyperlink base address. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Update fields across multiple documents | Microsoft Word Help | |||
How do I use hyperlink base? | Microsoft Word Help | |||
Automatically update template from multiple documents | Microsoft Word Help | |||
Hyperlink base | Microsoft Word Help | |||
How can I update multiple documents? | Page Layout |