Thanks for the quick reply, but I'm still a little stuck.
I have loop'ed through the References and detected that "Word" was not
loaded. Loaded it and all is fine.
Then I read Hint 8 of the first article where it says don't do this, but go
through the registry instead. How do I do that? What key am I looking for?
What VB functions allow Registry access?
I'm also having trouble with the Dir function. I want to locate MSWORD.OLB
so I can load it, but it's location varies according to Word version. Code
like strFilename = Dir ("C:\Program Files\Microsoft
Office\Office*\MSWORD.OLB") doesn't work. What's the trick?
Marc, I don't know the API calls off the top of my head, but you can
probabably adapt them from a VB site such as:
http://vbnet.mvps.org/
Are you sure you don't want to use late binding?

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> Thanks for the quick reply, but I'm still a little stuck.
>
[quoted text clipped - 37 lines]
>>> a. Reliably detect which version of Word is installed, and
>>> b. Set the reference before I load/open any forms?
Marc Hillman - 18 Jul 2005 13:21 GMT
I would use late binding, but I don't know what it is. The Office Automation
2000 help file isn't much help.
You've been very helpful already, but can I stretch the friendship and ask
for a code fragment to detect an absent or missing reference to Word?
> Marc, I don't know the API calls off the top of my head, but you can
> probabably adapt them from a VB site such as:
[quoted text clipped - 43 lines]
>>>> a. Reliably detect which version of Word is installed, and
>>>> b. Set the reference before I load/open any forms?
Marc Hillman - 18 Jul 2005 13:35 GMT
Ah, I am actually using late binding, but I didn't realise it.
The problem is that I wish to call Word, and wait till the user finishes. To
do this I have declared "Public WithEvents objWord as "Word.Application",
and respond to the Quit event. The "Word.Application" bit is the problem.
Public WithEvents objWord as Object isn't legal, so how do I do late binding
with a WithEvents?
> Marc, I don't know the API calls off the top of my head, but you can
> probabably adapt them from a VB site such as:
[quoted text clipped - 43 lines]
>>>> a. Reliably detect which version of Word is installed, and
>>>> b. Set the reference before I load/open any forms?
Allen Browne - 18 Jul 2005 13:49 GMT
The article I pointed you to is the best example I can give.
Perhaps others can help.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> Ah, I am actually using late binding, but I didn't realise it.
>
[quoted text clipped - 40 lines]
>>>> at:
>>>> http://support.microsoft.com/default.aspx?scid=kb;en-us;260410
Use late binding. Otherwise, you're just making problems for yourself.

Signature
Paul Overway
Logico Solutions
http://www.logico-solutions.com
> Thanks for the quick reply, but I'm still a little stuck.
>
[quoted text clipped - 40 lines]
>>> Marc Hillman, Melbourne, Australia
>>> web: http://users.bigpond.net.au/mhillman/