View Single Post
 
Old 09-11-2017, 12:26 PM
slaycock slaycock is offline Windows 7 64bit Office 2013
Expert
 
Join Date: Sep 2013
Posts: 255
slaycock is on a distinguished road
Default

You need to get to grips with using intellisense to review your options and F1 to bring up the help page for a keyword.

When you type in a legal keyword and follow it with a '.' then the VBA IDE will pop up a list of properties and methods that you can use next. If you don't see this then you need to go to

Tools->Options which will bring up a dialog box.


Select the editor tab

Tick all the boxes in the Code Settings frame.

To get you on your way more quickly consider the line

.Words(1).Text = CStr(myNewTip + myOldTotal) & " "

You can then progress using

Code:
        
        .Words(1).Text = CStr(myNewTip + myOldTotal) & " "
        .Words(1).Font.Color = wdColorRed
        .Words(1).Font.Bold = True
or

Code:
With .Words(1)
            .Text = CStr(myNewTip + myOldTotal) & " "
            .Font.Color = wdColorRed
            .Font.Bold = True

        End With
Good luck playing with intellisense

PS Intellisense won't pull up properties and methods that are deprecated but which still work. Color is one such property. It has been replaced by ColorIndex which limits the color selection to the narrower range offered by the theme colors.
Reply With Quote