Where are registry settings from VBA stored on Mac

M

Marco

I want to view settings that I added from my VBA code, but I cannot find any
configuration file where my "registry settings" are stored.

Does anyone know how I can find this?

gr. Marco
 
D

Daiya Mitchell

I want to view settings that I added from my VBA code, but I cannot find any
configuration file where my "registry settings" are stored.

Does anyone know how I can find this?

We don't have a registry, obviously. I'm not very clear on the registry,
but I think the closest equivalent is the preferences file, which you can
read about here:
http://word.mvps.org/MacWordNew/BackUpPrefs.htm
(hit refresh a few times in Safari, or use a different browser)
(skim just the relevant parts)

I vaguely suspect prefs files are editable XML files, but generally people
don't edit them, so chances are it is not the best way to go about whatever
you want to do, unlike in Windows where it seems to be a common
troubleshooting suggestion.

Exactly what settings did your VBA code add?

What are you really trying to do?
 
M

Marco

I want to store information that people type in my dialogs which I created
in MS Word.

In VBA there are some functions to do this (savesetting, getallsettings and
more)

these should be adapted to work on the Mac but I cannot find it anywhere.

greetings Marco
 
J

Jim Gordon MVP

Hi Marco,

The version of VBA in Macintosh Office is version 5. Any VBA commands
that work only in version 6 will not work in Mac Office.

That being said, savesetting is valid according to the object model (but
I didn't try this.)

The following is from Word's help:

SaveSetting Statement Example
The following example first uses the SaveSetting statement to make
entries in the Macintosh registry for the MyApp application, and then
uses the DeleteSetting statement to remove them.
' Place some settings in the registry.
SaveSetting appname := "MyApp", section := "Startup", _
key := "Top", setting := 75
SaveSetting "MyApp","Startup", "Left", 50
' Remove section and all its settings from registry.
DeleteSetting "MyApp", "Startup"

Also from Word's help:

GetSetting Function Example
This example first uses the SaveSetting statement to make entries in the
Macintosh registry for the application specified as appname, and then
uses the GetSetting function to display one of the settings. Because the
default argument is specified, some value is guaranteed to be returned.
Note that section names can't be retrieved with GetSetting. Finally, the
DeleteSetting statement removes all the application's entries.
' Variant to hold 2-dimensional array returned by GetSetting.
Dim MySettings As Variant
' Place some settings in the registry.
SaveSetting "MyApp","Startup", "Top", 75
SaveSetting "MyApp","Startup", "Left", 50

Debug.Print GetSetting(appname := "MyApp", section := "Startup", _
key := "Left", default := "25")

DeleteSetting "MyApp", "Startup"

To find these examples, when you are in the visual basic editor search
help. Just type in the command you want information and examples about.

If the examples for VBA are not there, it is possible that they were
left off during the install. Run the installer and do a custom install.
You can install just the VBA help that way.

-Jim
 

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