View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Run-Time error '5941'

You probably need to make the registry change described in the following
article:

http://support.microsoft.com/kb/825765/


Peter Jamieson

http://tips.pjmsn.me.uk

Todd K. wrote:
I have several Word merge documents set up with my database so that when the
user clicks a button, code in the database opens up the Word merge document.
When the Word document opens, code in the Word document runs the merge, makes
a copy of itself and closes the original. Here is a sample of my code in the
Word document:

Option Explicit

Private Sub Document_Open()

Me.MailMerge.OpenDataSource _
Name:="c:\DataSources\KYFDGOLDLGS GOLD_ProjectONESQL.odc", _
Connection:="Provider=SQLOLEDB.1;Integrated Security=SSPI;" & _
"Persist Security Info=False;Initial Catalog=GOLD_ProjectONESQL;data
source=KYFDGOLDLGS;", _
SQLStatement:="SELECT * FROM [TblTEMP_Labels_County]", _
subType:=wdMergeSubTypeOther

Me.MailMerge.Destination = wdSendToNewDocument
Me.MailMerge.Execute
Windows(Me).Close wdDoNotSaveChanges

End Sub

This worked fine until we just got new computers. I understand the new
computers (Dells) came with XP sp3 installed (VB5.7) and MS word has the
latest SP installed as well. The old computers (HP's) should have had XP sp2
which had VB5.6.

Now, when we try to run this, we get "Run-time error '5941': the requested
member of the collection does not exist". Any ideas?