-
-
1Dim s As Shape ActiveDocument.Unit = cdrPoint For Each s In ActiveSelectionRange If s.CanHaveOutline Then With s.Outline If Round(.Width, 2) < 1 Then .SetNoOutline Else .Width = .Width - 1 End If End With End If Next s End Sub
-
1
-
0经核实吧主346323624 未通过普通吧主考核。违反《百度贴吧吧主制度》第八章规定http://tieba.baidu.com/tb/system.html#cnt08 ,无法在建设 打印复印店专家吧 内容上、言论导向上发挥应有的模范带头作用。故撤销其吧主管理权限。百度贴吧管理组
-
0求助,有选择对象a,怎么通过代码实现对象b复制a的填充色。
-
1
-
2
-
0下面一段代码是选定shaperange后执行 Sub tesetRange() Dim ShpRng As New ShapeRange Set ShpRng = ActiveSelectionRange Dim shp As Shape, temprng As New ShapeRange Debug.Print "总共个数:" & ShpRng.count For Each shp In ShpRng temprng.Add ShpRng.Shapes(ShpRng.count) ShpRng.RemoveRange temprng Debug.Print "还剩下个数:" & ShpRng.count Next shp End Sub 总共个数:5 还剩下个数:4 还剩下个数:3 还剩下个数:2 还剩下个数:1 还剩下个数:0 ---------------------------------------------------------- 再看看第二段代码
-
1Sub Macro1() Dim s1 As Shape, OrigSelection As ShapeRange If ActiveSelectionRange.Count > 1 Then Set s1 = ActiveSelectionRange.Group Else: Set s1 = ActiveShape End If s1.AlignToPage cdrAlignHCenter + cdrAlignVCenter End Sub 该代码在X4版本工作正常,但是在2018工作不正常,不能运行 2018录制居中代码如图,函数发生了变化 如果自己编写代码需要考虑在不同的版本兼容: 于是换思路,直接对齐到某个点,cdr提供了这个函数: s1.AlignToPoint cdrAlignLeft + cdrAlignRight + cdrAlignTop + cdrAlignBottom, ActiveDocument.ActivePage.C
-
0Sub copytoallpages() Dim sr As ShapeRange, dup As ShapeRange Dim p As Page If ActiveSelectionRange.Count > 1 Then Exit Sub Set sr = ActiveSelectionRange For i = 1 To ActiveDocument.Pages.Count Set dup = sr.Duplicate() dup.MoveToLayer ActiveDocument.Pages(i).ActiveLayer Next i End Sub
-
1
-
0
-
0可以先安装微软常用运行库 然后在安装包中找到vba.msi 或者重新运行setup.exe来修改安装
-
0
-
0
-
0Sub 移动选择到最后页() Dim sr As ShapeRange, x As Double, y As Double, w As Integer, p As Integer If ActiveDocument.Selection.Shapes.Count = 0 Then MsgBox "没有选择对象。": Exit Sub ActiveDocument.SaveSettings ActiveDocument.Unit = cdrTenthMicron ActiveDocument.ReferencePoint = cdrTopLeft ActiveDocument.DrawingOriginX = 0 ActiveDocument.DrawingOriginY = 0 ActiveDocument.ActivePage.GetSize x, y p = ActiveDocument.Pages.Count w = ActiveDocument.ActivePage.Index ActiveDocument.BeginCommandGroup "移动选择到最后页" Optimization = True EventsEnabled = False
-
0'字号 SizeJ = ActiveShape.Text.Selection.Characters.All.Size sj = SizeJ * 0.03 '首行缩进 ActiveShape.Text.Selection.Characters.All.FirstLineIndent = sj
-
0
-
0很多时候需要平滑节点减少节点数量,但是这两个函数各司其职 s.Curve.Nodes.All.Smoothen 20 此函数只能执行一次,第二次执行将不会产生效果,修改参数也不会变化 s.Curve.Nodes.All.AutoReduce 0.05 需要多次减少节点可用AutoReduce Sub Macro1() ' Recorded 2018/11/21 Dim OrigSelection As ShapeRange Set OrigSelection = ActiveSelectionRange Dim s As Shape For Each s In OrigSelection.Shapes.FindShapes(Type:=cdrCurveShape).Shapes With s.Curve.Nodes.All .AutoReduce 1 '.Smoothen 20 End With Next s End Sub
-
0
-
0皮卡,微宏,金田 买红点激光,有6mm-15mm的,有光源耐用与不耐用的。 有的刻字机(比如皮卡)带有激光头插孔的,就很好改装。 买一个电池盒,为激光头供电。 如果直接连接机器上的220V电源,那就要买电压转换的 激光头定好后,就找出刻刀起点与红点的偏移位置,用十字线生成插件,生成十字定位点。以后每次刻的时候,打开激光,对准十字线,较准平行。就可以启动刻字了。 画一个外框,把激光红点对准外框的点,启动刻字,那刻出来的位置
-
0
-
0Sub 一键标注数字() Dim s As Shape Dim sr As New ShapeRange Dim txt As String Dim c As Color Dim i As Integer, k As Integer, js As Integer Set sr = ActiveSelectionRange.Shapes.FindShapes(, cdrTextShape, True) Set c = CreateCMYKColor(0, 100, 100, 0) For Each s In sr txt = s.Text.Story For i = 0 To 9 k = 1 js = InStr(k, txt, i) Do While js > 0 s.Text.Story.Characters(js, 1).Fill.UniformColor.CopyAssign c s.Text.Story.Characters(js, 1).Size = 10 k = js + 1 js = InStr(k, txt, i) Loop Next Next End Sub
-
0
-
4
-
0
-
1
-
0Sub Test() Dim d As Document Dim s As Shape Dim t As Text Set d = CreateDocument Set s = d.ActiveLayer.CreateParagraphText(3, 3, 5, 5, _ "This is an example. This is an example. This is an " & _ "example. This is an example. This is an example.") Set t = s.Text t.Story.LeftIndent = 0.5 End Sub
-
0Sub aa() Dim sh As Shape Dim sr As New ShapeRange Dim jj As Double Set sr = ActiveSelectionRange jj = 20 ActiveDocument.Unit = cdrMillimeter For Each sh In sr.Shapes ActiveLayer.CreateRectangle sh.LeftX - jj, sh.TopY + jj, sh.RightX + jj, sh.BottomY - jj Next End Sub
-
0
-
0
-
0
-
0
-
0Sub aa() Dim i As Integer, j As Integer, sh As Shape, y As Double y = ActivePage.TopY For i = 1 To 3 For j = 1 To 31 Set sh = ActiveLayer.CreateArtisticText(ActivePage.LeftX, ActivePage.TopY, i & "排" & j & "号") sh.TopY = y y = sh.BottomY Next Next End Sub Excel公式也可以生成 =TEXT(INT(ROW()/31)+1,"0排")&TEXT(IF(MOD(ROW(),31)=0,31&"号",MOD(ROW(),31)),"0号")
-
0
-
1
-
0
-
0