I am using the following code to autopopulate a word document. Everything works fine except there are times when not all of the fields are populated so i get an error "Invalid use of NULL". Can someone please show me how I can adjust the following code so that if a field is NULL or empty it will just skip it and go to the next one? Below is a sample of the code im using
Thank you in advance for any help!
Paul
Code:
.ActiveDocument.Bookmarks("bfirst").Select
.Selection.Text = (CStr(Forms!frm_quote!bfirst))
.ActiveDocument.Bookmarks("blast").Select
.Selection.Text = (CStr(Forms!frm_quote!blast))
.ActiveDocument.Bookmarks("bcompany").Select
.Selection.Text = (CStr(Forms!frm_quote!bcompany))
.ActiveDocument.Bookmarks("baddress1").Select
.Selection.Text = (CStr(Forms!frm_quote!baddress1))
Thank you in advance for any help!
Paul