EmEditor Home - EmEditor Help - EmEditor Macro Reference - Selection Object

InsertFromFile Method

Inserts the contents of the specified file at the cursor position.


document.selection.InsertFromFile( strFileName, nEncoding, nFlags );


document.selection.InsertFromFile strFileName, nEncoding, nFlags


Specifies the full path and name of the file to be opened.


Selects from the Encoding Constants, or specify any code page used in the Windows Operating System.


Specifies a combination of the following values:

eeOpenAllowNewWindow Opens as a new window if the current document is titled or modified.
eeOpenDetectUnicode Detects Unicode signature (BOM).
eeOpenDetectUTF8 Detects UTF-8.
eeOpenDetectCharset Detects HTML/XML Charset.
eeOpenDetectAll Detects all encodings.


Supported on EmEditor Professional Version 4.00 or later.

Copyright 2003-2016 by Emurasoft, Inc.