PreviousNext
Help > Programming with LAUNCHER Office > LNCCMD commands > Commands list > WINSERTIMG command
WINSERTIMG command

 Inserts picture into the current Word document.

 

Syntax

 

CHGVAR

VAR(&CMD) VALUE('WINSERTIMG')

CHGVAR

VAR(&PARM1) VALUE('
File="Picture file name"
[;Directory="Directory path"]

[;Bookmark="Bookmark"]
[;Adjust=True/False]

[;Append=True/False]

[;Link=True/False]

')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

&PARM2 &RESULT)

MONMSG

MSGID(LNC0000) EXEC(GOTO CMDLBL(ERROR))

 

 

 

Parameters

 

Parameters

 

Parm1

File : Name of the picture file to insert. If the full path is specified, then the Directory parameter is not useful.

Directory: (Optional) This option specifies a path to the directory where the file to be inserted is located.
This directory path is added in front of the file name specified with the File option. This parameter is not needed if the full path is specified in the File parameter.

Bookmark : (Optional) Bookmark name where picture will be inserted.

Word preset bookmarks can be used.

 

Adjust: (Optional) If bookmarked positioning is requested by the Bookmark option, this option places the bookmark on the inserted picture.

 

Append: (Optional) If bookmark positioning is requested by the Bookmark option, this option adds the picture to be inserted to the current contents of the bookmark.

 

Link = True/False, default is false.

If Link is true, it is a link towards the picture which is inserted. The modifications made to the picture will be automatically deferred on the documents with which it is dependent.

 

 

 

Example

 

LNCCMD CMD(WORDOPEN)

 

LNCCMD CMD(WOPENFILE) +

PARM1('%LNCDIR%\SAMPLES\MODELE_STYLE.DOCX')

 

LNCCMD CMD(WINSERTIMG) +

PARM1('FILE="%LNCDIR%\SAMPLES\LNC_Ofc.jpg";+

bookmark="image";link=true')

 

Other example

 

  LNCCMD     CMD(WINSERTIMG) +                               

               PARM1('FILE="C:\A\GRAPHE_IMMO.JPG";BOO+  

               KMARK="GRAPHE_IMMO"')                         

See also

WINSERTF