Using WORD 2000

I have a program that using MS-word from Office 2000 (word 9.0) to transfer parameter and send it to be print.
I install that program on computer with Office 97 (word 8.0) and it gave me an error msg at the part of using word.
How can I get around the problem.
Who is Participating?
anthonycConnect With a Mentor Commented:
The problem is that you are using a word 9 reference in your application.  This is an instance where Late Binding would work better.  Do this:

dim wrdObject as object
set wrdObject = CreateObject("Word.Application")

now use word as it is.  if Office 97 is installed, the Word.Application will be of word 8, if 2000, then word 9.  Make sure that the VBA you are using in word 9 is supported by word 8 however.
eliasisAuthor Commented:
Thank you for your answer.
It looks like you right, can you just help me how it will work in my code.

Dim objWord As Word.Application
Dim objDoc As Word.Document
Set objWord = New Word.Application     Set objDoc = objWord.Documents.Open("Doc.doc", , True)

also, does it mean that in Project/References I should click off the "Microsoft Word 9.0 Object Library"?
yes it means that.  You may want to leave it on while you code, then change it when you are done.  It will make life easier.  Also, dim all your variables as Word.Application, Word.Document until you are done coding, then change them to OBJECT
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

eliasisAuthor Commented:
I'm very sorry, but can you give me an example from openning to closing a document.
Thank you
eliasisAuthor Commented:
I have also Bookmarks that I reference to them is that going to work?
that'll work..   DO EVERYTHING THE SAME except, dim your variables as OBJECT and use

set x = CreateObject("Word.Application")

 instead of

set x =  new Word.application
All Courses

From novice to tech pro — start learning today.