I would like to create a command to set all new shapes as hairline in rgb red.
The same effect as the user double click on the pen symbol (default values for Graphic)
You could try this:
Dim styleThis As Style
Set styleThis = ActiveDocument.StyleSheet.FindStyle("~graphic~")
styleThis.Outline.Width = ActiveDocument.ToUnits(762, cdrTenthMicron)
styleThis.Outline.Color = Application.CreateRGBColor(255, 0, 0)
Maybe you have it in C# ?
Remo Gwerder said:Maybe you have it in C# ?
No, I don't; just VBA.
I try to translate :-)Many thanks
Ok i am not sure what i do it wrong, but i am wrong.....Why do I have to create an object? can't I just assign it?
private void set_new_graphic_default_outline_hairline_RGB_red()
Style styleThis = new Style();
styleThis = corelApp.ActiveDocument.StyleSheet.FindStyle("~graphic~");
corelApp.ActiveDocument.Application.CreateRGBColor(255, 0, 0);