RDOSignature object

 

RDOSignature object represents an Outlook signature.

 

Returned by:

RDOSignatures.Add

RDOSignatures.Item

RDOAccount.ReplySignature

RDOAccount.NewMessageSignature

 

The example below applies message signature from the mail account to a newly created message .

set Session = CreateObject("Redemption.RDOSession")

Session.MAPIOBJECT = Application.Session.MAPIOBJECT

set Drafts = Session.GetDefaultFolder(olFolderDrafts)

set Msg = Drafts.Items.Add

Msg.To = "dmitry@dimastr.com"

Msg.Subject = "testing signatures"

Msg.HTMLBody = "<html><body>some <b>bold</b> message text</body></html>"

set Account = Session.Accounts.GetOrder(2).Item(1) 'first mail account

if Not (Account Is Nothing) Then

  set Signature = Account.NewMessageSignature

  if Not (Signature Is Nothing) Then

    Signature.ApplyTo Msg, false 'apply at the bottom

  End If

End If

Msg.Display

 

Properties

Methods

 


Derived from: IDispatch


Properties


Body String, read-only. The plain text version of the signature.
 
HTMLBody String, read-only. The HTML version of the signature.
 
Name String, read-only.  The name of the signature.
 
RTFBody String, read-only. The RTF version of the signature.
 

Methods


ApplyTo(Message, InsertAtTop)
Applies the signature to the given message at the specified position.

Message - RDOMail object

InsertAtTop - Variant. optional. True if the signature must be inserted at the top, false if it must be inserted at the bottom. Defaults to true.
See the example above
Delete
Deletes the signature.  
Import(FileNameOrUrl, FileFormat)
Imports the signature from the specified location.

FileNameOrUrl - string. Fully qualified file name or a http/https URL.

FileFormat - one of the rdoSaveAsType enums.
The following formats are supported:
olHTML = 5
olTXT = 0
olRTF = 1
 
Save
Save the changes made to the signature.
 
SetHTMLBody(Value, DownloadImages)
Sets the HTML version of the signature.  Plain text and RTF versions of the signature will be derived from the HTML signature when the signature is saved unless they were set explicitly using SetPlainTextBody or SetRtfBody.

Value - string, the signature value.

DownloadImages - variant, optional. If true, downloads the embedded images. Defaults to true. 

const htmlSignature = "<html><body>Test <b>bold</b> text</body></html>"

set Session = CreateObject("Redemption.RDOSession")

Session.MAPIOBJECT = Application.Session.MAPIOBJECT

set Signature = Session.Signatures.Add("Test signature 2")

Signature.SetHTMLBody htmlSignature, true

Signature.Save

 

SetPlainTextBody(Value)
Sets the plain text version of the signature.  HTMLt and RTF versions of the signature will be derived from the plain text signature when the signature is saved unless they were set explicitly using SetHTMLBodyor SetRtfBody.

Value - string, the signature value.
 
SetRtfBody(Value, ExtractImagesToAttachments)
Sets the RTF version of the signature.  Plain text and HTML versions of the signature will be derived from the RTF signature when the signature is saved unless they were set explicitly using SetPlainTextBody or SetHTMLBody.

Value - string, the signature value.

ExtractImagesToAttachments - variant, optional. If true, extracts RTF images to attachments. Defaults to true.