ℹ️ The Auron SMS Server is now Auron Omni. Learn more here.

How can we help?

AxSms.TemplatevCard


Introduction

Skip to properties and methods

The Template objects generate SMS messages with special formatting. Set the properties to your needs and call the Encode method to create the message body. Then place this body into an SMS message, set the HasUdh property to true, and set the BodyFormat property to BODYFORMAT_HEX.

A vCard message pushes a virtual business card to a mobile phone.

Note: Most modern smartphones, such as iPhones and recent Android devices, 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 General phone number
Name String Read/Write Name of the contact
Data String Read The generated vCard message
LastError Number 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 from the property settings

Url property

The URL pointing to the website of the contact.

Example:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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)
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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;

var strRef = objGsm.SendSms(objMessage);
...
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

The title of the contact.

Example:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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)
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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;

var strRef = objGsm.SendSms(objMessage);
...
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

The e-mail address of the contact.

Example:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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)
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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;

var strRef = objGsm.SendSms(objMessage);
...
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

The fax number of the contact.

Example:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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)
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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;

var strRef = objGsm.SendSms(objMessage);
...
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

The pager number of the contact.

Example:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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)
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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;

var strRef = objGsm.SendSms(objMessage);
...
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

The mobile number of the contact.

Example:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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)
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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;

var strRef = objGsm.SendSms(objMessage);
...
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

The home phone number of the contact.

Example:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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)
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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;

var strRef = objGsm.SendSms(objMessage);
...
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

A general phone number of the contact.

Example:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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)
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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;

var strRef = objGsm.SendSms(objMessage);
...
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:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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)
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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;

var strRef = objGsm.SendSms(objMessage);
...
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 contains the vCard body as a HEX encoded string. To send the message, assign this body to an SMS, set HasUdh to true, and set BodyFormat to BODYFORMAT_HEX.

Example:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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)
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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;

var strRef = objGsm.SendSms(objMessage);
...
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 see the description of an error code, visit the online error codes page.

Example:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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 -ne 0) {
    Write-Host $objvCard.GetErrorDescription($objvCard.LastError)
}
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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)
{
    Console.WriteLine(objvCard.GetErrorDescription(objvCard.LastError));
}
...
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:

Always 0.

Example:

$objvCard = New-Object -ComObject AxSms.TemplatevCard
...
$objvCard.Clear()
...
var objvCard = new AxSms.TemplatevCard();
...
objvCard.Clear();
...
Set objvCard = CreateObject("AxSms.TemplatevCard")
...
objvCard.Clear
...

GetErrorDescription method

Returns a readable description for a given error code.

Parameters:

  • The error code

Return value:

The error description string.

Example:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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 -ne 0) {
    Write-Host $objvCard.GetErrorDescription($objvCard.LastError)
}
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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)
{
    Console.WriteLine(objvCard.GetErrorDescription(objvCard.LastError));
}
...
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 the vCard message according to the current property settings. After calling this method, the Data property contains the vCard body as a HEX encoded string.

To send the message, assign this body to an SMS, set HasUdh to true, and set BodyFormat to BODYFORMAT_HEX.

Parameters:

  • None

Return value:

Always 0.

Example:

$objGsm = New-Object -ComObject AxSms.Gsm
$objMessage = New-Object -ComObject AxSms.Message
$objvCard = New-Object -ComObject AxSms.TemplatevCard
$objConst = New-Object -ComObject 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 -ne 0) {
    Write-Host $objvCard.GetErrorDescription($objvCard.LastError)
}
...
var objGsm = new AxSms.Gsm();
var objMessage = new AxSms.Message();
var objvCard = new AxSms.TemplatevCard();
var objConst = new 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)
{
    Console.WriteLine(objvCard.GetErrorDescription(objvCard.LastError));
}
...
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  
...