Run time error 5941 word

run time error 5941 word

Run-time error 5941 in Word 2010 This topic has 7 replies, 3 voices, and was last updated 9 years ago. The requested member of the collection does not exist. Solved: Word Runtime error '5941' Hi, I'm hoping someone can help please. I've been trying to adapt Dian Chapman's code for autofilling an. Hi, I'm working on an Word offertemplate, after lots of hardworking, it's finished! But now there's a big problem, If the template is merged with.

Run time error 5941 word - useful question

Contact US


Thanks. We have received your request and will respond promptly.

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!

  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Us!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Tek-Tips Posting Policies

Contact US

Run-time error 5941 only in the Word templates

Run-time error 5941 only in the Word templates



I have been trying to get this Macro to work but I have had no luck.
It works fine, but when I put my word file with the macro in "My templates" it shows me an error:
Run-time error 5941
The request member of the collection does not exist.

The error occurs in this line:
For Each Zelle In ActiveDocument.Tables(1).Rows(cboAOrt.ListIndex + 2).Cells

Dim Zelle As Cell
Dim Bereich As Range

  I = 0
  If cboAOrt.ListIndex = -1 Then cboAOrt.ListIndex = 0
  For Each Zelle In ActiveDocument.Tables(1).Rows(cboAOrt.ListIndex + 2).Cells
    Set Bereich = ActiveDocument.Range(Start:=Zelle.Range.Start, End:=Zelle.Range.End - 1)
    Select Case I
    Case 0
      Nr = 1
      Zweigstelle = Bereich.Text
    Case 1
      Strasse = Bereich.Text
    Case 2
      Ort = Bereich.Text
    Case 3
      Telefon = Bereich.Text
    Case 4
      Telefax = Bereich.Text
    Case 5
      Mail = Bereich.Text
    Case 6
      Name = Bereich.Text
    Case 7
      Titel = Bereich.Text
    End Select
    I = I + 1
  Next Zelle

Has anybody any ideas why?

Thanks for any help

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Bookmark. Also checked names in DB and Table name although code does not get to table name bit. Stops at [vba]vDeptCode = ActiveDocument.FormFields("bkDeptCode").Result[/vba]. Checked that numbers in doc map to Numbers in DB
The Locals window shows Me Type ThisDocument/Document vRecordset Nothing VDept Value "" Type String

I don't know enough to know whether my problem is in the DB, doc or code...... please help

Thanking you in advance