Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

API to retreve MS Word exe path

Status
Not open for further replies.

SimonFinn

Programmer
Mar 13, 2003
130
0
0
GB
Hi Guys

Im attempting to use an API from Access/VBA to retreve the Path of MS Word Executable.

I am assuming that i need to pass the regestry key to the API and that this Key is the same for all Windows OS's and all versions of MS Word (is this correct).

I am also assuming that this will enable me to install my database on any windows OS and it will return the relevent path (is this right?)

If so if you have done this before do you have an example or know which API i need to declare?

Thanks Si

 
SimonFinn,

Besides API, WMI can be used to determine where the file is installed, I believe.

Determine If Word is Installed

Script to retrieve info about installed Windows Installer apps

Scriptomatic Tool


In the Left margin select TechNet Home > Script Center > Computer Management > Enumerate Installed Software

objSoftware.InstallLocation

Find File (using Filesystemobject also see vbscript - filesystemobject for more details.)

Hope this helps.
DougCranston
 
Hi Doug

THanks for the info, is WMI supported by Office 2000/Windows 98?

Thanks Si
 
Windows Management Instrumentation Downloads

Verision 1.5 is for 95/98/98SE
Windows Management Instrumentation (WMI) CORE 1.5 (Windows 95/98)

Platforms Supported by WMI and Host Integration Server

Windows Script - Info and details on use.

For more info go to MSDN and search for "wmi"

Hope this answers your questions and helps.
DougCranston
 
Hi Doug

I need to use somthing that does not require any additional installations on the system.

Is this possible

Thanks Si
 
SimonFinn,

WMI is standard install for Win2000 and XP.

On NT if you have Serve Pack 4 or Greater it should be there.

Win98 would require the software installed.

The only other alternative is to use VBScript and WScripting and that requires IE5 I believe to be installed.

If this meets systems requirements then pursue VBScript/WSH using the Filesystemobject. Details on that search google on "filesystemobject" Quick and dirty, go to
How do I find out if a file exists? (Note this example is designed to run on a server, and would require just a little work to run on a client PC.)

NOTE: If your looking for embedding this in Access, you can just make minor changes to adapt it to become a VBA Function.

Other than that I have no clue.

Hope this helps.
DougCranston
 
Thanks for your help Doug

Will Look into the VBScript as i can gurantee that they have IE5 installed.

Sorry about the awkwardness of my question.

Thanks again Si
 
Great!

Thanks Doug - i thought i had heard of it somewhere!

Will get down to it
 
Hi,

Along similarlines, has anybody run into problems with Mail Merge and MS ACCESS - between Office XP and Office 2000 environments ? I know this appears to be unrelated to the original discussion, but I have run into a problem where the Mail Merge header information APPEARS to become corrupted or modified once the mail merge is opened in XP (WORD XP linking to MS ACCESS MDE file in XP too). Subsequent document opens in WORD 2000 using ACCESS 2000 appear to lose the MERGE links and when I try to RECREATE the MERGE links in WORD2000 to an MDE (Access 2000) database - I am asked to select HEADER RECORD DELIMETERS - with a bunch of gibberish below in the PREVIEW window.

I know that this is not directly related to the API question, but you folks really seemed to know the Ins and Outs of MSACCESS and the Windows Environment and I thought you might have some insight on this problem. I have recreated it several times now.
 
BeachBumTechie,

Mail Merge Word XP showing 0's in fields that should be blank

A cause may tie to a reference at:

Which states:
"If you experience problems with merge fields not appearing in the drop down list in Word or other strange problems or errors, try rebooting and also check your available RAM. Word may have problems with the mail merge files in low memory conditions which can occur when running multiple programs over an extended period of time if there are memory leaks."

Mail Merge - Word 2002

Hope this helps. If not, suggest you open a new post in either the Microsoft: Office or VBA Visual Basic for Applications (Microsoft) Forums.

DougCranston
 
Doug,

Thanks for the suggestions - I will research your pointers. My guess is that this may likely be related to the low memory conditions, as it is a flaky problem that does sometimes appear to be corrected by a reboot.

Thanks again for your suggestions. I'll let you know what I figure out when it is fixed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top