Quantcast
Channel: Manufacturing DevBlog
Viewing all articles
Browse latest Browse all 516

Change ActiveLightingStyle

$
0
0

By Adam Nagy

Just like in case of many other styles, first you need to find the given style inside the appropriate styles collection - in this case LightingStyles. Then you assign that to the settings parameter - in this case the ActiveLightingStyle property of the Document.

Sub ChangeLightingStyle()
  Dim doc As Document
  Set doc = ThisApplication.ActiveDocument
  Dim lss As LightingStyles
  Set lss = doc.LightingStyles' Let's just use the first style' InternalName: "1:Cool Light"
  doc.ActiveLightingStyle = lss("1:Cool Light")
End Sub

Code in action:

ActiveLightingStyle


Viewing all articles
Browse latest Browse all 516

Trending Articles