S
Seth Masek
I have two (probably simple) questions:
1. Why does word append cell values in tables with the
strange formatting marks? If I retrieve a cell value by:
Debug.Print ThisDocument.Tables(1).Cell(1, 1).Range.Text
I get the cell value (e.g., "MyValue") with two extra
characters that seem to be a carriage return and a tab
line character. I am correcting this by using the
following function...but I am thinking maybe there is an
easier way (if not, will this function always work?):
Debug.Print Left(ThisDocument.Tables(x).Cell(1,
1).Range.Text, _
Len(ThisDocument.Tables(x).Cell(1, 1).Range.Text) -
2)
2. How do you retrieve tables that are in the
header/footer area? These don't show up in the Tables
collection under ThisDocument --- it only counts the
tables in the body region (maybe this has something to do
with sections).
I am new to the Word object model. Any help is
appreciated!
Thanks,
Seth
1. Why does word append cell values in tables with the
strange formatting marks? If I retrieve a cell value by:
Debug.Print ThisDocument.Tables(1).Cell(1, 1).Range.Text
I get the cell value (e.g., "MyValue") with two extra
characters that seem to be a carriage return and a tab
line character. I am correcting this by using the
following function...but I am thinking maybe there is an
easier way (if not, will this function always work?):
Debug.Print Left(ThisDocument.Tables(x).Cell(1,
1).Range.Text, _
Len(ThisDocument.Tables(x).Cell(1, 1).Range.Text) -
2)
2. How do you retrieve tables that are in the
header/footer area? These don't show up in the Tables
collection under ThisDocument --- it only counts the
tables in the body region (maybe this has something to do
with sections).
I am new to the Word object model. Any help is
appreciated!
Thanks,
Seth