The following is a list of all the OLE automation methods supported by the FrontPage Editor (using the OLE identifier FrontPage.Editor):
LPDISPATCH vtiOpenWebPage(LPCTSTR szFileName, LPCTSTR szURL, LPCTSTR szWebURL,
LPCTSTR szWebTitle);
long vtiQueryWebPage(LPCTSTR szURL, LPCTSTR szWebURL);
void vtiBringToTop();
LPDISPATCH vtiNewWebPage(LPCTSTR szURL, LPCTSTR szWebURL, LPCTSTR szWebTitle);
The following automation methods were added in FrontPage 97:
CSTRING vtiListOpenDocs();
void vtiRefreshDocument(LPCTSTR szPageUrl, LPCTSTR szWebUrl);
CSTRING vtiGetBookmarkList(LPCTSTR pszPageUrl, LPCTSTR pszWebUrl);
long vtiScrollToBookmark(LPCTSTR pszPageUrl, LPCTSTR pszWebUrl, LPCTSTR pszBookmark);
long vtiInsertFile(LPCTSTR pszPageUrl, LPCTSTR pszWebUrl, LPCTSTR pszFile);
long vtiInsertImage(LPCTSTR pszPageUrl, LPCTSTR pszWebUrl, LPCTSTR pszFile);
BSTR vtiGetTopPageUrl();
long vtiInsertHTML(LPCTSTR pszHTML);
void vtiPaste();
void vtiQuit();
long vtiBringPageToTop(LPCTSTR szURL, LPCTSTR szWebURL, LPCTSTR szCookie, long toDoTaskId);
The following automation methods were added in FrontPage 98:
long vtiSetMetaTag(BSTR pszPageUrl, BSTR pszWebUrl, BSTR pszKey, BSTR pszValue, long lIndex, long flags);
BSTR vtiListMetaTags(BSTR pszPageUrl, BSTR pszWebUrl, long flags);
long vtiDeleteMetaTag(BSTR pszPageUrl, BSTR pszWebUrl, BSTR pszKey, long lIndex, long flags);
BSTR vtiGetMetaTag(BSTR pszPageUrl, BSTR pszWebUrl, BSTR pszKey, long lIndex, long flags);
long vtiQueryWebPageEx(BSTR szURL, BSTR szWebURL, boolean* bDirty, boolean* bWritable);
IMPORTANT: The FrontPage Editor’s methods that create new documents (vtiOpenWebPage and vtiNewWebPage) return a pointer to an OLE object representing the new document. At the moment, there are no automation methods for manipulating these FrontPage Editor documents. You should release this object as soon as it is returned to avoid creating orphan object references, as shown below in both C++ and Visual Basic:
C++:
LPDISPATCH pNewDoc = editor.vtiOpenWebPage(“C:\test.htm”,
NULL,NULL,NULL);
if(pNewDoc != NULL) pNewDoc->Release();
VB:
Dim newdoc as Object
Set newdoc = editor.vtiOpenWebPage(“C:\test.htm”,””,””,””)
Set newdoc = Nothing ‘ release document’s dispatch object