Changing Contact Notes Font

Status
Not open for further replies.

Joel Schwartz

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
I always want my contact notes to use the Segoe UI 10 font. I can set up new contact notes to have that font, but I use Google Apps Sync for Outlook and it always uses Calibri 11 when it updates a contact. Also, whenever I have to recreate a profile, which I recently did, it brings all of my contacts into Outlook with Calibri 11. I've talked to Google about that but they say that can't be controlled, so I'd like to make a macro which will select all text in the contact notes field and set the font to Segoe UI 10. I'm familiar with Excel macro coding but haven't done anything in Outlook before. Can someone show me the VBA code which would select all text in the contact notes area and change the font to Segoe UI 10?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange

Joel Schwartz

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Diane: Thanks for the help. I was able to get the part going where I can easily change the font for whatever contact I'm on with the macro. I wasn't clear on how to do this on all contacts, or a list of contacts, though. But what I have seems to work just fine.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
The last one on the page at http://www.slipstick.com/developer/change-font-outlook-item-notes-field/ should do the selected items. Changing it to all contacts in the default folder means changing the folder:

' or set this for current folder: objContactsFolder = Application.ActiveExplorer.CurrentFolder
Set objContactsFolder = Application.GetDefaultFolder(olFolderContacts)
Set objItems = objContactsFolder.Items
For Each obj in objItems
 

Joel Schwartz

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Diane: I'd like to revisit this. What I'm looking for is a macro where I can change just the contact note I've selected. What I have tries to change contacts in whatever might have been returned in a search of contacts, not just the one I've selected to view. I'd also like to set the formatting style back to normal, since many times the style has been set to Heading 1 for some reason. Here's the code I'm using, and admittedly I'm not too up on VBA for Outlook, but here goes. Thanks in advance. - Joel

Public Sub Segoe_Font()
' http://slipstick.me/888jf
Dim currentExplorer As Explorer
Dim Selection As Selection
Dim obj As Object

Dim objWord As Word.Application
Dim objDoc As Word.Document
Dim objSel As Word.Selection
On Error Resume Next

Set currentExplorer = Application.ActiveExplorer
Set Selection = currentExplorer.Selection
For Each obj In Selection
Set objItem = obj
objItem.Display

Set objInsp = objItem.GetInspector
Set objDoc = objInsp.WordEditor
Set objWord = objDoc.Application
Set objSel = objWord.Selection
objSel.WholeStory

With objSel.Font
.Name = "Segoe UI"
.Size = 10
' .Color = wdColorGreen
End With
'objItem.Close olSave

Err.Clear
Next
Set currentExplorer = Nothing
Set obj = Nothing
Set Selection = Nothing



End Sub
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
That code does the selection -
Replce the top part of the code with the following to work with just the selected item. I'm not sure about changing the style settings, but if it can be done in Word VBA then it will work in Outlook.

Code:
Public Sub Segoe_Font()
' http://slipstick.me/888jf
Dim objApp As Outlook.Application
dim objItem as Outlook.contactitem 
Dim objWord As Word.Application
Dim objDoc As Word.Document
Dim objSel As Word.Selection
On Error Resume Next

Set objApp = Application
Set objItem = objApp.ActiveExplorer.Selection.Item(1)
objItem.Display
 

Joel Schwartz

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Diane: Here's my new code but so far it does nothing. It's executing because I put stops in the code but it doesn't affect anything in the notes while previously it did. I probably missed something:

Public Sub Segoe_Font()
' http://slipstick.me/888jf
Dim objApp As Outlook.Application
Dim objItem As Outlook.ContactItem
Dim objWord As Word.Application
Dim objDoc As Word.Document
Dim objSel As Word.Selection
On Error Resume Next

Set objApp = Application
Set objItem = objApp.ActiveExplorer.Selection.Item(1)
objItem.Display

With objSel.Font
.Name = "Segoe UI"
.Size = 10
End With

Err.Clear

End Sub
 

Joel Schwartz

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Well, this is what I finally came up with to simply change the font in one contact's notes field and set the style to normal. It seems to work, but I have no idea if it's fully properly coded. It just know for now that it works:

Public Sub Segoe_Font()

Dim olInspector As Outlook.Inspector
Dim olDocument As Word.Document
Dim olSelection As Word.Selection

Set olInspector = Application.ActiveInspector()
Set olDocument = olInspector.WordEditor
Set olSelection = olDocument.Application.Selection
olSelection.WholeStory
olSelection.Style = "Normal"

With olSelection.Font
.Name = "Segoe UI"
.Size = 10
End With

Set m_Inspector = Nothing

End Sub
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
P Message Class keeps changing back to IPM.Contact Outlook VBA and Custom Forms 2
L Office 365 Outlook changing default contact folder Using Outlook 0
cimbian Changing default contact view Using Outlook 2
J Controlling/Changing owner of a Custom Contact item Using Outlook 0
N Contact Groups - names keep changing from Contacts to AddressBook Using Outlook 5
J Changing name at top when printing contact Using Outlook 2
G Outlook 2007 - Contact phone number fields - changing names Using Outlook 2
B BCC issues after changing root folder path for gmail Using Outlook 1
M Changing the preferred order for "Put this entry in" list for adding new contacts to the Address Book Using Outlook 1
J Outlook 2010 Changing events in Outlook calendar via opening file, importing CSV Using Outlook 0
A .restrict results changing after moving to Exchange online Outlook VBA and Custom Forms 0
T Outlook Contacts ... Changing Font Size, Style, Bold, etc. Using Outlook 2
N Rule for "on behalf of" - with changing names Using Outlook 2
O Save attachments using hotkey without changing attributes Outlook VBA and Custom Forms 1
M Outlook 2016: Changing default font for Notes and Reading Pane Using Outlook 4
V Changing default date for task follow-up buttons Using Outlook 2
Gary Hile Outlook 2016 changing editor options Using Outlook 6
J Outlook Rules - Changing auto-submit address in multiple rules, according to rule name Outlook VBA and Custom Forms 0
S Problems syncing emails with webmail after changing to Outlook 2016 Using Outlook 1
T Changing default Mail Account in Outlook 2016 - POP3 Using Outlook 1
S Changing notification sound for new incoming messages in Outlook 365/2016 Using Outlook 1
Stephen Weinberg Changing the mailing address checkbox Using Outlook 0
D Outlook 2013 changing iCloud reminder time? Using Outlook 0
C Changing the name of Outlook Messages saved to a folder Using Outlook 1
A Outlook.com changing appointments Using Outlook 8
B Changing CC list to .add Outlook VBA and Custom Forms 2
Diane Poremsky Changing the Message Size in Exchange Server New Slipstick.com Articles 0
R changing FW: on forward Outlook VBA and Custom Forms 3
B changing Win7 default backup schedule for Previous Versions Using Outlook 0
Diane Poremsky Changing the default *.pst and *.ost sizes New Slipstick.com Articles 0
C Macro to send email after changing from address and adding signature Outlook VBA and Custom Forms 1
Diane Poremsky Changing Outlook.com color schemes New Slipstick.com Articles 0
R Outlook calendar appointments Free/Busy time is changing from "Busy" to "Free" Using Outlook 2
W Changing looks of emails in Outlook 2003 Using Outlook 0
Diane Poremsky Changing the From Domain in Office 365 New Slipstick.com Articles 0
R The changing way to access information in Office 365 New Slipstick.com Articles 0
N Creating or changing the main new mail message template in Outlook 2010 Using Outlook 2
T issue changing [Type] in dbo.ContactMainTable/ contacts seem to be deleted BCM (Business Contact Manager) 5
William Yeack Outlook/Exchange - Changing display of “From” user Using Outlook 3
divan VbaProject: Changing email format Using Outlook 15
C Changing Domain -- Assigned To User field Migration? BCM (Business Contact Manager) 1
M CHANGING ACCOUNT NAME Using Outlook 0
J Changing margins in received email display Using Outlook 3
B Automatic picture download and changing email addresses Using Outlook 3
L changing view settings based on message body Using Outlook 1
M How to automatically refresh an appointment windows after changing the MessageClass property ? Outlook VBA and Custom Forms 4
S Outlook custom checkbox not changing value Using Outlook 0
E Changing layout of forms in BCM Using Outlook 1
P Changing from POP to IMAP; will this setup work? Using Outlook 1
V View zoom setting changing Using Outlook 1
Similar threads


















































Top