The version of Word is "application.version"
Msgbox "The version of Word is " & Application.Version
Returns a read-only string.
The Applications folder is more entertaining: Word doesn't own it, and
doesn't know where it is. You "should" ask OS X for it (using do
AppleScript).
But you could also "assume" that it is in the root of the boot drive: so you
can simply address it as "/Applications". While this is not 100 per cent
according-to-Hoyle, it would be a very rare Mac user indeed who would
attempt to either move it or re-name it. If they do either, they would have
to set a symbolic link to it, or their system wouldn't operate! So you
would be 99.9% safe.
But what are you trying to do? If you are writing any kind of corporate
application, it is VERY unlikely that the logged-in user would have write
access to that folder, and often, won't have read access either.
If all you are trying to do is store persistent information, use the
Registry read/write mechanism, which will default to the user's "Word
Settings (10)" file on the Mac (that file can move around, but Word always
knows where it is...)
System.ProfileString("Settings", "Test") = "foo"
Or you can use the System.PrivateProfileString command to create your own
file. If you do not specify a path (and you shouldn't...) the system
assumes Users/<user name>/Library/Preferences/Microsoft folder.
You do know that none of this stuff is going to work in the current version
of Word, don't you? Just checking...
VBA will be back in the next version, but there is no VBA
compiler/interpreter/runtime in the current version, 2008.
Hope this helps
--
The email below is my business email -- Please do not email me about forum
matters unless I ask you to; or unless you intend to pay!
John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410
+61 4 1209 1410, mailto:
[email protected]
.