view registry settings vba in word for mac

P

Paul Berkowitz

How can I view registry settings that I added/modified with VBA in Word for
mac?

There's no registry on a Mac and no registry settings for Word therefore. So
there's nothing to see.

What are you actually trying to do here, and how did you try to do it?

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
J

JE McGimpsey

Paul Berkowitz said:
There's no registry on a Mac and no registry settings for Word therefore. So
there's nothing to see.

Not strictly true, Paul - VBA uses SaveSetting and GetSetting to store
"registry" values. On the Mac, they're stored in a file in the
Preferences:Microsoft folder with the same name as the "appname"
argument.
 
P

Paul Berkowitz

Not strictly true, Paul - VBA uses SaveSetting and GetSetting to store
"registry" values. On the Mac, they're stored in a file in the
Preferences:Microsoft folder with the same name as the "appname"
argument.


Hmmmm. There are only two of those - "Microsoft Excel" and "Microsoft Word"
- and they're both completely blank when opened in TextEdit. (I won't bother
to comment that they're both - Word included - referred to as a "Microsoft
Excel preferences file", and don't open at all in Excel).

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
J

JE McGimpsey

Not strictly true, Paul - VBA uses SaveSetting and GetSetting to store
"registry" values. On the Mac, they're stored in a file in the
Preferences:Microsoft folder with the same name as the "appname"
argument.


Hmmmm. There are only two of those - "Microsoft Excel" and "Microsoft Word"
- and they're both completely blank when opened in TextEdit. (I won't bother
to comment that they're both - Word included - referred to as a "Microsoft
Excel preferences file", and don't open at all in Excel).[/QUOTE]

Not the Office application name, the "appname" argument, as listed in
VBA Help:
SaveSetting Statement

Saves or creates an application entry in the application's entry in the
Windows registry or (on the Macintosh) information in the application's
initialization file.
Syntax
SaveSetting appname, section, key, setting

So when I write

SaveSetting _
appname = "JEMApp", _
section:= "Start", _
key:= "Default_Records", _
setting:= 10

then a file named "JEMApp" is created in the

~:LIbrary:preferences:Microsoft:

folder, containing the specified information.

The data is stored in the resource fork of the file, which is why
TextEdit doesn't see anything. However, the resource fork contains this
text:
This document describes user preferences for the application
Microsoft Word. You cannot open or print this document. To be
effective, this document must be stored in the Preferences folder in
the System Folder

along with the specified section, key and setting.
 
P

Paul Berkowitz

Thanks for all the detailed explanation, John. I misunderstood, as you
realized. I now have a vague memory of having once ventured there before
(after Bill Coan, Word MVP). "Preferences folder in the System Folder", eh?
;-) Right, it makes an honest-to-goodness OS 9-type preferences file, and
did so even back in the days when you couldn't do that in AppleScript, for
example. (You can now via 'do shell script "defaults write"' for any app,
and via 'user defaults' in AppleScript Studio. These don't use resource
forks but rather OS X plist files.)

--
Paul Berkowitz


From: JE McGimpsey <[email protected]>
Organization: McGimpsey & Assoc,
Newsgroups: microsoft.public.mac.office.word
Date: Sat, 28 May 2005 23:38:43 -0600
Subject: Re: view registry settings vba in word for mac




Hmmmm. There are only two of those - "Microsoft Excel" and "Microsoft Word"
- and they're both completely blank when opened in TextEdit. (I won't bother
to comment that they're both - Word included - referred to as a "Microsoft
Excel preferences file", and don't open at all in Excel).

Not the Office application name, the "appname" argument, as listed in
VBA Help:
SaveSetting Statement

Saves or creates an application entry in the application's entry in the
Windows registry or (on the Macintosh) information in the application's
initialization file.
Syntax
SaveSetting appname, section, key, setting

So when I write

SaveSetting _
appname = "JEMApp", _
section:= "Start", _
key:= "Default_Records", _
setting:= 10

then a file named "JEMApp" is created in the

~:LIbrary:preferences:Microsoft:

folder, containing the specified information.

The data is stored in the resource fork of the file, which is why
TextEdit doesn't see anything. However, the resource fork contains this
text:
This document describes user preferences for the application
Microsoft Word. You cannot open or print this document. To be
effective, this document must be stored in the Preferences folder in
the System Folder

along with the specified section, key and setting.[/QUOTE]
 

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