Shapes.Add3DModel procedure builder

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 - 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 - True to save the linked 3D model with the document. The default value is False

Left - The position, measured in points, of the left edge of the new 3D model relative to the drawing canvas

Top - The position, measured in points, of the top edge of the new 3D model relative to the drawing canvas

Width - The width of the 3D model, in points (enter -1 to auto-calculate a width based on the 3D model dimensions)

Height - The height of the 3D model, in points (enter -1 to auto-calculate a height based on the 3D model dimensions)

Anchor