Removing Paragraph Markings from Table Cells

P

Pam Cheek

I have a table with 3 columns.

One of the columns (Projects) has multiple choices in it
for a given individual name.

for example

Name Ofc Sym Project(s)

Pam Cheek MAS/MASP MASP Taskers
CBMD Profiles
Web-Page Design

at the end of each of the choices in the projects column
is a paragraph mark. I want to strip them off. I tried
the following code, but it didn't work. Any
recommendations.

'Select each cell in the table
Celldata = ActiveDocument.Tables(1).Cell(i, j)

'Remove the paragraph and end-of-cell markers
'as we load the array

MyArrayName(i - 1, j - 1) = Left(Celldata, Len
(Celldata) - 2)
Next


Thanks,

PAM
 
J

Jezebel

Every cell in a Word table, even empty cells, contains two characters: vbCR
+ chr(9). That combination is the cell marker itself. These are always
present, so you need to take them into account when working out the length
of cell contents.
 

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