how to get the Themecolor shades RGB in VB6
-
9 มีนาคม 2555 12:18
I am automation powerpoint 2007/2010. in my VB6 code i want to get the themeColor shades RGB.
Like for "followed hyperlink" color i want RGB for shade of 80 % lighter.
if i manually calculate shade RGB from "followed hyperlink" using below formula
finalRed = originalRed (1 - lighterPercentage/100) + 255 * lighterPercentage/100
and similarly for blue and green.
i am not getting the same RGB as shown by powerpoint.
Can you please help in getting the same ?
ตอบทั้งหมด
-
12 มีนาคม 2555 6:32ผู้ดูแล
Hi 1ash2and,
You can just set the theme color for the font:
Sub SetTheme()
Dim s As String
Application.ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Font.Color.ObjectThemeColor = 1
End Sub
http://msdn.microsoft.com/en-us/library/ff744673.aspx
Here is the list for you to reference.
http://msdn.microsoft.com/en-us/library/aa432702.aspx
Hope this can help you and just feel free to follow up after you have tried.
Best Regards,
Bruce Song [MSFT]
MSDN Community Support | Feedback to us
- ทำเครื่องหมายเป็นคำตอบโดย Bruce SongModerator 16 มีนาคม 2555 2:55