Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Bob Zoller Bob Zoller is offline
external usenet poster
 
Posts: 2
Default Mass change hyperlink strings, or use a variable in the hyperlink?

I have an MS-Word document that has many hyperlinks embedded in it. All of
the underlying hyperlink strings include the same 4-digit number. I need to
mass change that 4-digit number. Or, maybe embed a variable or a property in
place of the number, and just change the value of the property. Any
suggestions?

For example, two hyperlinks embedded in the document could be:
...\folder1\9999_file1.doc
...\folder2\9999_file2.xls

I need to change all "9999" to "1234". Or, replace "9999" with a property
or variable, and just edit the value of the variable. I can manually edit
all hyperlinks, but it is very time consuming, and I need to do this
periodically.
--
Bob Zoller
IT Project Manager
MTD Products
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel Jezebel is offline
external usenet poster
 
Posts: 1,384
Default Mass change hyperlink strings, or use a variable in the hyperlink?

Two approaches you could use ---

1. Display field codes, then use Find and Replace. Will work fine provided
the string you're looking for doesn't otherwise occur in your document.

2. Use a nested field, with a docproperty for the variable bit. --

{ HYPERLINK { QUOTE "..\\folder1\\"{ DocProperty FileID }"_file1.doc" }}

Where FileID (or whatever name you want) is defined on File Properties
Custom.





"Bob Zoller" wrote in message
...
I have an MS-Word document that has many hyperlinks embedded in it. All of
the underlying hyperlink strings include the same 4-digit number. I need
to
mass change that 4-digit number. Or, maybe embed a variable or a property
in
place of the number, and just change the value of the property. Any
suggestions?

For example, two hyperlinks embedded in the document could be:
..\folder1\9999_file1.doc
..\folder2\9999_file2.xls

I need to change all "9999" to "1234". Or, replace "9999" with a property
or variable, and just edit the value of the variable. I can manually
edit
all hyperlinks, but it is very time consuming, and I need to do this
periodically.
--
Bob Zoller
IT Project Manager
MTD Products



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Bob Zoller Bob Zoller is offline
external usenet poster
 
Posts: 2
Default Mass change hyperlink strings, or use a variable in the hyperl

Jezebel,

Thanks for your very quick response. I tried both suggestions and failed.
I'm probably missing something.

On (1): I used alt+F9 to display field codes. I could then see links
displayed as:
{HYPERLINK "folder1/9999_file1.doc"}
Then I used find/replace to find "9999" and replace with "1234"
In that view, the hyperlink display changed to:
{HYPERLINK "folder1/1234_file1.doc"}
Then I used alt+F9 to return to normal view.
But the link still is associated with "9999", based on what I see when I
hover and when I click the link.

On (2): I have never used fields before. I assumed I should put the cursor
where I want the hyperlink to be, then click "insertfield". I do not see at
that point how I can input { HYPERLINK { QUOTE "..\\folder1\\"{ DocProperty
FileID }"_file1.doc" }}

What am I missing?

Rookie Bob



2. Use a nested field, with a docproperty for the variable bit. --

{ HYPERLINK { QUOTE "..\\folder1\\"{ DocProperty FileID }"_file1.doc" }}



--
Bob Zoller

"Jezebel" wrote:

Two approaches you could use ---

1. Display field codes, then use Find and Replace. Will work fine provided
the string you're looking for doesn't otherwise occur in your document.

2. Use a nested field, with a docproperty for the variable bit. --

{ HYPERLINK { QUOTE "..\\folder1\\"{ DocProperty FileID }"_file1.doc" }}

Where FileID (or whatever name you want) is defined on File Properties
Custom.





"Bob Zoller" wrote in message
...
I have an MS-Word document that has many hyperlinks embedded in it. All of
the underlying hyperlink strings include the same 4-digit number. I need
to
mass change that 4-digit number. Or, maybe embed a variable or a property
in
place of the number, and just change the value of the property. Any
suggestions?

For example, two hyperlinks embedded in the document could be:
..\folder1\9999_file1.doc
..\folder2\9999_file2.xls

I need to change all "9999" to "1234". Or, replace "9999" with a property
or variable, and just edit the value of the variable. I can manually
edit
all hyperlinks, but it is very time consuming, and I need to do this
periodically.
--
Bob Zoller
IT Project Manager
MTD Products




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Mass change hyperlink strings, or use a variable in the hyperl

You have to do it more than one way, and you have to update fields; see
http://sbarnhill.mvps.org/WordFAQs/HyperlinkProbs.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Bob Zoller" wrote in message
...
Jezebel,

Thanks for your very quick response. I tried both suggestions and failed.
I'm probably missing something.

On (1): I used alt+F9 to display field codes. I could then see links
displayed as:
{HYPERLINK "folder1/9999_file1.doc"}
Then I used find/replace to find "9999" and replace with "1234"
In that view, the hyperlink display changed to:
{HYPERLINK "folder1/1234_file1.doc"}
Then I used alt+F9 to return to normal view.
But the link still is associated with "9999", based on what I see when I
hover and when I click the link.

On (2): I have never used fields before. I assumed I should put the

cursor
where I want the hyperlink to be, then click "insertfield". I do not see

at
that point how I can input { HYPERLINK { QUOTE "..\\folder1\\"{

DocProperty
FileID }"_file1.doc" }}

What am I missing?

Rookie Bob



2. Use a nested field, with a docproperty for the variable bit. --

{ HYPERLINK { QUOTE "..\\folder1\\"{ DocProperty FileID }"_file1.doc" }}



--
Bob Zoller

"Jezebel" wrote:

Two approaches you could use ---

1. Display field codes, then use Find and Replace. Will work fine

provided
the string you're looking for doesn't otherwise occur in your document.

2. Use a nested field, with a docproperty for the variable bit. --

{ HYPERLINK { QUOTE "..\\folder1\\"{ DocProperty FileID }"_file1.doc" }}

Where FileID (or whatever name you want) is defined on File Properties


Custom.





"Bob Zoller" wrote in message
...
I have an MS-Word document that has many hyperlinks embedded in it.

All of
the underlying hyperlink strings include the same 4-digit number. I

need
to
mass change that 4-digit number. Or, maybe embed a variable or a

property
in
place of the number, and just change the value of the property. Any
suggestions?

For example, two hyperlinks embedded in the document could be:
..\folder1\9999_file1.doc
..\folder2\9999_file2.xls

I need to change all "9999" to "1234". Or, replace "9999" with a

property
or variable, and just edit the value of the variable. I can manually
edit
all hyperlinks, but it is very time consuming, and I need to do this
periodically.
--
Bob Zoller
IT Project Manager
MTD Products





  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel Jezebel is offline
external usenet poster
 
Posts: 1,384
Default Mass change hyperlink strings, or use a variable in the hyperl

To get the nested fields right, work from the inside out.

Start with the DocProperty field. Update it and make sure it displays 9999.

Now create the Quote field. Copy the Docproperty field and insert it into
the Quote field. Update that and check that the result is the filename.

Now create the Hyperlink field. Copy the Quote field and paste that into it.





"Bob Zoller" wrote in message
...
Jezebel,

Thanks for your very quick response. I tried both suggestions and failed.
I'm probably missing something.

On (1): I used alt+F9 to display field codes. I could then see links
displayed as:
{HYPERLINK "folder1/9999_file1.doc"}
Then I used find/replace to find "9999" and replace with "1234"
In that view, the hyperlink display changed to:
{HYPERLINK "folder1/1234_file1.doc"}
Then I used alt+F9 to return to normal view.
But the link still is associated with "9999", based on what I see when I
hover and when I click the link.

On (2): I have never used fields before. I assumed I should put the
cursor
where I want the hyperlink to be, then click "insertfield". I do not see
at
that point how I can input { HYPERLINK { QUOTE "..\\folder1\\"{
DocProperty
FileID }"_file1.doc" }}

What am I missing?

Rookie Bob



2. Use a nested field, with a docproperty for the variable bit. --

{ HYPERLINK { QUOTE "..\\folder1\\"{ DocProperty FileID }"_file1.doc" }}



--
Bob Zoller

"Jezebel" wrote:

Two approaches you could use ---

1. Display field codes, then use Find and Replace. Will work fine
provided
the string you're looking for doesn't otherwise occur in your document.

2. Use a nested field, with a docproperty for the variable bit. --

{ HYPERLINK { QUOTE "..\\folder1\\"{ DocProperty FileID }"_file1.doc" }}

Where FileID (or whatever name you want) is defined on File Properties

Custom.





"Bob Zoller" wrote in message
...
I have an MS-Word document that has many hyperlinks embedded in it. All
of
the underlying hyperlink strings include the same 4-digit number. I
need
to
mass change that 4-digit number. Or, maybe embed a variable or a
property
in
place of the number, and just change the value of the property. Any
suggestions?

For example, two hyperlinks embedded in the document could be:
..\folder1\9999_file1.doc
..\folder2\9999_file2.xls

I need to change all "9999" to "1234". Or, replace "9999" with a
property
or variable, and just edit the value of the variable. I can manually
edit
all hyperlinks, but it is very time consuming, and I need to do this
periodically.
--
Bob Zoller
IT Project Manager
MTD Products






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
Why did link appearance change to show hyperlink wording? KarenCO Microsoft Word Help 3 December 17th 10 03:02 PM
How do I change automatic hyperlink formatting Alex Microsoft Word Help 5 October 31st 05 02:18 AM
How can you change the ''selected hyperlink'' font color on Word? Daniel Lavia Microsoft Word Help 1 September 2nd 05 06:10 PM
how to change hyperlink in drop down box submit butt? go4eagle Microsoft Word Help 0 March 16th 05 03:51 PM
Can you change the hyperlink settings in Word? Rowan Microsoft Word Help 4 January 23rd 05 10:18 PM


All times are GMT +1. The time now is 11:55 PM.

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"