P
pwrichcreek
I'd like to run a macro to check for formfields that do not have a bookmark
defined and insert a bookmark. When I run the following code, I get an error
-2147467259,
description = "automation error unspecified". Can someone show me how to fix
the code?
TIA,
Phil
i = 1
ActiveDocument.FormFields(i).Select
Do Until i > ActiveDocument.FormFields.Count
If Selection.FormFields(1).Name = "" Then
Selection.FormFields(1).Name = ffxname <==== ERROR here
...
If i < ActiveDocument.FormFields.Count Then
ActiveDocument.FormFields(i).Next.Select
End If
i = i + 1
Loop
defined and insert a bookmark. When I run the following code, I get an error
-2147467259,
description = "automation error unspecified". Can someone show me how to fix
the code?
TIA,
Phil
i = 1
ActiveDocument.FormFields(i).Select
Do Until i > ActiveDocument.FormFields.Count
If Selection.FormFields(1).Name = "" Then
Selection.FormFields(1).Name = ffxname <==== ERROR here
...
If i < ActiveDocument.FormFields.Count Then
ActiveDocument.FormFields(i).Next.Select
End If
i = i + 1
Loop