Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.newusers
|
|||
|
|||
Optionally hiding text in a complicated document
Hi!
I am using Microsoft Word 2003 and I have a document that contains a number of fairly long lists, and I have had requests to format the document so that the user can choose whether to display the entire list or simply to display the first 5 entries in each list. I was hoping to do this using the "Hidden" font format, but the problem that I run into is that choosing to display or print text formatted as "Hidden" also displays/prints all of the field codes embedded in the document. This seems strange/wrong/broken to me as there is an explicit option to display field code contents and this option is set to hide field code contents when I turn on the display of "hidden" text and yet field code contents are displayed when hidden text is displayed. Is there a way to toggle the display of only that text that is formatted as "hidden" rather than the contents of the field codes? Is using a style for the text that I want to hide, and then programmatically altering that style definition to include the "hidden" font format the way to do what I want? Thanks -jdc |
#2
Posted to microsoft.public.word.newusers
|
|||
|
|||
Optionally hiding text in a complicated document
No offense - I'm not being sarcastic - but it may seem less
"strange/wrong/broken" if you keep in mind that Word is primarily designed/intended to be a word processing program to deliver printed documents. What you describe sounds more like a web page Not out of the question, though. However, your document has to be treated as a Form. You may want to turn on the Web Tools toolbar & research the use of the tools it provides - such as Drop Down Boxes & List Boxes. This is just one approach, but I'm sure some other suggestions will be offered. It would probably be helpful to know more about what the type of content in these lists amounts to & how the document will be used. -- Regards |:) Bob Jones [MVP] Office:Mac "John Clark" wrote in message news:001801c7bcae$68630640$fefea8c0@haengma... Hi! I am using Microsoft Word 2003 and I have a document that contains a number of fairly long lists, and I have had requests to format the document so that the user can choose whether to display the entire list or simply to display the first 5 entries in each list. I was hoping to do this using the "Hidden" font format, but the problem that I run into is that choosing to display or print text formatted as "Hidden" also displays/prints all of the field codes embedded in the document. This seems strange/wrong/broken to me as there is an explicit option to display field code contents and this option is set to hide field code contents when I turn on the display of "hidden" text and yet field code contents are displayed when hidden text is displayed. Is there a way to toggle the display of only that text that is formatted as "hidden" rather than the contents of the field codes? Is using a style for the text that I want to hide, and then programmatically altering that style definition to include the "hidden" font format the way to do what I want? Thanks -jdc |
#3
Posted to microsoft.public.word.newusers
|
|||
|
|||
Optionally hiding text in a complicated document
(My apologies if you get multiple postings of this message - I'm
fighting with my news group reader at the moment...) CyberTaz mailto:typegeneraltaz1ATcomcastdotnet scribbled on Monday, July 02, 2007 11:58 AM: No offense - I'm not being sarcastic - but it may seem less "strange/wrong/broken" if you keep in mind that Word is primarily designed/intended to be a word processing program to deliver printed documents. What you describe sounds more like a web page No offense taken, but I don't think that my usage here is a big stretch from the primary purpose of MS Word - I am looking at this as a document that basically has two different print modes - the first mode displays all values of each contained list, the second mode displays only the first 5 values in each list - with an indication that there are more values not shown. I agree that this information could be shown on a web page, but in this case, a printed document is the primary delivery method for this information. My comment on "strange/wrong/broken" was simply that there are two different switches on the Tools | Options | View panel - one for "Hidden text" and one for "Field codes" - in my mind, if the field codes switch is not selected, the document shouldn't display field codes - however, the application seems to display field codes if either "Field codes", or "Hidden Text" are selected, and there does not appear to be a way to turn off the display of field codes if hidden text is selected to be shown. Not out of the question, though. However, your document has to be treated as a Form. You may want to turn on the Web Tools toolbar & research the use of the tools it provides - such as Drop Down Boxes & List Boxes. I'll do this research, but I am not sure a form is what I am looking for - again, the primary delivery of the information in the document is as a printed document - are forms a good fit for this delivery? This is just one approach, but I'm sure some other suggestions will be offered. It would probably be helpful to know more about what the type of content in these lists amounts to & how the document will be used. The document is technical documentation of a database - in documenting each column in the database it is possible that the column has a related list of values that are valid for that column. In one mode, the document should exhaustively list every possible valid value for the columns that have domains associated to them. In the second mode, the document should list the first 5 values of the domain, and state that there are additional valid values that are not listed. What I have done is assign one style to valid values in list position 6+, and another style to text that says "Additional valid values exist..." that is added at the end of each list. Then I have written a macro that basically does the following: If ActiveDocument.Styles("List Members Hidden").Font.Hidden Then ActiveDocument.Styles("List Members Hidden").Font.Hidden = False ActiveDocument.Styles("Additional List Items").Font.Hidden = True Else ActiveDocument.Styles("List Members Hidden").Font.Hidden = True ActiveDocument.Styles("Additional List Items").Font.Hidden = False End If Running the macro should toggle the display of the valid values in position 6 and beyond (I say should because I am having some problems getting the "Additional List Items" text to display - I am still working on figuring out what's going on there). My question at this point is whether this is the best way to do this, or if there is a better way - if you still think forms are what I need, I will look into those more completely. Thanks -jdc |
#4
Posted to microsoft.public.word.newusers
|
|||
|
|||
Optionally hiding text in a complicated document
As I understand your latest post, users are only going to see the document in
printed version(s). Therefore I think that your idea of formatting the text with special styles and show/hide the text by changing the Hidden property of the styles via VBA should work well. You do not need a form. I first thought that users were going to read your document in electronic version and I was trying to explain all the problems this would give because you also needed to manipulate the users' options settings of formatting marks when the document was opened and restore the original settings when the document was closed. But if you are the only user who has to keep track of the settings, it is not a problem. Your problem with column 6 and your macro: What you refer to as a "list", is it actually a row in a table? (I first thought you meant an entire table). If a "list" is a row, I suppose that the last column in the table is the one that contains the "Additional valid values exist..." strings. If this is correct, have you tried selecting the entire last column and applying the "Additional List Items" style to the column? An idea you could use instead of hidden text: If the document versions are going to be used by others in electronic versions as well, you could you the following method instead of the hidden style method (I have used the method with success): Keep a "master" of your document that contains all text for both versions visible. Instead of setting the two special styles to hidden/not hidden, change the style definitions so that you apply another font color and background shading (or highlight). Make sure that it is easy to distinguish the two styles on screen. Then create macros that save 2 copies of the document: 1. One copy where you delete everything marked by one of the styles and remove the color/shading from the other style. 2. Another copy where you do the opposite. Then distribute those two copies and keep the master for yourself only. Make all updates in the master and repeat the copy creation when needed. A comment regarding field codes and hidden text: Showing/hiding hidden text is not in general related to showing/hiding field codes. However, index fields are an exception because index fields are formatted as hidden text (there may be other types too that act this way). -- Regards Lene Fredborg DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "John Clark" wrote: (My apologies if you get multiple postings of this message - I'm fighting with my news group reader at the moment...) CyberTaz mailto:typegeneraltaz1ATcomcastdotnet scribbled on Monday, July 02, 2007 11:58 AM: No offense - I'm not being sarcastic - but it may seem less "strange/wrong/broken" if you keep in mind that Word is primarily designed/intended to be a word processing program to deliver printed documents. What you describe sounds more like a web page No offense taken, but I don't think that my usage here is a big stretch from the primary purpose of MS Word - I am looking at this as a document that basically has two different print modes - the first mode displays all values of each contained list, the second mode displays only the first 5 values in each list - with an indication that there are more values not shown. I agree that this information could be shown on a web page, but in this case, a printed document is the primary delivery method for this information. My comment on "strange/wrong/broken" was simply that there are two different switches on the Tools | Options | View panel - one for "Hidden text" and one for "Field codes" - in my mind, if the field codes switch is not selected, the document shouldn't display field codes - however, the application seems to display field codes if either "Field codes", or "Hidden Text" are selected, and there does not appear to be a way to turn off the display of field codes if hidden text is selected to be shown. Not out of the question, though. However, your document has to be treated as a Form. You may want to turn on the Web Tools toolbar & research the use of the tools it provides - such as Drop Down Boxes & List Boxes. I'll do this research, but I am not sure a form is what I am looking for - again, the primary delivery of the information in the document is as a printed document - are forms a good fit for this delivery? This is just one approach, but I'm sure some other suggestions will be offered. It would probably be helpful to know more about what the type of content in these lists amounts to & how the document will be used. The document is technical documentation of a database - in documenting each column in the database it is possible that the column has a related list of values that are valid for that column. In one mode, the document should exhaustively list every possible valid value for the columns that have domains associated to them. In the second mode, the document should list the first 5 values of the domain, and state that there are additional valid values that are not listed. What I have done is assign one style to valid values in list position 6+, and another style to text that says "Additional valid values exist..." that is added at the end of each list. Then I have written a macro that basically does the following: If ActiveDocument.Styles("List Members Hidden").Font.Hidden Then ActiveDocument.Styles("List Members Hidden").Font.Hidden = False ActiveDocument.Styles("Additional List Items").Font.Hidden = True Else ActiveDocument.Styles("List Members Hidden").Font.Hidden = True ActiveDocument.Styles("Additional List Items").Font.Hidden = False End If Running the macro should toggle the display of the valid values in position 6 and beyond (I say should because I am having some problems getting the "Additional List Items" text to display - I am still working on figuring out what's going on there). My question at this point is whether this is the best way to do this, or if there is a better way - if you still think forms are what I need, I will look into those more completely. Thanks -jdc |
#5
Posted to microsoft.public.word.newusers
|
|||
|
|||
Optionally hiding text in a complicated document
"John Clark" wrote in message
news:000101c7bcce$ad18b170$fefea8c0@haengma... (My apologies if you get multiple postings of this message - I'm fighting with my news group reader at the moment...) CyberTaz mailto:typegeneraltaz1ATcomcastdotnet scribbled on Monday, July 02, 2007 11:58 AM: No offense - I'm not being sarcastic - but it may seem less "strange/wrong/broken" if you keep in mind that Word is primarily designed/intended to be a word processing program to deliver printed documents. What you describe sounds more like a web page No offense taken, but I don't think that my usage here is a big stretch from the primary purpose of MS Word - I am looking at this as a document that basically has two different print modes - the first mode displays all values of each contained list, the second mode displays only the first 5 values in each list - with an indication that there are more values not shown. I agree that this information could be shown on a web page, but in this case, a printed document is the primary delivery method for this information. My comment on "strange/wrong/broken" was simply that there are two different switches on the Tools | Options | View panel - one for "Hidden text" and one for "Field codes" - in my mind, if the field codes switch is not selected, the document shouldn't display field codes - however, the application seems to display field codes if either "Field codes", or "Hidden Text" are selected, and there does not appear to be a way to turn off the display of field codes if hidden text is selected to be shown. Not out of the question, though. However, your document has to be treated as a Form. You may want to turn on the Web Tools toolbar & research the use of the tools it provides - such as Drop Down Boxes & List Boxes. I'll do this research, but I am not sure a form is what I am looking for - again, the primary delivery of the information in the document is as a printed document - are forms a good fit for this delivery? This is just one approach, but I'm sure some other suggestions will be offered. It would probably be helpful to know more about what the type of content in these lists amounts to & how the document will be used. The document is technical documentation of a database - in documenting each column in the database it is possible that the column has a related list of values that are valid for that column. In one mode, the document should exhaustively list every possible valid value for the columns that have domains associated to them. In the second mode, the document should list the first 5 values of the domain, and state that there are additional valid values that are not listed. What I have done is assign one style to valid values in list position 6+, and another style to text that says "Additional valid values exist..." that is added at the end of each list. Then I have written a macro that basically does the following: If ActiveDocument.Styles("List Members Hidden").Font.Hidden Then ActiveDocument.Styles("List Members Hidden").Font.Hidden = False ActiveDocument.Styles("Additional List Items").Font.Hidden = True Else ActiveDocument.Styles("List Members Hidden").Font.Hidden = True ActiveDocument.Styles("Additional List Items").Font.Hidden = False End If Running the macro should toggle the display of the valid values in position 6 and beyond (I say should because I am having some problems getting the "Additional List Items" text to display - I am still working on figuring out what's going on there). My question at this point is whether this is the best way to do this, or if there is a better way - if you still think forms are what I need, I will look into those more completely. Thanks -jdc Like Lene, I took from your original post that users had to manipulate this on screen. If printing is your only concern, perhaps I'm being a little dense but I don't see where the problem is. The display of text formatted as Hidden is triggered along with Formatting Marks (*non-printing* characters), such as the ¶ at the end of paragraphs. Having these characters visible has nothing to do with _field codes_ and has no impact on the printed page. They're only visible on screen - primarily to indicate white space where nothing will print & why. Field codes, OTOH, are toggled on/off by the Alt+F9 keystroke regardless of whether non-printing characters and Hidden text are displayed. Also, the Hidden text *can* be displayed independently of the other Formatting Marks. ToolsPreferencesView has checkboxes for the individual Formatting Marks so you can display only the ones you want in any combination you wish... one of which is Hidden. -- Regards |:) Bob Jones [MVP] Office:Mac |
#6
Posted to microsoft.public.word.newusers
|
|||
|
|||
Optionally hiding text in a complicated document
The only field codes that should be displayed automatically when you display
Hidden text are those that are formatted as Hidden, viz., TC and XE fields. These are not toggled with Alt+F9 as other field codes are. If any other field codes are displaying/printing when you have only "Hidden text" and not "Field codes" checked on the View/Print tab of Tools | Options, then there is definitely something wrong. -- 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. "John Clark" wrote in message news:001801c7bcae$68630640$fefea8c0@haengma... Hi! I am using Microsoft Word 2003 and I have a document that contains a number of fairly long lists, and I have had requests to format the document so that the user can choose whether to display the entire list or simply to display the first 5 entries in each list. I was hoping to do this using the "Hidden" font format, but the problem that I run into is that choosing to display or print text formatted as "Hidden" also displays/prints all of the field codes embedded in the document. This seems strange/wrong/broken to me as there is an explicit option to display field code contents and this option is set to hide field code contents when I turn on the display of "hidden" text and yet field code contents are displayed when hidden text is displayed. Is there a way to toggle the display of only that text that is formatted as "hidden" rather than the contents of the field codes? Is using a style for the text that I want to hide, and then programmatically altering that style definition to include the "hidden" font format the way to do what I want? Thanks -jdc |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
i need to insert a page into a complicated word document | Microsoft Word Help | |||
need to insert a blank page into complicated document | Microsoft Word Help | |||
Should (optionally)paste text in the format already there | Microsoft Word Help | |||
Track changes should show added text while HIDING deleted text. | Microsoft Word Help | |||
Complicated problem with trying to insert file into document. | Page Layout |