Word Templates

G

Gunnar From Sweden

Hello

I have done Wordtemplates for PC and i now try to change them
to also works in MAC.

When i start my Wordtemplate i want Word to start with a Form
who will fill in som fields from a textfile.

Frmfax.txttillavsändare = System.PrivateProfileString("c:\Mallpaket\min info.txt", "Ett", "strNamn")

Frmfax is the form and .txttillavsändare is the field.

The path is c:\Mallpaket\min info.txt".

And thats the problem, can anyone tell me how this
path should be written ?

Mallpaket is folder and Macintosh HD is the computer
and "min info.text" is the textfile
 
J

Jonathan West

Gunnar From Sweden said:
Hello

I have done Wordtemplates for PC and i now try to change them
to also works in MAC.

When i start my Wordtemplate i want Word to start with a Form
who will fill in som fields from a textfile.

Frmfax.txttillavsändare = System.PrivateProfileString("c:\Mallpaket\min info.txt", "Ett", "strNamn")

Frmfax is the form and .txttillavsändare is the field.

The path is c:\Mallpaket\min info.txt".

And thats the problem, can anyone tell me how this
path should be written ?

Mallpaket is folder and Macintosh HD is the computer
and "min info.text" is the textfile

Hi Gunnar

On the Macintosh, the path separator is the : character, not \. (Or at least
it used to be - I haven't played with a Mac under OS X, so I don't know if
it has since become the unix-like / character.)

If you need to detect at runtime which character to use, the
Application.PathSeparator property returns the correct character.

The experts on Word for Mac can be found in the
microsoft.public.mac.office.word group. I'm crossposting this reply there so
that you can benefit from any additional information they might be able to
add.
 
J

JE McGimpsey

Jonathan West said:
On the Macintosh, the path separator is the : character, not \. (Or at least
it used to be - I haven't played with a Mac under OS X, so I don't know if
it has since become the unix-like / character.)

Jonathan -

the MacOS separator is still the colon :)) character. In the Terminal
(unix command-line) application or X Window System (X11) the / is used
instead.
 
J

JE McGimpsey

Jonathan West said:
Hi Gunnar

On the Macintosh, the path separator is the : character, not \. (Or at least
it used to be - I haven't played with a Mac under OS X, so I don't know if
it has since become the unix-like / character.)

If you need to detect at runtime which character to use, the
Application.PathSeparator property returns the correct character.

The experts on Word for Mac can be found in the
microsoft.public.mac.office.word group. I'm crossposting this reply there so
that you can benefit from any additional information they might be able to
add.

The bigger problem is that there is no default c:\ drive designation on
Macs.

You'll want to use conditional compilation. Perhaps something like this:

#If Mac Then
Frmfax.txttillavsndare = System.PrivateProfileString( _
Options.DefaultFilePath(wdDocumentsPath) & _
"mininfo.txt", "Ett","strNamn")
#Else
Frmfax.txttillavsndare = System.PrivateProfileString( _
"c:\Mallpaket\mininfo.txt", "Ett", "strNamn")
#End if
 

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