PDA

View Full Version : Predefined folder OFFICEDIR



nickhoare
03-22-2004, 05:33 AM
I have seen references to the predefined folder OFFICEDIR in the Express forums but I don't see it in the list of predefined folders in IS5 or in the Help

Is it available in in IS Express 5?

veebeefive
03-22-2004, 11:06 AM
There is a way of obtaining the special folder locations using the API functionality. However I am not sure it is possible using VB SCript actions. That would allow you to find almost anything.

The mention you are talking about is perhaps this :-

****************

Now create a VBScript with the following code:

Dim WShell
Dim AccessPath
Set WShell = CreateObject("Wscript.Shell")
AccessPath = WShell.RegRead ("HKLM\Software\microsoft\windows\Current Version\AppPath\MSACCESS.EXE\Path")
MsgBox AccessPath

Session.property("OFFICEDIR") = AccessPath

****************

You would then reference [OFFICEDIR] in your path as normal.

This actually finds the MS Access install path and puts it into the special value [OFFICEDIR] which is purely custom and NOT a standard special folder value.

Hope this helps clear this up.

Carl.

veebeefive
03-22-2004, 11:14 AM
Ooops sorry one more correction and more useful information.

1) Use App Paths and NOT AppPath.

2) You can look in the registry and find path for winword.exe, msaccess.exe, powerpnt.exe, iexplore.exe etc. etc.

Very useful information

Carl.

nickhoare
03-22-2004, 12:27 PM
Thanks, I did find that, however, I cannot do is refer to OfficeDir anywhere in the Express frontend. I want to be able to select
<OfficeDir>msaccess.exe as the Target for a shortcut but I am only allowed to selected from the predefined locations.

Using Target:<OfficeDir>msaccess.exe was suggested by Chandima in the thread "<OfficeDir> directory specifier for Office XP" but I can't see how to enter that in IS Express 5

No point in setting OfficeDir if you can't use it!

veebeefive
03-22-2004, 05:52 PM
Hmmm...see what you mean, I have just tried to actually point at a file that is referenced into a special folder name [OFFICEDIR] and it wont actually allow me to override the defaults.

I'll check on this and see if I can find a way.

:confused:

FSBarker
08-31-2005, 02:14 PM
What ever became of this? What is the recommended way of using Access in a short cut?

Thanks for any help

Scott