Reply
 
Thread Tools Display Modes
  #1   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 links

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.)

Thanks!
--
Barbara Hill
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Robert M. Franz (RMF) Robert M. Franz (RMF) is offline
external usenet poster
 
Posts: 1,741
Default How do I prevent Word from adding target="_BLANK" to half mylinks

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/
  #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/

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Bob Buckland ?:-\) Bob   Buckland ?:-\) is offline
external usenet poster
 
Posts: 2,073
Default How do I prevent Word from adding target="_BLANK" to half my l

Hi Barbara,

Where are you looking at the source of these pages?
Word 200 didn't have a built in 'filtered' version of Web documents, it used an Office 2000 add-in/utility to achieve that.

If you're looking at the document in Word use Alt+F9 to toggle the field codes and edit them there. The target="_blank" portion is
valid HTML.

How a new page in a web browser opens or reuses the existing instance can depend on the browser settings of the person visiting the
web page

=============
"Barbara" wrote in message ...
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
--

Bob Buckland ?:-)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*


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

?B?QmFyYmFyYQ==?= wrote in
:

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.



Using Word to either create or view web pages is NOT a sound practice.

Have no clue how to prevent Word from inserting the new page option
randomly.
You might try unselecting "Updating Links on Save" in the Web Options.

However, it's a simply matter to use any text editor (most Win comes with
Notepap) and search and replace the following

target="_blank"

replace with delete

save and upload the revised page.

There are also many free html editors that offer string repalcement across
selected folders.
I use "Search and Replace 98", which has proven a very benefical time
saver.


  #6   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

Bob,

I have been looking in the Edit Hyperlink dialog in Word, and I have been
using Notepad to look at the HTML. When I use Shift + F9 to look at the field
codes in Word, I find that all four links include the \n switch. (I have no
idea just how that switch got there.) So now the question becomes, "Why does
Word sometimes preserve and sometimes discard \n?"

You have given me a way of dealing with this in Word, at least: I can show
all the field codes and remove \n. Thanks!
--
Barbara Hill


"Bob Buckland ?:-)" wrote:

Hi Barbara,

Where are you looking at the source of these pages?
Word 200 didn't have a built in 'filtered' version of Web documents, it used an Office 2000 add-in/utility to achieve that.

If you're looking at the document in Word use Alt+F9 to toggle the field codes and edit them there. The target="_blank" portion is
valid HTML.

How a new page in a web browser opens or reuses the existing instance can depend on the browser settings of the person visiting the
web page

=============
"Barbara" wrote in message ...
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
--

Bob Buckland ?:-)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*



  #7   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

As for your comment, "Using Word to either create or view web pages in NOT a
sound practice"...

This was the best idea I could come up with. We have many content authors
contributing to our web site. They all have Word (mostly Word 2000, which is
currently the corporate standard). Very few of them have, say, Dreamweaver.
So our process is to develop, review, and approve content in Word (just
treating everything as a normal document, not a web page). (This does involve
a number of weird rules about graphics placement, table setup, avoiding tabs,
flagging links that should open new windows, etc.) Then we (the content
managers) use Word 2003 to create filtered HTML. Then we run a script that
tweaks various things in the HTML. Then we paste the HTML into IBM Websphere
WCM, which is where the web content actually resides. This process is not
pretty. But it does enable our authors and reviewers to work in an
application with which they are familiar and which gives them most of the
capabilities they need to create the content.
--
Barbara Hill


"Don" wrote:

?B?QmFyYmFyYQ==?= wrote in
:

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.



Using Word to either create or view web pages is NOT a sound practice.

Have no clue how to prevent Word from inserting the new page option
randomly.
You might try unselecting "Updating Links on Save" in the Web Options.

However, it's a simply matter to use any text editor (most Win comes with
Notepap) and search and replace the following

target="_blank"

replace with delete

save and upload the revised page.

There are also many free html editors that offer string repalcement across
selected folders.
I use "Search and Replace 98", which has proven a very benefical time
saver.

  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Robert M. Franz (RMF) Robert M. Franz (RMF) is offline
external usenet poster
 
Posts: 1,741
Default How do I prevent Word from adding target="_BLANK" to half myl

Hello Barbara

Barbara wrote:
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.


hardly anything concerning software is "unpredictable." [OK, let's not
discuss Word numbering, but you know what I mean ... :-)]

What I'm saying is you need to investigate different methods of
inserting a link, (and different setups in terms of version and SP of
Word), and compare the HTML code.

I very much doubt (FWIW, of course :-)) that, creating a link in the
same way, and using the same installation and HTML-conversion, creates
different code.

..2cents
Robert
--
/"\ ASCII Ribbon Campaign | MSFT |
\ / | MVP | Scientific Reports
X Against HTML | for | with Word?
/ \ in e-mail & news | Word | http://www.masteringword.eu/
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
Hyperlink to use existing browser by using target="" in Word 2007 Patrick Bae Microsoft Word Help 0 December 10th 07 09:29 PM
How do I stop MS Word from adding "shole" whenever I type "as"? George Microsoft Word Help 3 January 11th 07 10:04 PM
Half of text printed on label 1.5" x 4", pag. Preview shown same. eyepointer Page Layout 0 November 14th 06 10:57 PM
Want "memento mori" "que sera" &c to be acceptable w/o adding each word to dictionary or setting language. Can it be done? Bill Davy New Users 2 February 1st 06 06:16 PM
how can I hide small half squares "|__ " on corners ameen Page Layout 1 January 11th 06 03:16 AM


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