Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Chuck Whittemore Chuck Whittemore is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Chuck Whittemore Chuck Whittemore is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update fields across multiple documents Melanie Beck Microsoft Word Help 1 May 31st 07 05:37 AM
How do I use hyperlink base? ChrisB Microsoft Word Help 6 April 5th 06 05:36 AM
Automatically update template from multiple documents [email protected] Microsoft Word Help 3 February 2nd 06 04:26 PM
Hyperlink base Rita Microsoft Word Help 1 September 28th 05 04:17 PM
How can I update multiple documents? hawc2k2 Page Layout 6 July 15th 05 10:25 PM


All times are GMT +1. The time now is 07:12 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"