Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 12-03-2012, 07:55 PM
macropod's Avatar
macropod macropod is offline Is there no wdOrange colorindex variable? Windows 7 64bit Is there no wdOrange colorindex variable? 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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there no wdOrange colorindex variable? Run-time error '91': Object variable or With block variable not set tinfanide Excel Programming 2 06-10-2012 10:17 AM
Is there no wdOrange colorindex variable? variable Page references scrinmemphis Word 4 06-06-2012 11:50 PM
Is there no wdOrange colorindex variable? Capture a Font in a Variable joatmon Excel Programming 1 05-30-2012 08:23 PM
Help with VBA macro - Variable input sc30317 Excel Programming 0 08-31-2011 01:00 PM
Variable fields? Emalee77 PowerPoint 0 01-30-2011 05:58 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:12 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft