JoeMarfice
09-20-2007, 10:43 AM
I'm trying to standardize the Body text of all my Contacts. So far, I have only been able to produce code that removes formatting within a particular Contact Body, but I still have no control over what font and font size is used.
The existing code follows. Can anyone provide some insight?
--
Sub RemoveContactsFormatting()
Dim mapiContacts As MAPIFolder
Dim itmContact As ContactItem
Dim str As String
Set mapiContacts = Outlook.Application. _
GetNamespace("MAPI").GetDefaultFolder(olFolderContacts)
For Each itmContact In mapiContacts.Items
MsgBox itmContact.FileAs & ": " _
& itmContact.Body
str = itmContact.Body
itmContact.BodyFormat = olFormatPlain
itmContact.Save
Next
Set mapiContacts = Nothing
End Sub
The existing code follows. Can anyone provide some insight?
--
Sub RemoveContactsFormatting()
Dim mapiContacts As MAPIFolder
Dim itmContact As ContactItem
Dim str As String
Set mapiContacts = Outlook.Application. _
GetNamespace("MAPI").GetDefaultFolder(olFolderContacts)
For Each itmContact In mapiContacts.Items
MsgBox itmContact.FileAs & ": " _
& itmContact.Body
str = itmContact.Body
itmContact.BodyFormat = olFormatPlain
itmContact.Save
Next
Set mapiContacts = Nothing
End Sub