Hi All,
When I use System.PrivateProfileString I cannot read the results of a
certain key.

I've tried a couple of different things to make it work to no avail.

Any pointers?

If aStyArrStyleType(i) <> "wdStyleTypeCharacter" Then
For z = 0 To lTabCount - 1

strTabPos = "Tab" & Format(z, "00") & "Pos="
strTabAlign = "Tab" & Format(z, "00") & "Align="
strTabLeader = "Tab" & Format(z, "00") & "Leader="

aStyArrParaTabPos(z, i) = System.PrivateProfileString(strIniFileLoc,
"Style" & Str(i + 1), "Tab" & Format(z, "00") & "Pos=")
aStyArrParaTabAlign(z, i) =
System.PrivateProfileString(strIniFileLoc, "Style" & Str(i + 1),
strTabAlign)
aStyArrParaTabLeader(z, i) =
System.PrivateProfileString(strIniFileLoc, "Style" & Str(i + 1),
strTabLeader)
Next z
End If

.ini file contents

[Style 1]
Name=List1
Size=11
FontType=Times New Roman
StyleType=wdStyleTypeParagraph
Tab00Pos=
Tab00Align=
Tab00Leader=
Tab01Pos=0.635
Tab01Align=6
Tab01Leader=0
Tab02Pos=1.629833
Tab02Align=0
Tab02Leader=0

Re: System.PrivateProfileString by Word

Word
Thu May 05 20:50:54 CDT 2005

G'day jb@jb.com,

I normally use Format$(expression) to convert numerics to alphas.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


jb@jb.com reckoned:

>Hi All,
>When I use System.PrivateProfileString I cannot read the results of a
>certain key.
>
>I've tried a couple of different things to make it work to no avail.
>
>Any pointers?
>
>If aStyArrStyleType(i) <> "wdStyleTypeCharacter" Then
> For z = 0 To lTabCount - 1
>
> strTabPos = "Tab" & Format(z, "00") & "Pos="
> strTabAlign = "Tab" & Format(z, "00") & "Align="
> strTabLeader = "Tab" & Format(z, "00") & "Leader="
>
> aStyArrParaTabPos(z, i) = System.PrivateProfileString(strIniFileLoc,
> "Style" & Str(i + 1), "Tab" & Format(z, "00") & "Pos=")
> aStyArrParaTabAlign(z, i) =
> System.PrivateProfileString(strIniFileLoc, "Style" & Str(i + 1),
> strTabAlign)
> aStyArrParaTabLeader(z, i) =
> System.PrivateProfileString(strIniFileLoc, "Style" & Str(i + 1),
> strTabLeader)
> Next z
>End If
>
>.ini file contents
>
>[Style 1]
>Name=List1
>Size=11
>FontType=Times New Roman
>StyleType=wdStyleTypeParagraph
>Tab00Pos=
>Tab00Align=
>Tab00Leader=
>Tab01Pos=0.635
>Tab01Align=6
>Tab01Leader=0
>Tab02Pos=1.629833
>Tab02Align=0
>Tab02Leader=0