
Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
Thanks Greg,
Could I ask why the Len function =2 is used as the test in your IF function?

Signature
Thanks again,
MarkN
> Here is one way:
>
[quoted text clipped - 9 lines]
> > I need the code to check whether the first cell of the first table in
> > the document is empty and if it is empty, enter the current date.
Greg Maxey - 16 May 2006 03:57 GMT
Yes,
The end of cell marker in and empty cell takes up 2 characters. I wouldn't
swear in a court of law, but I am pretty sure it is chr(13) & chr(7).

Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
> Thanks Greg,
>
[quoted text clipped - 21 lines]
>>> table in the document is empty and if it is empty, enter the
>>> current date.
Greg Maxey - 16 May 2006 04:14 GMT
Now that I have been duly sworn , it is chr(13) and chr(7). Select an
empty cell and run the following code:
Sub Test()
MsgBox Asc(Selection.Text) _
& " and " & Asc(Right(Selection.Text, 1))
End Sub

Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
> Thanks Greg,
>
[quoted text clipped - 21 lines]
>>> table in the document is empty and if it is empty, enter the
>>> current date.