以下是引用守柔在2004-7-20 16:27:00的发言:
这是个模板文件呀!它的代码在模板中。
我就看见这一段代码啊,没有看见添加菜单的代码,晕!!!!
Sub 公章()
'
' 宏在 2003-6-11 由周民录制并编写
On Error GoTo zm:
Dim txt1 As String
Dim txt2 As String
txt1 = InputBox("请输入公章上文字", "公章制作", "南京财经大学")
txt2 = InputBox("请输入公章下文字", "公章制作", "图书馆")
Application.ScreenUpdating = False
If ActiveDocument.Shapes.Count = 1 Then
ActiveDocument.Shapes(1).Delete
End If
ActiveDocument.Shapes.AddShape(msoShapeOval, 279#, 95.4, 108#, 108# _
).Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 3#
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(255, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = 111.95
Selection.ShapeRange.Width = 111.95
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = CentimetersToPoints(6.67)
Selection.ShapeRange.Top = CentimetersToPoints(0.83)
Selection.ShapeRange.LockAnchor = False
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
Selection.ShapeRange.WrapFormat.DistanceTop = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceBottom = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceLeft = CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.DistanceRight = CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.Type = wdWrapTopBottom
ActiveDocument.Shapes.AddTextEffect(msoTextEffect3, txt1, "仿宋_GB2312" _
, 36#, msoFalse, msoFalse, 211.1, 121.1).Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 0, 0)
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 1.2
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(255, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = 67.75
Selection.ShapeRange.Width = 67.75
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = CentimetersToPoints(4.27)
Selection.ShapeRange.Top = CentimetersToPoints(1.73)
Selection.ShapeRange.LockAnchor = False
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
Selection.ShapeRange.WrapFormat.DistanceTop = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceBottom = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceLeft = CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.DistanceRight = CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.Type = wdWrapTopBottom
Selection.ShapeRange.IncrementLeft 0.2
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementTop -0.45
Selection.ShapeRange.IncrementTop -7.8
Selection.ShapeRange.TextEffect.Tracking = 1.2
Selection.ShapeRange.Adjustments.Item(1) = 210
ActiveDocument.Shapes.AddShape(msoShape5pointStar, 351#, 103.2, 36#, _
34.2).Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 0, 0)
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 1.2
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(255, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = 35.45
Selection.ShapeRange.Width = 35.45
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = CentimetersToPoints(9.21)
Selection.ShapeRange.Top = CentimetersToPoints(1.1)
Selection.ShapeRange.LockAnchor = False
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
Selection.ShapeRange.WrapFormat.DistanceTop = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceBottom = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceLeft = CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.DistanceRight = CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.Type = wdWrapTopBottom
Selection.ShapeRange.IncrementTop 5.35
Selection.ShapeRange.IncrementTop 7.8
Selection.ShapeRange.IncrementTop 7.8
Selection.ShapeRange.IncrementTop 7.8
Selection.ShapeRange.IncrementLeft -0.1
Selection.ShapeRange.IncrementLeft -9#
Selection.ShapeRange.IncrementLeft -9#
Selection.ShapeRange.IncrementLeft -9#
Selection.ShapeRange.IncrementLeft -9#
ActiveDocument.Shapes.AddTextEffect(msoTextEffect1, txt2, "仿宋_GB2312", _
36#, msoFalse, msoFalse, 265.1, 121.1).Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 0, 0)
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 1.2
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(255, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = 28.35
Selection.ShapeRange.Width = 62.35
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = CentimetersToPoints(6.18)
Selection.ShapeRange.Top = CentimetersToPoints(1.73)
Selection.ShapeRange.LockAnchor = False
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
Selection.ShapeRange.WrapFormat.DistanceTop = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceBottom = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceLeft = CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.DistanceRight = CentimetersToPoints(0.32)
Selection.ShapeRange.WrapFormat.Type = wdWrapTopBottom
Selection.ShapeRange.IncrementTop 2.4
Selection.ShapeRange.IncrementTop 7.8
Selection.ShapeRange.IncrementTop 7.8
Selection.ShapeRange.IncrementTop 7.8
Selection.ShapeRange.IncrementTop 7.8
Selection.ShapeRange.IncrementTop 7.8
Selection.ShapeRange.IncrementTop 3
Selection.ShapeRange.IncrementLeft 5.45
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementTop 7.8
'Selection.ShapeRange.IncrementLeft 9#
Selection.ShapeRange.IncrementLeft 0.65
Selection.ShapeRange.IncrementLeft 0.75
Selection.ShapeRange.IncrementLeft 0.75
Selection.ShapeRange.IncrementLeft 0.75
Selection.ShapeRange.IncrementLeft 0.75
Selection.ShapeRange.IncrementLeft 2.25
Selection.ShapeRange.IncrementTop -4.5
ActiveDocument.Shapes.SelectAll
Selection.ShapeRange.Group.Select
Application.ScreenUpdating = True
Exit Sub
zm:
MsgBox "由于参数错误输入,导致制作失败", vbCritical, "友情提示"
End Sub
|