如何解决有什么办法可以防止某些动作记录在宏中?
我正在研究coreldraw,但是我需要记录宏,但是我发现,如果我在放大和缩小宏的同时在记录宏,就可以像在代码中看到的那样记录它:
Sub Macro1()
' Recorded 20/10/2020
Dim s1 As Shape
Set s1 = ActiveLayer.CreateRectangle(1.182217,8.734961,5.822764,1.853063)
s1.Rectangle.CornerType = cdrCornerTypeRound
s1.Rectangle.RelativeCornerScaling = True
s1.Fill.ApplyNoFill
s1.Outline.SetPropertiesEx 0.007874,OutlineStyles(0),CreateCMYKColor(0,100),ArrowHeads(0),cdrFalse,cdrOutlineButtLineCaps,cdrOutlineMiterLineJoin,0#,100,MiterLimit:=5#,Justification:=cdrOutlineJustificationMiddle
Dim s2 As Shape
Set s2 = ActiveLayer.CreateRectangle(1.939858,8.166728,5.096693,2.515996)
s2.Rectangle.CornerType = cdrCornerTypeRound
s2.Rectangle.RelativeCornerScaling = True
s2.Fill.ApplyNoFill
s2.Outline.SetPropertiesEx 0.007874,Justification:=cdrOutlineJustificationMiddle
Dim s3 As Shape
Set s3 = ActiveLayer.CreateRectangle(2.444953,7.661638,4.623169,3.021091)
s3.Rectangle.CornerType = cdrCornerTypeRound
s3.Rectangle.RelativeCornerScaling = True
s3.Fill.ApplyNoFill
s3.Outline.SetPropertiesEx 0.007874,Justification:=cdrOutlineJustificationMiddle
Dim s4 As Shape
Set s4 = ActiveLayer.CreateRectangle(2.792205,7.314386,4.244346,3.368343)
s4.Rectangle.CornerType = cdrCornerTypeRound
s4.Rectangle.RelativeCornerScaling = True
s4.Fill.ApplyNoFill
s4.Outline.SetPropertiesEx 0.007874,Justification:=cdrOutlineJustificationMiddle
s1.Move 2.083512,-2.272921
ActiveDocument.Undo
Windows.FindWindow("test.cdr*").ActiveView.SetViewPoint 3.423571,8.040457,16
Windows.FindWindow("test.cdr*").ActiveView.SetViewPoint 5.623571,9.240457,31
ActiveDocument.AddToSelection s2,s3
Dim s5 As Shape
Set s5 = ActiveSelection.Group
End Sub
此命令对此负责:
Windows.FindWindow("test.cdr*").ActiveView.SetViewPoint 3.423571,31
所以当我在另一个文档中运行宏时,它会失败
是否有任何方法可以防止记录此操作或总体上解决此问题?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。