Shapes.AddPicture Methode

Definition

Fügt einem Dokument ein Bild hinzu. Gibt ein Shape -Objekt zurück, das das Bild darstellt, und fügt es der Shapes Auflistung hinzu.

public Microsoft.Office.Interop.Word.Shape AddPicture (string FileName, ref object LinkToFile, ref object SaveWithDocument, ref object Left, ref object Top, ref object Width, ref object Height, ref object Anchor);
abstract member AddPicture : string * obj * obj * obj * obj * obj * obj * obj -> Microsoft.Office.Interop.Word.Shape
Public Function AddPicture (FileName As String, Optional ByRef LinkToFile As Object, Optional ByRef SaveWithDocument As Object, Optional ByRef Left As Object, Optional ByRef Top As Object, Optional ByRef Width As Object, Optional ByRef Height As Object, Optional ByRef Anchor As Object) As Shape

Parameter

FileName
String

String erforderlich. Der Pfad und der Dateiname des Bilds.

LinkToFile
Object

Optionales Objekt. True, wenn das Bild mit der Datei verknüpft werden soll, aus der es erstellt wurde. False, wenn das Bild als separate Kopie der Datei erstellt werden soll. Der Standardwert ist False.

SaveWithDocument
Object

Optionales Objekt. True, wenn das verknüpfte Bild mit dem Dokument gespeichert werden soll. Der Standardwert ist False.

Left
Object

Optionales Objekt. Die in Punkt gemessene Position des linken Rands des neuen Bilds relativ zum Anker.

Top
Object

Optionales Objekt. Die in Punkt gemessene Position des oberen Rands des neuen Bilds relativ zum Anker.

Width
Object

Optionales Objekt. Die Breite des Bilds in Punkt.

Height
Object

Optionales Objekt. Die Höhe des Bilds in Punkt.

Anchor
Object

Optionales Objekt. Der Bereich, an den das Bild gebunden ist. Wenn Anchor angegeben ist, wird der Anker am Anfang des ersten Absatzes im Verankerungsbereich positioniert. Wenn dieses Argument jedoch nicht angegeben wird, wird der Anker automatisch platziert, und das Bild wird relativ zum oberen und linken Rand der Seite positioniert.

Gibt zurück

Gilt für: