Selection.InsertFile(String, Object, Object, Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Inserts all or part of the specified file.
public void InsertFile (string FileName, ref object Range, ref object ConfirmConversions, ref object Link, ref object Attachment);
abstract member InsertFile : string * obj * obj * obj * obj -> unit
Public Sub InsertFile (FileName As String, Optional ByRef Range As Object, Optional ByRef ConfirmConversions As Object, Optional ByRef Link As Object, Optional ByRef Attachment As Object)
Parameters
- FileName
- String
Required String. The path and file name of the file to be inserted. If you don't specify a path, Microsoft Word assumes the file is in the current folder.
- Range
- Object
Optional Object. If the specified file is a Word document, this parameter refers to a bookmark. If the file is another type (for example, a Microsoft Excel worksheet), this parameter refers to a named range or a cell range (for example, R1C1:R3C4).
- ConfirmConversions
- Object
Optional Object. True to have Word prompt you to confirm conversion when inserting files in formats other than the Word Document format.
- Link
- Object
Optional Object. True to insert the file by using an INCLUDETEXT field.
- Attachment
- Object
Optional Object. True to insert the file as an attachment to an e-mail message.