H
hemaneelagiri via OfficeKB.com
hi
i have word documents in that there are 5 fields(empno,name,address,
designation, salary) which have bookmarks.
i am filling those through VBA and those will fill in loop means suppose
there are 10 records in a table. when i run the applicaltion 10 pages will
display respcetive 5 fields.
till that every thing is fine
but where there is no address for 5th employee i want to hide that addresses
filed in 5th page.
now i ma getting blank space between name and designation
For Each frmfld In ActiveDocument.FormFields
Select Case frmfld.Name
Case "mta072" 'Address
If (strAdd = "" Or strAdd= " ") Then
frmfld.Select
Selection.TypeText " " **********************
Else
frmfld.Select
Selection.TypeText "Address:" & vbTab & strAdd
End If
how can i hide that place
thanks in advance
i have word documents in that there are 5 fields(empno,name,address,
designation, salary) which have bookmarks.
i am filling those through VBA and those will fill in loop means suppose
there are 10 records in a table. when i run the applicaltion 10 pages will
display respcetive 5 fields.
till that every thing is fine
but where there is no address for 5th employee i want to hide that addresses
filed in 5th page.
now i ma getting blank space between name and designation
For Each frmfld In ActiveDocument.FormFields
Select Case frmfld.Name
Case "mta072" 'Address
If (strAdd = "" Or strAdd= " ") Then
frmfld.Select
Selection.TypeText " " **********************
Else
frmfld.Select
Selection.TypeText "Address:" & vbTab & strAdd
End If
how can i hide that place
thanks in advance