IsEmpty and bookmark help with excel 97 and word 97

J

JMCN

hi...

i just inherited an excel 97 macro that opens up word 97 documents and
inserts the bookmarks information
in a separate excel file. it works perfectly well grabbing the values
from majority of the bookmarks and
inserting them in to excel but it abruptly stops at a certain bookmark
indicating that it is empty, then
ends the function.

for instance, in the excel macro, the PrevBilled bookmark = empty,
thus PrevBilled bookmark = false.
however in the word document, the PrevBilled bookmark is Yes.

How can the PrevBilled bookmark be empty if the value = yes in the
drop down item?

does anyone have a suggestion as to what i am doing wrong? it's a very
long excel macro with 960 lines, so i'm only sending a tiny part.

thanks in advance... jung
===========================

function v2004bookmark(bookmarknum)

On Error GoTo noBookmark
Select Case bookmarkNum
case 0
wdApp.Selection.Goto What:=wdGoToBookmark, Name:="Preparer"
case 1
wdApp.Selection.Goto What:=wdGoToBookmark, Name:="PrepareDate"
case 2
wdApp.Selection.Goto What:=wdGoToBookmark, Name:="Key1"
case 3... 'to case 10 works fine....

case 11
'Has the Customer been billed previously for this Invoice? Must
Select/Y/N
wdApp.Selection.Goto What:=wdGoToBookmark, Name:="PrevBilled"
'the V2004Bookmark = "False"

Case Else
MsgBox ("Error!")
End Select

V2004Bookmark = "True"
GoTo EndFunc

noBookmark:
V2004Bookmark = "False"

EndFunc:

End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top