Class EmailSignatureEntries (Word VBA)
A collection of EmailSignatureEntry objects that represents all the email signature entries available to Word. To use a EmailSignatureEntries class variable it first needs to be instantiated, for example
Dim eses as EmailSignatureEntries
Set eses = Application.EmailOptions.EmailSignature.EmailSignatureEntries
For Each
Here is an example of processing the EmailSignatureEntries items in a collection.
Dim ese As EmailSignatureEntry
For Each ese In Application.EmailOptions.EmailSignature.EmailSignatureEntries
Next ese
Add
Returns an EmailSignatureEntry object that represents a new email signature entry.
An email signature is standard text that ends an email message, such as your name and telephone number. Use the EmailSignatureEntries property to create and manage a collection of email signatures that Microsoft Word will use when creating email messages.
Sub NewSignature()
Application.EmailOptions.EmailSignature _
.EmailSignatureEntries.Add _
Name:=ActiveDocument.BuiltInDocumentProperties("Author"), _
Range:=Selection.Range
End Sub
Arguments
The following arguments are required:
Name (String) - The name of the email entry.
Range (Range) - The range in the document that will be added as the signature.
Count
Returns a Long that represents the number of email signature entries in the collection.
Dim lngCount As Long
lngCount = Application.EmailOptions.EmailSignature.EmailSignatureEntries.Count
Item
Returns an individual EmailSignatureEntry object in a collection.
Item (Index)
Index: The individual object to be returned. Can be a Long indicating the ordinal position or a String representing the name of the individual object.
Dim ese As EmailSignatureEntry
Set ese = Application.EmailOptions.EmailSignature.EmailSignatureEntries(Index:=1)