5941 error with a bookmark

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hello,

I had a word document created by the person before me that has quit working.
I get the '5941' The requested member of the collection does not exist.

The one it debugs to is the PFNum option. The person that this was written
for would sometimes leave info in the form that popped up, she was instructed
then to debug and delete it manually in the program (once again before my
time). The last time this error started coming up. I honestly do not even no
were to look.

It is supposed to pop up a form that you fill in then it fills in the
letter. Any help would be appreciated. It seems odd it just stops on that
one. If I comment it off then I get the same error for the frmMain at the
bottom.


Private Sub Document_New()
frmMain.Show
End Sub

Private Sub Document_Open()

With ThisDocument
.Bookmarks("Name").Range.Text = ""
.Bookmarks("Address").Range.Text = ""
.Bookmarks("CSZ").Range.Text = ""
.Bookmarks("EffDates").Range.Text = ""
.Bookmarks("Agent1").Range.Text = ""
.Bookmarks("Agent2").Range.Text = ""
.Bookmarks("PFNum").Range.Text = ""
.Bookmarks("PolicyNum").Range.Text = ""
.Bookmarks("CheckNum").Range.Text = ""
End With

frmMain.Show
End Sub

Thanks,

Kevin
.



Relevant Pages

  • RE: 5941 error with a bookmark
    ... Loaded the script writer and it hadn't been given a name, ... "Kevin Porter" wrote: ... The one it debugs to is the PFNum option. ... Private Sub Document_Open ...
    (microsoft.public.word.vba.general)
  • no events firing in ThisOutlookSession
    ... I wrote a simple Application_ItemSend event handler for ThisOutlookSession. ... reran it) quit working. ... Private Sub Application_ItemSend ...
    (microsoft.public.outlook.program_vba)