Shapes.Add3DModel (Word)
Adds a 3D model to a drawing canvas. Returns a Shape object that represents the 3D model and adds it to the CanvasShapes collection.
Add3DModel (FileName, LinkToFile, SaveWithDocument, Left, Top, Width, Height, Anchor)
Sub NewCanvasPicture()
Dim shpCanvas As Shape
'Add a drawing canvas to the active document
Set shpCanvas = ActiveDocument.Shapes.AddCanvas(Left:=100, Top:=75, Width:=200, Height:=300)
'Add a 3D model to the drawing canvas
shpCanvas.CanvasItems.Add3DModel(FileName:="c:\my 3D models\sphere.glb", LinkToFile:=False, SaveWithDocument:=True, Left:=100, Top:=100, Width:=70, Height:=70)
End Sub
Arguments
The following argument is required
FileName (String) - The path and file name of the 3D model.
Optional arguments
The following arguments are optional
LinkToFile (Boolean) - True to link the 3D model to the file from which it was created. False to make the 3D model an independent copy of the file. The default value is False.
SaveWithDocument (Boolean) - True to save the linked 3D model with the document. The default value is False.
Left (Long) - The position, measured in points, of the left edge of the new 3D model relative to the drawing canvas.
Top (Long) - The position, measured in points, of the top edge of the new 3D model relative to the drawing canvas.
Width (Long) - The width of the 3D model, in points (enter -1 to auto-calculate a width based on the 3D model dimensions).
Height (Long) - The height of the 3D model, in points (enter -1 to auto-calculate a height based on the 3D model dimensions).
Anchor - Range