Outline Width

I had a simple macro in Corel 2020 to toggle the outline on and off. Since I updated to 2023 I've been getting a weird bug.

If there is no outline, it's creating an outline in inches. instead of 0.5pts default. What am I missing?

Sub Toggle_Outline()
  Dim s As Shape
  For Each s In ActiveSelectionRange.Shapes
    
    If s.Outline.Width > 0 Then
      s.Outline.SetNoOutline
    ElseIf s.Outline.Width = 0 Then
      's.Outline.SetProperties 1    <-----Was working in 2020.
      s.Outline.SetProperties 0.5 'tried to change to 0.5pt but makes a outline .5" wide.
    End If
  
  Next s
End Sub
Parents Reply
  • I don't understand what kind of problem it causes.

    If I offer someone a code snippet to set the width of an outline in millimeters, I don't need to also change the value of ActiveDocument.Unit - which could affect the way that other macros work (if those macros were written with the assumption that ActiveDocument.Unit was inches).

Children
No Data