PC Review


Reply
Thread Tools Rate Thread

Display hidden text only when saving as html

 
 
=?Utf-8?B?Sm9lIEh1bnRlcg==?=
Guest
Posts: n/a
 
      5th Nov 2006
The best way to describe this question is to first describe what I am trying
to achieve.

I have a document that I want to use both in printed form and as an html
document. I would like this transition to be transparent so as not to have to
change markup back and forth each time the document is updated.

Table of Contents entries automatically become hyperlinks in the HTML
document without any effort on my part, and print normally if printing the
document. What I want to do is have other manually entered hyperlinks not
print, but still appear in the HTML document.

For example, the manual hyperlinks would be backward reference to other
parts of the document, inserted for convenience when viewing the HTML
document. In the printed document, they would serve no purpose.

They might be barely acceptable in the printed document if they had page
numbers, but then the page numbers would be meaningless in the HTML version.

So what I am trying to find is some way to enter something that acts like a
Table of Contents entry, but appears only in the HTML edition.

Unfortunately, the Index entries retain useless page numbers instead of
being converted to hyperlinks like the Table of Contents. However, a user
can simple use "Find" to locate something in an HTML document, and the Index
section can be ignored or deleted before distribution.

Is there any sort of way to have text that is conditional based on the
output format without requiring some manual operation each time?

Thanks
 
Reply With Quote
 
 
 
 
Daiya Mitchell
Guest
Posts: n/a
 
      5th Nov 2006
Hi Joe,

Instead of page numbers for backward reference, can you use a
cross-reference to Section 3 or something? E.g., "see chapter 6". Then the
text would be useful in either version.

Cross-references can be automatically created as hyperlinks, which do not
show the normal formatting.

By the way, Table of Contents and cross-references act as hyperlinks in a
regular Word document, even before the conversion to HTML, for ease of
reading on screen.

You've asked this question before, apparently without a satisfactory answer.
I doubt you are going to get something that automatically triggers on Save
As as you wish. However, if you are willing to run a FormatForHTML and a
FormatForPrint macro before output, you could probably get what you want
with a minimum of effort once the macros are setup, and get the macros to
include the Save As command.


On 11/5/06 4:49 AM, "Joe Hunter" wrote:

> The best way to describe this question is to first describe what I am trying
> to achieve.
>
> I have a document that I want to use both in printed form and as an html
> document. I would like this transition to be transparent so as not to have to
> change markup back and forth each time the document is updated.
>
> Table of Contents entries automatically become hyperlinks in the HTML
> document without any effort on my part, and print normally if printing the
> document. What I want to do is have other manually entered hyperlinks not
> print, but still appear in the HTML document.
>
> For example, the manual hyperlinks would be backward reference to other
> parts of the document, inserted for convenience when viewing the HTML
> document. In the printed document, they would serve no purpose.
>
> They might be barely acceptable in the printed document if they had page
> numbers, but then the page numbers would be meaningless in the HTML version.
>
> So what I am trying to find is some way to enter something that acts like a
> Table of Contents entry, but appears only in the HTML edition.
>
> Unfortunately, the Index entries retain useless page numbers instead of
> being converted to hyperlinks like the Table of Contents. However, a user
> can simple use "Find" to locate something in an HTML document, and the Index
> section can be ignored or deleted before distribution.
>
> Is there any sort of way to have text that is conditional based on the
> output format without requiring some manual operation each time?
>
> Thanks


--
Daiya Mitchell, MVP Mac/Word
Word FAQ: http://www.word.mvps.org/
MacWord Tips: <http://word.mvps.org/Mac/WordMacHome.html>
What's an MVP? A volunteer! Read the FAQ: http://mvp.support.microsoft.com/

 
Reply With Quote
 
=?Utf-8?B?Sm9lIEh1bnRlcg==?=
Guest
Posts: n/a
 
      6th Nov 2006
Thanks for response, Daiya,

You've given me some ideas to research. I'll have to learn abut macros
first and then see if I can come up with something that would work.

it wouldn't be automatic as you say, but it would be workable.

Thanks again,
Joe

 
Reply With Quote
 
Daiya Mitchell
Guest
Posts: n/a
 
      7th Nov 2006
Hi Joe,

Actually, you don't really need to learn about macros first. You need to
sort out what you want to happen. If you are going to be deleting text, the
easiest way might be to format it in a style and then do a Find and Replace
with nothing for that style. If all the text is staying put, but you need
hyperlinks with a special formatting in the web version, then an F&R for REF
fields might be the road. There might be several steps you need to do to
format the doc.

Once you have worked out the manual workflow that gets you exactly what you
want, then see about converting it into a macro, or more than one macro.
You might, in fact, be able to attach the macro so that it intercepts the
Save As Web Page command, but that's the least part of what you need to do.

Links:

Creating a macro with no programming experience using the recorder
http://word.mvps.org/faqs/macrosvba/UsingRecorder.htm

How to modify a recorded macro
http://www.word.mvps.org/FAQs/Macros...ordedMacro.htm

Word macro group for beginners:

http://www.microsoft.com/communities...aspx?dg=micros
oft.public.word.vba.beginners&lang=en&cr=US


On 11/6/06 1:23 PM, "Joe Hunter" wrote:

> Thanks for response, Daiya,
>
> You've given me some ideas to research. I'll have to learn abut macros
> first and then see if I can come up with something that would work.
>
> it wouldn't be automatic as you say, but it would be workable.
>
> Thanks again,
> Joe
>


--
Daiya Mitchell, MVP Mac/Word
Word FAQ: http://www.word.mvps.org/
MacWord Tips: <http://word.mvps.org/Mac/WordMacHome.html>
What's an MVP? A volunteer! Read the FAQ: http://mvp.support.microsoft.com/

 
Reply With Quote
 
=?Utf-8?B?Sm9lIEh1bnRlcg==?=
Guest
Posts: n/a
 
      7th Nov 2006
Thanks for all the informational links, Daiya,

I did a little (very little) digging into the document source, and spotted
the numerous style definitions, and had a hunch that something might be done
using them.

I also saw the description of the "IF" statement, and hoped that there might
be some undocumented condition that could be tested that showed what the
current document format was going to be.

Obviously there is something that Word uses to alter the formatting of Table
of Contents entries depending on whether you are printing of saving to HTML.
This is automatic, and if this could be tested by an IF statement, it would
be a very simple matter to include or exclude portions of text based on that
value.

I believe I saw somewhere that others have suggested that Index entries be
automatically treated the same was as Table Of Contents entries when saving
to HTML. Then their page numbers would be removed and they would be
converted to hyperlinks.

Thanks again for the suggestions and the informational links.

Joe
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WHEN TYPING HTML EMAIL MESSAGE, TEXT IS HIDDEN Calvin Microsoft Word Document Management 1 22nd Jun 2009 04:16 AM
Display text and hidden value into a cell clara Microsoft Excel Programming 0 6th Dec 2007 03:15 PM
Re: display hidden text in the tale of content Suzanne S. Barnhill Microsoft Word New Users 0 6th Jul 2005 03:34 PM
How to display hidden text without dot blue underline? =?Utf-8?B?QW5ndXM=?= Microsoft Word Document Management 3 31st May 2005 05:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:34 PM.