>I'm using VFP-9 sp2 with Word 2003 for automation. I have a collection of comments in my document.
>
>In one of the comment, I have text follow by a table. I want to overwrite the entire content of the comment.
>- I tried the FIND method with a empty replacement text
>torange.Find.Execute(toRange.Text,,,,,,,,,[])
>
>- I tried the FIND method with a replacment text
>torange.Find.Execute(toRange.Text,,,,,,,,,lcCodelist+lcEND)
>
>- I tried the FIND method with a replacment text
>toRange.Text = lcCodelist
>
>I always get the following:
>Microsoft Word: Word can't delete a comment in the comment pane. Instead, delete the comment marker from the main document window...
>
>I think because there is a table in that comment, it won't replace it...
>
>Any idea??? anybody
Hi,
You coud try something like:
for each oComment in oWord.Activedocument.comments
if oComment.Range.TAbles.count >0
for each oTable in oComment.Range.TAbles
for each ocell in oTable.Range.cells
endfor
endfor
endif
endfor