Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Sunil Sudhakaran Sunil Sudhakaran is offline
external usenet poster
 
Posts: 1
Default How to preserve a hyperlink inside a IF field

Hi,

I have a document that contain many IF fields. If I add a hyperlink inside a
if field pointing to a bookmark outside IF field then while closing and
reopening the doc (Word 2003) the hyperlink info is lost. Is there a way to
retain the same?

Thanks and regards
Sunil S.

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default How to preserve a hyperlink inside a IF field

Here, what I see is that you can put a hyperlink field into the result of an
IF field, but when you ctrl-click it within Word the link doesn't function.
Saving, closing and re-opening seems to preserve the hyperlink field, but it
still doesn't work. But maybe you are seeing something different?

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Sunil Sudhakaran" Sunil wrote in
message ...
Hi,

I have a document that contain many IF fields. If I add a hyperlink inside
a
if field pointing to a bookmark outside IF field then while closing and
reopening the doc (Word 2003) the hyperlink info is lost. Is there a way
to
retain the same?

Thanks and regards
Sunil S.


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How to preserve a hyperlink inside a IF field

It might work if the IF field is nested within the Hyperlink field eg Insert
a hyperlink with display text added to the display text window. Then toggle
the hyperlink field and replace the linked location with the IF field thus:

{ HYPERLINK \l "{ IF { REF Test } = 1 "Page3" "Page4" }" }

The above example works within the document to link to bookmarks Page3 or
Page4 according to the setting of the bookmark Test. I see no reason why it
should not link outside the document?
The display text doesn't change when the fields are updated.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Peter Jamieson wrote:
Here, what I see is that you can put a hyperlink field into the
result of an IF field, but when you ctrl-click it within Word the
link doesn't function. Saving, closing and re-opening seems to
preserve the hyperlink field, but it still doesn't work. But maybe
you are seeing something different?

"Sunil Sudhakaran" Sunil wrote
in message ...
Hi,

I have a document that contain many IF fields. If I add a hyperlink
inside a
if field pointing to a bookmark outside IF field then while closing
and reopening the doc (Word 2003) the hyperlink info is lost. Is
there a way to
retain the same?

Thanks and regards
Sunil S.



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Sunil Sudhakaran[_2_] Sunil Sudhakaran[_2_] is offline
external usenet poster
 
Posts: 4
Default How to preserve a hyperlink inside a IF field

Hi,

Thanks all for your inputs. I will make my question more clear.

I have many IF fields in a doc. Each IF fields have at least two paragraphs
under it.
I am using the mail merge feature of the word to generate the manual for
different customers. The doc is linked to a external data source. The data
source is a .xls file. Based on whether the mergefiled condition is satisfied
I am including a particular topic as shown below.

{ if { MERGEFIELD ETHERNET } ="Y"

" paragraph1
paragraph2
"
}

If I am linking a word that comes inside the IF field to a bookmark outside
the IF field then the hyperlink is not retained while closing and reopening
the doc. The links works fine if am a not linking the doc with the external
data source.

Regards
Sunil S.

"Graham Mayor" wrote:

It might work if the IF field is nested within the Hyperlink field eg Insert
a hyperlink with display text added to the display text window. Then toggle
the hyperlink field and replace the linked location with the IF field thus:

{ HYPERLINK \l "{ IF { REF Test } = 1 "Page3" "Page4" }" }

The above example works within the document to link to bookmarks Page3 or
Page4 according to the setting of the bookmark Test. I see no reason why it
should not link outside the document?
The display text doesn't change when the fields are updated.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Peter Jamieson wrote:
Here, what I see is that you can put a hyperlink field into the
result of an IF field, but when you ctrl-click it within Word the
link doesn't function. Saving, closing and re-opening seems to
preserve the hyperlink field, but it still doesn't work. But maybe
you are seeing something different?

"Sunil Sudhakaran" Sunil wrote
in message ...
Hi,

I have a document that contain many IF fields. If I add a hyperlink
inside a
if field pointing to a bookmark outside IF field then while closing
and reopening the doc (Word 2003) the hyperlink info is lost. Is
there a way to
retain the same?

Thanks and regards
Sunil S.




  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default How to preserve a hyperlink inside a IF field

As I said before, the hyperlinks do not seem to work if they are in the
result text of an IF field. (here, it does not seem to matter whether you
are linked to a data source or not).

Presumably you are not actually merging the document - if you do, you lose
the bookmarks so the hyperlink won't work anyway. So maybe you are just
previewing.

Hyperlinks do work if they come from an INCLUDETEXTed document. As long as
your ETHERNET field can only take specific values (say "Y", "N" or "" ) then
you can exploit this by
a. creating a document (let's call it mytexts.doc) that contains each of
the texts you need, including hyperlinks that reference the correct bookmark
b. bookmarking the texts BMY, BMN and BM
c. using { INCLUDETEXT "the full path name of mytexts.doc" { MERGEFIELD
ETHERNET } } to insert the bookmarked texts

You may have to select and re-execute the INCLUDETEXT fields before they
will work properly, especially if you use

{ HYPERLINK "{ FILENAME }" \l "bookmarkname" } within mytexts.doc to avoid
hard-coding the including document name.

This approach has another problem in that you rely on the linked .doc file -
you can't use ctrl-shift-F9 to remove the INCLUDETEXT without also
destroying the hyperlink.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Sunil Sudhakaran" wrote in
message ...
Hi,

Thanks all for your inputs. I will make my question more clear.

I have many IF fields in a doc. Each IF fields have at least two
paragraphs
under it.
I am using the mail merge feature of the word to generate the manual for
different customers. The doc is linked to a external data source. The data
source is a .xls file. Based on whether the mergefiled condition is
satisfied
I am including a particular topic as shown below.

{ if { MERGEFIELD ETHERNET } ="Y"

" paragraph1
paragraph2
"
}

If I am linking a word that comes inside the IF field to a bookmark
outside
the IF field then the hyperlink is not retained while closing and
reopening
the doc. The links works fine if am a not linking the doc with the
external
data source.

Regards
Sunil S.

"Graham Mayor" wrote:

It might work if the IF field is nested within the Hyperlink field eg
Insert
a hyperlink with display text added to the display text window. Then
toggle
the hyperlink field and replace the linked location with the IF field
thus:

{ HYPERLINK \l "{ IF { REF Test } = 1 "Page3" "Page4" }" }

The above example works within the document to link to bookmarks Page3 or
Page4 according to the setting of the bookmark Test. I see no reason why
it
should not link outside the document?
The display text doesn't change when the fields are updated.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Peter Jamieson wrote:
Here, what I see is that you can put a hyperlink field into the
result of an IF field, but when you ctrl-click it within Word the
link doesn't function. Saving, closing and re-opening seems to
preserve the hyperlink field, but it still doesn't work. But maybe
you are seeing something different?

"Sunil Sudhakaran" Sunil wrote
in message ...
Hi,

I have a document that contain many IF fields. If I add a hyperlink
inside a
if field pointing to a bookmark outside IF field then while closing
and reopening the doc (Word 2003) the hyperlink info is lost. Is
there a way to
retain the same?

Thanks and regards
Sunil S.





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
Form Field Inside of a Text Box Mark Watlock Microsoft Word Help 3 July 7th 07 04:46 PM
Issue with DOCPROPERTY field inside LINK field [email protected] Microsoft Word Help 5 January 17th 07 02:49 PM
Embedding SEQ inside of a LINK field [email protected] Microsoft Word Help 1 November 13th 06 12:05 AM
preserve a hyperlink when the path of the hyperlinked file is move m Microsoft Word Help 1 November 2nd 05 12:58 PM
Textfield inside 'If Then Else' field Weeze via OfficeKB.com Mailmerge 3 January 5th 05 02:26 PM


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