Mac storage or equivalent of pc .ini file?

W

Wendy

I mainly develop Word VBA applications on a pc but occasionally setup
mac templates as well. On the pc I often use an .ini file to save
information that can be retrieved later i.e. the users name, dept, tel
no. etc. The idea being that if they have a whole suite of templates,
they enter this information once and this can then be retrieved in
whichever template requires it.

Is there anything like this on a mac and if so, could anyone point me
in the direction of some code or a tutorial?

Many thanks.
 
C

CyberTaz

Hi Wendy -

I'm not really a coder, so I won't directly address the question. There
will undoubtedly be several other replies that will.

One thought to offer, however, is File>Properties, which can be used
for everything you mentioned plus significantly more... all of which
can be referenced in the docs by way of Fields. Info stored in the
template Properties are inherited by docs based on it and can be
modified as necessary _unless_ Protection is used.

Just thought it might be another option if you weren't already familiar
with it.

Regards |:>)
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Wendy:

Assuming you are using PrivateProfileString, that still works on the Mac:

System.PrivateProfileString("Macintosh HD:Users:Shared:Settings.txt",
"MacroSettings", _
"LastFile") = ActiveDocument.FullName

You will need to do some #IF... tap-dancing to create a Mac file path for
the property.

Cheers


I mainly develop Word VBA applications on a pc but occasionally setup
mac templates as well. On the pc I often use an .ini file to save
information that can be retrieved later i.e. the users name, dept, tel
no. etc. The idea being that if they have a whole suite of templates,
they enter this information once and this can then be retrieved in
whichever template requires it.

Is there anything like this on a mac and if so, could anyone point me
in the direction of some code or a tutorial?

Many thanks.

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
 

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