Registry setting for Proof directory?

H

Howard Kaikow

Options.DefaultFilePath(wdProofingToolsPath) returns

\program files\common files\microsoft shared\proof

Is there a registry setting, or some other means, to get a pointer to

\Documents and Settings\username\Application Data\Microsoft\Proof

when there are no custom dictionaries?
 
N

Norman Goetz

Options.DefaultFilePath(wdProofingToolsPath) returns

\program files\common files\microsoft shared\proof

Is there a registry setting, or some other means, to get a pointer to

\Documents and Settings\username\Application Data\Microsoft\Proof

when there are no custom dictionaries?

Application.CustomDictionaries.ActiveCustomDictionary.Path
Norman Götz
 
H

Howard Kaikow

Norman Goetz said:
Application.CustomDictionaries.ActiveCustomDictionary.Path

That works only when there are custom dictionaries.

I'm looking for a method for when there are no custom dictionaries.
 
S

Steve Yandl

Howard,

Give something like this a try.

Sub GetLocalProofFolder()
Dim objShell As Object
Dim objFolder As Object
Dim strPath As String
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.NameSpace(&H1C&)
strPath = objFolder.Self.Path & "\Microsoft\Proof"
MsgBox strPath
End Sub

The 'objFolder' returned for namespace "&H1c&" is the "Application Data"
subfolder for the local user. You extract the path for that folder and
append the path string with "\Microsoft\Proof" to get the full folder path
you were looking for.

Steve Yandl
 
H

Howard Kaikow

that's the approach i've been using but with the shgetfilefolder api.

another way is.

1. if there are customdictionaries, just use the .path on the
activecustomdictionary object.
2. if no custom dictionaries, temporarily create one, get the path as in
step 1, then delete the dictionary,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top