EnableURLs

<< Click to Display Table of Contents >>

Navigation:  Management >

EnableURLs

Previous pageReturn to chapter overviewNext page

[ActiveX only]

Instructs the ActiveX to redirect all file accesses to URL’s, e.g. via the internet. This enables you do load documents, images, and Rich Text (RTF) from servers and internet sites. It is therefore ideal to use the ActiveX with VBScript or JavaScript within an Internet Browser. Even images INSIDE of a VPE document file - that reference a URL - are loaded via the network.

property boolean VPE.EnableURLs

read / write; design & runtime, closed document required

Possible Values:

Value

Description

True

Enabled

False

Disabled

Default:

False (do not interpret file names as URL’s)

Example:

Doc.EnableURLs = True

Doc.ReadDoc("http://www.my-server.com/report-187-3.vpe")

Doc.Picture(1, 1, VFREE, VFREE, "ftp://ftp.my-server.com/image1.gif")

 

If the VPE ActiveX is embedded within a Browser-HTML page, you can also use relative paths. For example if the HTML file with the embedded VPE ActiveX was loaded from:

"http://www.my-server.com/usa/reports/active.html"

 

and the embedded VPE ActiveX shall load the image:

"http://www.my-server.com/usa/reports/images/img1.jpg"

 

the following call will do when creating the document itself:

VpeControl.Picture(1, 1, VFREE, VFREE, "images/img1.jpg")

 

To read a file from the local hard drive with EnableURLs = True, use the following:

Doc.ReadDoc("file://c:\docs\report.vpe")

Doc.Picture(1, 1, VFREE, VFREE, "file://c:\pictures\img1.jpg")

 

In the directory "Internet" - located in the VPE installation directory - is a complete HTML source code example. It demonstrates the use of VPE embedded within a Browser and JavaScript. The HTML source code example contains many helpful comments, which should be studied carefully.