vtiInsertImage

C++: long vtiInsertImage(LPCTSTR pszPageUrl, LPCTSTR pszWebUrl, LPCTSTR pszFile);
VB: vtiInsertImage(PageUrl as String, WebUrl as String, File as String) as Long

Description

This method inserts the specified image file at the insertion point in the specified page. This is equivalent to the FrontPage Editor’s Insert : Image command’s Other Location option. The type of the image is inferred from the file extension. The image is automatically converted to a GIF or JPEG based on the size of the color palette in the image (GIF = 8-bit; JPEG = 24-bit.)

This method is useful when writing FrontPage addins or companion programs which provide an alternate user interface for inserting images into a web page.

Return Value

0 if the file does not exist

1 if the insertion succeeded

Parameters

The typical usage is to pass in the full PageUrl and leave WebUrl empty. But for convenience, you can specify the WebUrl as an absolute URL and the PageUrl as a web-relative URL.

PageUrl is the either the full URL of the page, or a web-relative URL of the page into which you want to insert an image.

WebURL is either NULL (if you specify a full PageUrl) or the URL of the FrontPage web which contains PageUrl.

File is the name of the locally accessible image file which you want to insert into the page. That is, it must be a standard file or UNC path reference and not a URL. (e.g. c:\insertme.gif; or \\server\share\thefile.jpg)