| Name | Type | Description |
|---|---|---|
| TypeID |
String
|
|
| Parameters |
Variant
|
Sub Test()
Dim s1 As Shape
CreateDocument
'Create a Table with 7 columns and 7 rows
Set s1 = ActiveLayer.CreateCustomShape("Table", 1, 10, 5, 7, 7, 6)
'Add Days of the Week to the each column in Row 1
s1.Custom.Cell(1, 1).TextShape.Text.Story = "Sun"
s1.Custom.Cell(2, 1).TextShape.Text.Story = "Mon"
s1.Custom.Cell(3, 1).TextShape.Text.Story = "Tue"
s1.Custom.Cell(4, 1).TextShape.Text.Story = "Wed"
s1.Custom.Cell(5, 1).TextShape.Text.Story = "Thu"
s1.Custom.Cell(6, 1).TextShape.Text.Story = "Fri"
s1.Custom.Cell(7, 1).TextShape.Text.Story = "Sat"
'Add a row above the first column
s1.Custom.AddRow 1
'Merge the cells in row
'Add the Title 'January'
'Center the text
s1.Custom.Rows(1).Cells.All.Merge
s1.Custom.Cell(1, 1).TextShape.Text.Story = "January"
s1.Custom.Cell(1, 1).TextShape.Text.Story.Words.All.Size = 22
s1.Custom.Cell(1, 1).TextShape.Text.Story.Alignment = _
cdrCenterAlignment
'Populate the calendar with dates
Dim i As Integer
For i = 1 To 31
'Insert the numbers starting at cell 13 (ie 1+12)
s1.Custom.Cells(i + 12).TextShape.Text.Story = i
Next i
'Merge the cells with no date
s1.Custom.Cells.Range(9, 10, 11, 12).Merge
'Place a fill in the cells containing no dates
Dim f1 As Fill
Set f1 = ActiveDocument.CreateFill("EmptyCellFill")
f1.ApplyUniformFill CreateRGBColor(220, 220, 220)
s1.Custom.Cells.Range(9, 10, 11, 12).ApplyFill f1
'Put a border around the tableshape
s1.Outline.Width = 0.05
'Put a border around row 1 of the tableshape
s1.Custom.Rows(1).Cells.All.Borders.All.Width = 0.05
'Put a green border around the January 1st cell
s1.Custom.Cells(10).Borders.All.Width = 0.05
s1.Custom.Cells.Range(10).Borders.All.Color.RGBAssign 0, 255, 0
End SubSub CreateCustomShape_OneLegCallout()
Dim s1 As Shape, s2 As Shape
Dim Callout1 As ShapeRange
CreateDocument
Set s1 = ActiveLayer.CreateCustomShape("Callout", _
"1-LegCallout ", 0, 0.1, Array(1.3, 10), _
Array(3.7, 10), 0.03, Nothing, 100, 0)
Set s2 = s1.Custom.TextShape
Set Callout1 = ActiveDocument.CreateShapeRangeFromArray(s2, s1)
s1.Custom.Ending = 3
Callout1.SetOutlineProperties 0.3, OutlineStyles(0), _
CreateCMYKColor(0, 100, 100, 0), ArrowHeads(55), _
ArrowHeads(0), cdrFalse, cdrFalse, cdrOutlineRoundLineCaps, _
cdrOutlineRoundLineJoin, 0, 100, PenWidth:=0.05, MiterLimit:=45
End SubSub CreateCustomShape_TwoLegCallout()
Dim s1 As Shape, s2 As Shape
Dim Callout1 As ShapeRange
CreateDocument
Set s1 = ActiveLayer.CreateCustomShape("Callout", _
"2-LegCallout ", 0, 0.1, Array(1, 4), Array(2, 5.5), _
Array(5, 7), 0.03, Nothing, 100, 0)
Set s2 = s1.Custom.TextShape
Set Callout1 = ActiveDocument.CreateShapeRangeFromArray(s1, s2)
Callout1.SetOutlineProperties 0.007, OutlineStyles(0), _
CreateCMYKColor(0, 0, 0, 100), ArrowHeads(4), ArrowHeads(0), _
cdrFalse, cdrFalse, cdrOutlineRoundLineCaps, _
cdrOutlineRoundLineJoin, 0, 100, MiterLimit:=45
s1.Custom.HaloVisible = True
s1.Custom.HaloColor.CMYKAssign 60, 40, 0, 0
s1.Custom.HaloJustification = 4
s1.Custom.HaloWidth = 0.2
s1.Custom.HaloJustification = 1
s1.Custom.HaloOpacity = 68
s1.Custom.Ending = 6
s1.Custom.EndingSize = 2.5
End SubSub CreateCustomShape_ThreeLegCallout()
Dim s1 As Shape, s2 As Shape
Dim Callout1 As ShapeRange
CreateDocument
Set s1 = ActiveLayer.CreateCustomShape("Callout", _
"3-Leg Callout ", 1, 0.1, Array(1, 3), Array(3, 3), Array(4, 2.5), _
Array(4, 1.8), 0.1, CreateCMYKColor(0, 0, 100, 0), 100, 0)
Set s2 = s1.Custom.TextShape
Set Callout3 = ActiveDocument.CreateShapeRangeFromArray(s1, s2)
Callout3.SetOutlineProperties 0.05, OutlineStyles(8), _
CreateCMYKColor(0, 0, 0, 100), ArrowHeads(79), ArrowHeads(0), _
cdrFalse, cdrFalse, cdrOutlineRoundLineCaps, _
cdrOutlineRoundLineJoin, 0#, 100, 0.2, MiterLimit:=45#
End Sub