View Single Post
 
Old 12-03-2012, 07:55 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,387
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Another approach, which returns the same colour as Greg's macro, is to define your own wdOrange value:
Dim wdOrange As Long
wdOrange = 41215
Thus:
Code:
Sub ScratchMacro()
Dim oShp As Word.Shape, wdOrange As Long
wdOrange = 41215
Set oShp = ActiveDocument.Shapes.AddShape(1, 50, 30, 50, 50)
oShp.Fill.ForeColor.RGB = wdOrange
End Sub
Do note that this approach doesn't add 'wdOrange' to the built-in color index variables, but at least you have a meaningful name you can work with.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote