Again, he who looks shall find answers.
Looking through my code, I found the answer, and let me just say that the
StyleSheet property is able to recieve a full path.
Here is a function I use to initialize plots:
Public Function InitPlot(hgPlotter As String, hgRotation As Integer,
hgPlotStyle As String, hgPlotPaper As String, Optional hgDenominator As
Double, Optional hgScaleToFit As Boolean) As String
Dim Numerator As Double
On Error GoTo Error:
InitPlot = ""
Numerator = 1
hgPlotter = hgPlotter & ".pc3"
If hgPlotCon.ConfigName = hgPlotter Then
Else
hgPlotCon.ConfigName = hgPlotter
End If
If hgPlotCon.CanonicalMediaName = hgPlotPaper Then
Else
hgPlotCon.CanonicalMediaName = hgPlotPaper
End If
If hgPlotCon.PaperUnits = acMillimeters Then
Else
hgPlotCon.PaperUnits = acMillimeters
End If
hgPlotCon.PlotRotation = hgRotation
hgPlotCon.StyleSheet = hgPlotStyle
hgPlotCon.SetWindowToPlot Point1, Point2
hgPlotCon.PlotType = acWindow
If hgScaleToFit = False Then
hgPlotCon.UseStandardScale = False
hgPlotCon.SetCustomScale Numerator, hgDenominator
ElseIf hgScaleToFit = True Then
hgPlotCon.UseStandardScale = True
hgPlotCon.StandardScale = acScaleToFit
End If
Exit Function
Error:
InitPlot = Err.Description
End Function
As it turned out, I had for some reason forgot an extra L in acMillimeters.
And strangely enough this caused StyleSheet to fail when given a full path.
Odd!!! But my problem is solved.
Chears.
Morten Andersen
"Morten Andersen" wrote in message
news:260B92C8BE8B13F8521804BC951DEFD5@in.WebX.maYIadrTaRb...
> Hi,
>
> Does anyone know if it's possible to specify Plot Style Tables located in
a
> different folder than the standard PlotStyle folder?
>
> Have any experimented with this?
>
> Regards,
>
> Morten Andersen
>
>