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
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