Hi- am wanting to loop through tables in a Word document, and if the formfield in cell (1, 2) is blank, then the table is deleted. The problem seems to be with identifying the formfield as being blank. I run the code and nothing happens, although if I specify a value that exists in one of the formfields, the code works and the table is deleted.
I have tried Trim, Len, Null, IsEmpty, but none work.
Set WdApp = Word.Application
Dim Tbl As Table
For Each Tbl In .Tables
If Tbl.Cell(1, 2).Range.Fields(1).Result = "" Then
WdApp.Selection.MoveRight Unit:=wdCharacter, Count:=1