Problem w/ Word 97 templates in Word XP

  • Thread starter Thread starter DARS
  • Start date Start date
D

DARS

Does anyone know of any problems with templates created in
Word 97, not working in XP. It's a basic template that
does an insert of a picture, bookmark, hide some text,
then show the text -- and some other basic functions.
This template refuses to work. Any ideas.
 
The problem will be with the macros rather than the template. More recent
versions of Word have additional functionality that your old code may not
cater for. You'll need to check your code and ascertain what parts of it are
not working as intended.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Possibly references in the macros that have not upgraded or code that purely
refers to Office 97 applications that you need to run from the template
using automation. Opening the VBA window using alt + F11 and click tools
references. Any marked missing copy down, uncheck and look for the closest
upgraded or downgraded equivalent in your references window when you save
and reopen. Alternatively look for something similar to the following if
you have references to workspaces in the code. You will need a to add to
the code for your version of word and whatever automation app you are using.

'Get Office version from Word
strOfficeVersion = Application.Version
Debug.Print "Office version: " & strOfficeVersion

'Set up reference to correct versions of DAO and Access depending
'on Office version
strDBName = "Cats.mdb"

If Left(strOfficeVersion, 1) = "8" Then
'Office 97 DAO version
Set dbe = CreateObject("DAO.DBEngine.35")
strDBName = "F:\Cats\" & strDBName
ElseIf Left(strOfficeVersion, 1) = "9" Then
'Office 2000 DAO version
Set dbe = CreateObject("DAO.DBEngine.36")
strDBName = "F:\Cats\" & strDBName
ElseIf Left(strOfficeVersion, 4) = "10.0" Then
'Office 2002 DAO version
Set dbe = CreateObject("DAO.DBEngine.36")
strDBName = "E:\Cats\" & strDBName
Else
MsgBox "Unknown Office version; canceling"
Exit Sub
End If

Hope this helps it depends on what the template is designed for, for the
experts do not bother telling me of better or easier ways this is just a
suggestion that works for my stuff and may help out.
 
Back
Top