Word References

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am using a split database with a couple of users using it. One user has
Word 2003 installed and the other has Word 2000 installed. In order for the
code I wrote (mail merge) to work, Word 2003 allows it to work and Word 2000
doesn't. If the user that's using the database with the Word 2000 installed
he/she gets an error about Word library missing (the library for 2003). The
mail merge code is only going to be used from the 2003 machine, and it works
fine. Is there a way that the other 2 users can use the database with an
appropriate 2000 reference?

Thanks,
D. Collins
 
D said:
Hello,

I am using a split database with a couple of users using it. One
user has Word 2003 installed and the other has Word 2000 installed.
In order for the code I wrote (mail merge) to work, Word 2003 allows
it to work and Word 2000 doesn't. If the user that's using the
database with the Word 2000 installed he/she gets an error about Word
library missing (the library for 2003). The mail merge code is only
going to be used from the 2003 machine, and it works fine. Is there
a way that the other 2 users can use the database with an appropriate
2000 reference?

Switch to late binding which will allow you to remove the reference entirely.
Late binding is (for the most part) version independent.
 
I know this problem well, and it is a real pain. What I have found is that
if I do my development on a machine with the OLDEST versions of Access and
Word, then it will work fine on the later versions - I don't know how, but I
don't care! But if I do any development on the LATER versions of
Access/Word, it will not work on the earlier ones. At my client's site
where this problem occurs (a mixture of Office 2000 and Office 2003), I am
able to choose a machine with the earlier versions to work on - if you don't
have that option, then maybe the other response to your post is more useful.
You don't even have to change anything with the later version - I have found
that if I just go into design view of ANY form, report etc to look at it
(i.e. just look, not change anything) with the later Access version, it will
still screw up. So, best to avoid touching the MDBs at all with the later
version.

Hope this helps
 
Rick,

I tried using the late binding, but I received an error that said data
member not found. Perhaps if you look at this code you might be able to tell
me what I did wrong. Thanks, D.

Dim objWord As Object
Dim objDoc As Document

Set objWord = CreateObject("Word.Application")
objWord.Application.Visible = True

Set objDoc = objWord.Documents.Open(strDir & strDocumentName)
objdoc.MailMerge.OpenDataSource _
Name:="C:\Documents and Settings\D\Desktop\Projects\Project
Tracking.mdb", _
LinkToSource:=True, AddToRecentFiles:=False, _
Connection:="QUERY qselVendorNames", _
SQLStatement:=strSQL
 
Back
Top