ImportExportFavorites method
Deprecated. Handles the import and export of Windows Internet Explorer favorites.
Syntax
var retval = external.ImportExportFavorites(fImport, strImpExpPath);
Parameters
fImport [in]
Type: VARIANT_BOOL
A Boolean that specifies one of the following possible values.
VARIANT_TRUE (true)
Import is requested.
VARIANT_FALSE (false)
Export is requested.
strImpExpPath [in]
Type: BSTR
A String that specifies the location (URL) to import or export, depending on fImport. If a value is an empty string, a file dialog box is displayed.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Standards information
There are no standards that apply here.
Remarks
Note Microsoft Internet Explorer 6 for Windows XP Service Pack 2 (SP2) and later. This method is no longer available.
Favorites that reference local files are not created during import. They are filtered out without comment, and the program continues.
The ImportExportFavorites method imports favorites from or exports favorites to an HTML page in the Netscape bookmark format. Confirmation is required before the import or export begins.
All favorites are uploaded to the server when exported. Favorites are sent with a POST operation to the server URL specified in the strImpExpPath parameter. For more information, see HttpSendRequest and HTTP Sessions.
It is recommended that the server be configured to erase previously stored favorites before accepting the updates. Favorites imported from the server merge with existing favorites on the client. Deletions on the server do not propagate to the client.
This method is not supported in Introduction to HTML Applications (HTAs).
Examples
This example uses the ImportExportFavorites method to import Favorites information from the server.
// 'true' specifies that the Favorites are imported from the server.
window.external.ImportExportFavorites(
true,"http://www.your_server.com");
This example uses the ImportExportFavorites method to export Favorites information from the server.
// 'false' specifies that the Favorites are exported to the server.
window.external.ImportExportFavorites(
false,"http://www.your_server.com");
This example uses the ImportExportFavorites method to open a file dialog box.
// If the path given is an empty string, a dialog box is opened.
window.external.ImportExportFavorites(false, "");