How can we help?

AxSms.TemplatevCard


Introduction

Skip to properties and methods

The Template.. objects are used to generate SMS messages with special methods. You can set the properties according to your needs and call the Encode method to generate a message body. Set this body into an SMS and set the HasUdh property to true and the BodyFormat property to ‘BODYFORMAT_HEX’.

A vCard message can be used to push a virtual business card to a mobile phone.

Note: Most modern smart phones, like the iPhone and recent Android based phones, no longer support this message type.

Properties and Methods

Property Type Read/Write Description
Url String Read/Write URL pointing to the website of the contact
Title String Read/Write The title of the contact
EMail String Read/Write E-mail address
Fax String Read/Write Fax number
Pager String Read/Write Pager number
Mobile String Read/Write Mobile number
PhoneHome String Read/Write Home phone number
Phone String Read/Write Phone number
Name String Read/Write Name
Data String Read/Write The actual vCard message
LastError String Read Result of the last called method

Method Description
Clear Reset all properties to their default values
GetErrorDescription Get the description of the given error
Encode Creates the actual vCard message out of the property settings

Url property

This is the URL pointing to the website of the contact

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.Phone = "+31122334455"
objvCard.Name = "Customer Support Auron"
objvCard.Encode

objMessage.Body = objvCard.Data
objMessage.HasUdh = true
objMessage.BodyFormat = objConst.BODYFORMAT_HEX

strRef = objGsm.SendSms(objMessage)  
...

Title property

This is the title of the contact

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.Phone = "+31122334455"
objvCard.Name = "Customer Support Auron"
objvCard.Encode

objMessage.Body = objvCard.Data
objMessage.HasUdh = true
objMessage.BodyFormat = objConst.BODYFORMAT_HEX

strRef = objGsm.SendSms(objMessage)  
...

EMail property

This is the e-mail address of the contact

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.Phone = "+31122334455"
objvCard.Name = "Customer Support Auron"
objvCard.Encode

objMessage.Body = objvCard.Data
objMessage.HasUdh = true
objMessage.BodyFormat = objConst.BODYFORMAT_HEX

strRef = objGsm.SendSms(objMessage)  
...

Fax property

This is the fax number of the contact

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.Fax = "+31122334455"
objvCard.Name = "Customer Support Auron"
objvCard.Encode

objMessage.Body = objvCard.Data
objMessage.HasUdh = true
objMessage.BodyFormat = objConst.BODYFORMAT_HEX

strRef = objGsm.SendSms(objMessage)  
...

Pager property

This is the pager number of the contact

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.Pager = "+31122334455"
objvCard.Name = "Customer Support Auron"
objvCard.Encode

objMessage.Body = objvCard.Data
objMessage.HasUdh = true
objMessage.BodyFormat = objConst.BODYFORMAT_HEX

strRef = objGsm.SendSms(objMessage)  
...

Mobile property

This is the mobile number of the contact

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.Mobile = "+31122334455"
objvCard.Name = "Customer Support Auron"
objvCard.Encode

objMessage.Body = objvCard.Data
objMessage.HasUdh = true
objMessage.BodyFormat = objConst.BODYFORMAT_HEX

strRef = objGsm.SendSms(objMessage)  
...

PhoneHome property

This is the home phone number of the contact

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.PhoneHome = "+31122334455"
objvCard.Name = "Customer Support Auron"
objvCard.Encode

objMessage.Body = objvCard.Data
objMessage.HasUdh = true
objMessage.BodyFormat = objConst.BODYFORMAT_HEX

strRef = objGsm.SendSms(objMessage)  
...

Phone property

This is a general phone number of the contact

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.PhoneWork = "+31122334455"
objvCard.Name = "Customer Support Auron"
objvCard.Encode

objMessage.Body = objvCard.Data
objMessage.HasUdh = true
objMessage.BodyFormat = objConst.BODYFORMAT_HEX

strRef = objGsm.SendSms(objMessage)  
...

Name property

The name of the contact

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.Name = "Customer Support Auron"
objvCard.Encode

objMessage.Body = objvCard.Data
objMessage.HasUdh = true
objMessage.BodyFormat = objConst.BODYFORMAT_HEX

strRef = objGsm.SendSms(objMessage)  
...

Data property

After calling the Encode method this property will contain the WAPPush body as a HEX encoded string. To send this message set this body into an SMS and set the HasUdh property to true and the BodyFormat property to ‘BODYFORMAT_HEX’.

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.Name = "Customer Support Auron"
objvCard.Encode

objMessage.Body = objvCard.Data
objMessage.HasUdh = true
objMessage.BodyFormat = objConst.BODYFORMAT_HEX

strRef = objGsm.SendSms(objMessage)  
...

LastError property

Completion code of the last called method. To find the error description of a given error code, go to the online error codes codes page.

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.Phone = "+31122334455"
objvCard.Name = "Customer Support Auron"
objvCard.Encode
If objvCard.LastError <> 0 Then
  WScript.Echo objvCard.GetErrorDescription(objvCard.LastError)
End If  
...

Clear method

This method resets all properties to their default values.

Parameters:

  • None

Return value:

None

Example:

Set objvCard = CreateObject("AxSms.TemplatevCard")
...
objvCard.Clear
...

GetErrorDescription method

GetErrorDescription provides the error description of a given error code.

Parameters:

  • The error code

Return value:

The error string.

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.Phone = "+31122334455"
objvCard.Name = "Customer Support Auron"
objvCard.Encode
If objvCard.LastError <> 0 Then
  WScript.Echo objvCard.GetErrorDescription(objvCard.LastError)
End If  
...

Encode method

Creates vCard message according to the current settings. After calling this method the Data property will contain the vCard body as a HEX encoded string. To send this message set this body into an SMS and set the HasUdh property to true and the BodyFormat property to ‘BODYFORMAT_HEX’.

Parameters:

  • None

Return value:

Always returns 0

Example:

Set objGsm = CreateObject("AxSms.Gsm")
Set objMessage = CreateObject("AxSms.Message")
Set objvCard = CreateObject("AxSms.TemplatevCard")
Set objConst = CreateObject("AxSms.Constants")
          
objvCard.Url = "http://www.auronsoftware.com"
objvCard.Title = "Customer support"
objvCard.EMail = "support(at)auronsoftware.com"
objvCard.Phone = "+31122334455"
objvCard.Name = "Customer Support Auron"
objvCard.Encode
If objvCard.LastError <> 0 Then
  WScript.Echo objvCard.GetErrorDescription(objvCard.LastError)
End If  
...

The Template.. objects are used to generate SMS messages with special methods. You can set the properties according to your needs and call the Encode method to generate a message body. Set this body into an SMS and set the HasUdh property to true and the BodyFormat property to ‘BODYFORMAT_HEX’.

A vCard message can be used to push a virtual business card to a mobile phone.

Note: Most modern smart phones, like the iPhone and recent Android based phones, no longer support this message type.