How to remove treat objects as filled in vba

How to remove treat objects as filled in vba

  • Hello,
    I can not say how to disable, but can show how to toggle "treat objects as filled" status

    1. assign key combination Ctrl-Shift-F to "Treat As Filled" command
    2. VBA code:
    Sub change_treat_as_filled()
    SendKeys "^+f"
    End Sub

    The question of how to determine the status - turn on / off "Treat objects as filled" remains unanswered for now.

    It should be noted that when Corel is restarted, the state of "Treat objects as filled" is preserved. I don't know where this state is saved. It could be in the registries, in the globalmacros.gms file, or another configuration file. This could be fixed by renaming the current globalmacros.gms. I don't recommend deleting in order to preserve the data in it and by restoring the original name to restore the functionalities in it. After renaming globalmacros.gms, Corel will have created a new one with the same name. We need to make sure to delete the newly created globalmacros.gms, otherwise we won't be able to rename the original file with that name again.

    Greetings!

  • Sub Macro1()
         Dim s As Shape
         Set s = ActiveShape
         s.Fill.ApplyNoFill
    End Sub