как делать макрос в записи newbie
Добрый день!
Хочу макрос делать после записи макрос. Макрос записать получается. Макрос делает не все что делать когда записать. Я найти как открыть макрос и исправлять но не знать какие строки будут отвечать за какие действия когда запись быть. Если может кто сказать буду желать блага.
CorelDRAW X5
Version 15.0.0.486
winXP SP3 pro
Sub vizitka50x90()
' Recorded 04.03.2013
Dim createopt As StructCreateOptions
Set createopt = CreateStructCreateOptions
With createopt
.Name = "vizitka"
.Units = cdrMillimeter
.PageWidth = 90#
.PageHeight = 50#
.Resolution = 300#
.ColorContext = CreateColorContext2("sRGB IEC61966-2.1,ISO Coated v2 (ECI),Dot Gain 15%", BlendingColorModel:=clrColorModelCMYK)
End With
Dim doc1 As Document
Set doc1 = CreateDocumentEx(createopt)
Dim s1 As Shape
Set s1 = doc1.MasterPage.GuidesLayer.CreateGuideAngle(0#, 0#, 90#)
s1.Outline.SetProperties Color:=CreateRGBColor(0, 0, 255)
Dim s2 As Shape
Set s2 = doc1.MasterPage.GuidesLayer.CreateGuideAngle(1.771654, 1.968504, 0#)
s2.Outline.SetProperties Color:=CreateRGBColor(0, 0, 255)
Dim s3 As Shape
Set s3 = doc1.MasterPage.GuidesLayer.CreateGuideAngle(1.771654, 0#, 0#)
s3.Outline.SetProperties Color:=CreateRGBColor(0, 0, 255)
Dim s4 As Shape
Set s4 = doc1.MasterPage.GuidesLayer.CreateGuideAngle(3.543307, 0.984252, 90#)
s4.Outline.SetProperties Color:=CreateRGBColor(0, 0, 255)
Dim s5 As Shape
Set s5 = doc1.MasterPage.GuidesLayer.CreateGuideAngle(-0.044547, 0.984252, 90#)
s5.Outline.SetProperties Color:=CreateRGBColor(0, 0, 255)
doc1.ReferencePoint = cdrCenter
s5.SetPosition -0.11811, 0.984252
Dim s6 As Shape
Set s6 = doc1.MasterPage.GuidesLayer.CreateGuideAngle(1.771654, 2.068898, 0#)
s6.Outline.SetProperties Color:=CreateRGBColor(0, 0, 255)
s6.SetPosition 1.771654, 2.086614
Dim s7 As Shape
Set s7 = doc1.MasterPage.GuidesLayer.CreateGuideAngle(1.771654, -0.113079, 0#)
s7.Outline.SetProperties Color:=CreateRGBColor(0, 0, 255)
s7.SetPosition 1.771654, -0.11811
Dim s8 As Shape
Set s8 = doc1.MasterPage.GuidesLayer.CreateGuideAngle(3.638598, 0.984252, 90#)
s8.Outline.SetProperties Color:=CreateRGBColor(0, 0, 255)
s8.SetPosition 3.661417, 0.984252
Dim s9 As Shape
Set s9 = doc1.MasterPage.GuidesLayer.CreateGuideAngle(0.251457, 0.984252, 90#)
s9.Outline.SetProperties Color:=CreateRGBColor(0, 0, 255)
s9.SetPosition 0.19685, 0.984252
Dim s10 As Shape
Set s10 = doc1.MasterPage.GuidesLayer.CreateGuideAngle(1.771654, 1.777122, 0#)
s10.Outline.SetProperties Color:=CreateRGBColor(0, 0, 255)
s10.SetPosition 1.771654, 1.771654
Dim s11 As Shape
Set s11 = doc1.MasterPage.GuidesLayer.CreateGuideAngle(1.771654, 0.174469, 0#)
s11.Outline.SetProperties Color:=CreateRGBColor(0, 0, 255)
s11.SetPosition 1.771654, 0.19685
Dim s12 As Shape
Set s12 = doc1.MasterPage.GuidesLayer.CreateGuideAngle(3.359508, 0.984252, 90#)
s12.Outline.SetProperties Color:=CreateRGBColor(0, 0, 255)
s12.SetPosition 3.346457, 0.984252
Dim s13 As Shape
Set s13 = ActiveLayer.CreateRectangle(-0.11811, 2.086614, 3.661417, -0.11811)
s13.Rectangle.CornerType = cdrCornerTypeRound
s13.Rectangle.RelativeCornerScaling = True
s13.Fill.ApplyNoFill
s13.Outline.SetProperties 0.007874, OutlineStyles(0), CreateCMYKColor(0, 0, 0, 100), ArrowHeads(0), ArrowHeads(0), cdrFalse, cdrFalse, cdrOutlineButtLineCaps, cdrOutlineMiterLineJoin, 0#, 100, MiterLimit:=5#
s13.Fill.UniformColor.CMYKAssign 0, 0, 0, 10
s13.Outline.SetNoOutline
Windows.FindWindow("vizitka").ActiveView.SetViewPoint 1.143701, 0.115268, 125
Windows.FindWindow("vizitka").ActiveView.SetViewPoint 2.031205, 0.127768, 63
Windows.FindWindow("vizitka").ActiveView.SetViewPoint 2.114524, 1.927768, 125
Windows.FindWindow("vizitka").ActiveView.SetViewPoint 2.222858, 2.119433, 63
Windows.FindWindow("vizitka").ActiveView.SetViewPoint 2.02285, 1.136094, 125
Dim s14 As Shape
Set s14 = ActiveLayer.CreateArtisticText(0.489504, 1.452752, "Text")
s14.Fill.UniformColor.CMYKAssign 0, 0, 0, 100
s14.Outline.SetNoOutline
' Recording of this command is not supported: TextUndoRedo
Windows.FindWindow("vizitka").ActiveView.SetViewPoint 0.872846, 0.886094, 250
s14.Move -0.292661, 0.076059
doc1.ReferencePoint = cdrTopLeft
s14.Stretch 0.751571
' Recording of this command is not supported: TextEdit
' Recording of this command is not supported: TextEdit
' Recording of this command is not supported: TextEdit
s14.Move 0#, 0.000508
Dim s15 As Shape
Set s15 = s14.Duplicate
s15.Move 0.954169, -0.557724
s15.OrderToFront
' Recording of this command is not supported: TextUndoRedo
' Recording of this command is not supported: TextUndoRedo
' Recording of this command is not supported: TextUndoRedo
' Recording of this command is not supported: TextEdit
s15.AlignToPageCenter cdrAlignLeft + cdrAlignRight + cdrAlignTop + cdrAlignBottom, cdrTextAlignBoundingBox
Dim s16 As Shape
Set s16 = s14.Duplicate
s16.Move 1.711102, -1.38976
s16.OrderToFront
' Recording of this command is not supported: TextEdit
s16.Move 1.416882, 0#
' Recording of this command is not supported: TextEdit
' Recording of this command is not supported: TextUndoRedo
' Recording of this command is not supported: TextUndoRedo
' Recording of this command is not supported: TextUndoRedo
' Recording of this command is not supported: TextUndoRedo
' Recording of this command is not supported: TextEdit
s16.Move 0#, 0.336508
Windows.FindWindow("vizitka").ActiveView.SetViewPoint 1.439508, 1.252764, 125
Windows.FindWindow("vizitka").ActiveView.SetViewPoint 2.260346, 0.548594, 250
Windows.FindWindow("vizitka").ActiveView.SetViewPoint 3.852016, 0.923598, 125
Windows.FindWindow("vizitka").ActiveView.SetViewPoint 1.927008, 0.856929, 250
Dim s17 As Shape
Set s17 = s15.Duplicate
s17.Move 0#, -0.241665
s17.OrderToFront
' Recording of this command is not supported: TextUndoRedo
' Recording of this command is not supported: TextUndoRedo
' Recording of this command is not supported: TextEdit
s17.Fill.UniformColor.CMYKAssign 0, 0, 0, 40
s17.Fill.UniformColor.CMYKAssign 0, 0, 0, 70
s17.AlignToPageCenter cdrAlignLeft + cdrAlignRight + cdrAlignTop + cdrAlignBottom, cdrTextAlignBoundingBox
s17.Move 0#, -0.235657
' Recording of this command is not supported: TextEdit
' Recording of this command is not supported: TextEdit
s17.Move 0.324181, 0#
' Recording of this command is not supported: TextEdit
s17.AlignToPageCenter cdrAlignLeft + cdrAlignRight + cdrAlignTop + cdrAlignBottom, cdrTextAlignBoundingBox
s17.Move 0#, -0.231488
' Recording of this command is not supported: TextEdit
s15.Move 0.785039, 0#
' Recording of this command is not supported: TextEdit
s15.AlignToPageCenter cdrAlignLeft + cdrAlignRight + cdrAlignTop + cdrAlignBottom, cdrTextAlignBoundingBox
End Sub
Я хотеть изучать макрос,. Макрос делать
лист 50з90 mm 300dpi cmyk
12 направлять объект
1 блок серый
3 текста
Дааа... ПРОМТ нынче не тот....
Hello! I'd like to create a macros through putting down a new macros with its further alteration. The macros put down all my actions – created a document, chose graphic pallet in cmyk, indicated the height and the width of the working space, set up the guidelines and created a rectangular object and 3 texts, but when I try to reproduce the macros, it doesn’t perform all as I put it down. For example, the guidelines and the rectangular block are on working space and the working space was with coordinates y=0, x=0, but after reproduction it became lower and more left handed. And my text was replaced with just a text object without any symbol. I found how to open this macros in VBA, but didn’t understand the functions of the lines.
Maybe anybody could help me with alteration of the macros or direct me to the similar topic.
I have problems with Russian language and I use google translator. Thank you in advance.
I have nothing to hide, hello interesting question, but only Sancho can help you with it
I have nothing to hide, simple question for you. Why it must be exactly macro, but not the template document?
I don't know about creation of a template, I thought it is possible to do it only through macro. Maybe you can help me how to do it?
Olga, try this link coreldraw template