Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
Paragraph mark at end of each row - how to allocate a style to it
At the end of each row (adjacent to the last column), there is a para mark (a
circle). I want to be able to change that from a Normal style to a defined style. Is there anyway of doing that? The reason I need that - I am working with an automated document that has a input prompt screen at the start. If checkbox 1 is selected, certain data is to appear in the document. If checkbox 2 is selected, other rows of data are to appear. The problem is that it Word seems to treat the end of a row as the end of the text that should be inserted ie. it won't allow me to have multiple rows. Is there any other way around this problem? Thanks very much for any ideas. |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
Paragraph mark at end of each row - how to allocate a style to it
Unless the row height is fixed, the text should wrap within the cell.
What code is being used to insert the text? -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "MIrving" wrote in message ... At the end of each row (adjacent to the last column), there is a para mark (a circle). I want to be able to change that from a Normal style to a defined style. Is there anyway of doing that? The reason I need that - I am working with an automated document that has a input prompt screen at the start. If checkbox 1 is selected, certain data is to appear in the document. If checkbox 2 is selected, other rows of data are to appear. The problem is that it Word seems to treat the end of a row as the end of the text that should be inserted ie. it won't allow me to have multiple rows. Is there any other way around this problem? Thanks very much for any ideas. |
#3
Posted to microsoft.public.word.tables
|
|||
|
|||
Paragraph mark at end of each row - how to allocate a style to it
Hi,
though I don't understand your explanation, with the following you access the end-of-row mark: Sub EndofROw() Dim objRow As Row Dim objTbl As Table Set objTbl = ActiveDocument.Tables(1) With objTbl For Each objRow In objTbl.Rows objRow.Range.Characters.Last.Select ' or just apply a style to the last character in the row. Next End With End Sub -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
#4
Posted to microsoft.public.word.tables
|
|||
|
|||
Paragraph mark at end of each row - how to allocate a style to
Thank you Helmut.
Sorry my explanation was not too clear. By 'end of each row' I mean outside of the table itself (adjacent to the last column; next to the margin). I have applied a defined style (Followlevel 1 style) to the whole table, but the paragraph mark (a circle) that is next to the margin is still Normal style. Because it stays as Normal style, Word seems to treat that as a break between the first row and the next row (also Followlevel 1 style). I actually want the next rows to also be pulled in if checkbox 1 is selected. I don't know if that explanation helps at all (probably still confusing, sorry), but can I please ask you to clarify what I need to do with that script you kindly provided for accessing the end-of-row mark. I have little to no macro/programming skills, so I would be most grateful for some further guidance as to what I need to do. My sincere thanks. "Helmut Weber" wrote: Hi, though I don't understand your explanation, with the following you access the end-of-row mark: Sub EndofROw() Dim objRow As Row Dim objTbl As Table Set objTbl = ActiveDocument.Tables(1) With objTbl For Each objRow In objTbl.Rows objRow.Range.Characters.Last.Select ' or just apply a style to the last character in the row. Next End With End Sub -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
#5
Posted to microsoft.public.word.tables
|
|||
|
|||
Paragraph mark at end of each row - how to allocate a style to
Hi,
Since there's no real text associated with the end-of-row marker, it does not really make much sense to assign a paragraph style (or any formatting). I agree it would be nice if you could, but Word acts up if you try. I've seen Word changing the formatting of the cells in the row in weird ways when you try. I guess you've some macro behind the check box that extends the selection? That code probably will have to be rewritten so that it ignores the end-of-row marker. Regards, Klaus "MIrving" wrote: Thank you Helmut. Sorry my explanation was not too clear. By 'end of each row' I mean outside of the table itself (adjacent to the last column; next to the margin). I have applied a defined style (Followlevel 1 style) to the whole table, but the paragraph mark (a circle) that is next to the margin is still Normal style. Because it stays as Normal style, Word seems to treat that as a break between the first row and the next row (also Followlevel 1 style). I actually want the next rows to also be pulled in if checkbox 1 is selected. I don't know if that explanation helps at all (probably still confusing, sorry), but can I please ask you to clarify what I need to do with that script you kindly provided for accessing the end-of-row mark. I have little to no macro/programming skills, so I would be most grateful for some further guidance as to what I need to do. My sincere thanks. "Helmut Weber" wrote: Hi, though I don't understand your explanation, with the following you access the end-of-row mark: Sub EndofROw() Dim objRow As Row Dim objTbl As Table Set objTbl = ActiveDocument.Tables(1) With objTbl For Each objRow In objTbl.Rows objRow.Range.Characters.Last.Select ' or just apply a style to the last character in the row. Next End With End Sub -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
#6
Posted to microsoft.public.word.tables
|
|||
|
|||
Paragraph mark at end of each row - how to allocate a style to
Hi,
well, if I apply a style to a whole table, [alt num 5], apply style the end-of-row mark is formatted in that style, too. My code is for the end-of-row mark only, though it may be of no use or even damage formatting, as Klaus pointed out. Sub EndofROw2() Dim objRow As Row Dim objTbl As Table Set objTbl = ActiveDocument.Tables(1) With objTbl For Each objRow In objTbl.Rows With objRow.Range.Characters.Last .Style = "Heading 2" End With Next End With End Sub -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
what is a linked style? | Microsoft Word Help | |||
Infestation of Char Char formatting | Formatting Long Documents | |||
Table Format Style vs. Table Text Style | Page Layout | |||
Outline level auto-select custom style | Formatting Long Documents | |||
Word 2003: Can one disable table styles? | Tables |