Paragraph mark at end of each row - how to allocate a style to it

M

MIrving

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

Doug Robbins - Word MVP

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
 
H

Helmut Weber

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"
 
M

MIrving

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

Klaus Linke

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
 
H

Helmut Weber

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top