View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Barbara Barbara is offline
external usenet poster
 
Posts: 87
Default How do I prevent Word from adding target="_BLANK" to half my l

Thanks for your answer, Robert. If I understand you correctly, it is simply
unpredictable whether Word 2000 is going to set a link to open in a new
window. And there is no way of knowing by looking at settings in Word (either
2000 or 2003). In the case of these four documents, I surely created all four
hyperlinks in the same way as each other. Probably it was with the icon in
the toolbar. Well, I find it somewhat annoying that Word randomly decides
whether a link is supposed to open in a new window or not. But I guess it is
what it is. Thanks again.
--
Barbara Hill


"Robert M. Franz (RMF)" wrote:

Hello Barbara

Barbara wrote:
I have 4 documents all created in Word 2000. All four contain the sentence,
"If the video does not play, please download Shockwave." Here, "Shockwave" is
a link to http://www.adobe.com/shockwave/download/. I opened each document in
Word 2003 and saved it as a web page (filtered). In two of the four
documents, the HTML source for the link reads:

a href="http://www.adobe.com/shockwave/download/"Shockwave/a.

In the other two documents, it reads:

a href="http://www.adobe.com/shockwave/download/"
target="_BLANK"Shockwave/a.

When I ask to edit these hyperlinks in Word 2003, they all look identical to
me. Specifically, the target frame for all four is set to "Page default
(none)."

What else can I look at to try to figure out why the links are coming out
differently from each other?

(I need to do a little post-processing on these links to make them run some
javascript. The javascript does not work if the links include target=_blank.
So I want Word not to put it there in the first place.)


Word, especially in 2000, was not up to creating "pretty" HTML code.

When creating a hyperlink by itself (AutoFormat As You Type option),
then I'm pretty sure you get the first (direct link) version.

The "opening in a new window" can be set as an option when creating the
link through Insert | Hyperlink. There's no way reading this other than
in the source, once you've converted to HTML. Best thing is to do your
post-processing in a code or text editor (or open the files in Word as
raw text), then this should not bother you.

HTH
Robert
--
/"\ ASCII Ribbon Campaign | MSFT |
\ / | MVP | Scientific Reports
X Against HTML | for | with Word?
/ \ in e-mail & news | Word | http://www.masteringword.eu/