ArcPad Scripting Object Model
OpenURL Method
See Also  Example  Send comments on this topic.
URL
Required. A String that specifies the URL.
FileName
Optional. A String that specifies the target file.
INet Object : OpenURL Method

Glossary Item Box

Description

Opens and returns the document or file at the specified URL.

Syntax

object.OpenURL( URL [,FileName] )

Parameters

URL
Required. A String that specifies the URL.
FileName
Optional. A String that specifies the target file.

Return Type

Variant

Remarks

When the FileName argument is included, OpenURL will download the contents of the target URL to the specified file. The return value of OpenURL is the name of the specified file (success) or an empty string (failure).

When the FileName argument is omitted, OpenURL returns the text contents of the target URL as a string.

Example

Opens a URL and displays the results in a message box.
INET Example (VBScript)Copy Code
Sub OpenESRI
  Dim objNet, strURL, varData
  Set objNet = Application.CreateAppObject("INET")
  strURL = "http://www.esri.com"
  'Display the host name in a message box
  MsgBox objNet.HostName, vbOKOnly, "HostName"
  varData = objNet.OpenURL(strURL)
  'Display the data in a message box.
  MsgBox varData, vbOKOnly, strURL
  Set objNet = Nothing
End Sub

See Also

© 2013 All Rights Reserved.