![]() |
#1
|
|||
|
|||
![]()
Hi all,
I am working in Word 2013 and I have a "with" statement in a macro to set shadow properties for an in-line shape. I am able to set the shadow's type, blur, transparency, and size without a problem, but I am not sure how to set the shadow's distance property. I tried ".Distance = 1" but that caused an error. I don't see anything like distance available from the drop-down menu either, so I'm wondering if distance just isn't a valid VBA property for shadows? Below is the full macro, which is a combination of a couple of ideas I saw on different forums and some tweaks (not my own). Thank you in advance for any ideas you have! Sub AppendixShadowBorder() ' ' AppendixShadowBorder Macro ' ' Dim shp As InlineShape Dim shad As ShadowFormat If Selection.InlineShapes.Count > 0 Then Set shp = Selection.InlineShapes(1) Set shad = shp.Shadow With shad .Type = msoShadow21 .Blur = 3 .Transparency = 0.6 .Size = 100 End With Selection.InlineShapes(1).Borders.OutsideLineStyle = wdLineStyleSingle Selection.InlineShapes(1).Borders.OutsideLineWidth = wdLineWidth050pt Selection.InlineShapes(1).Borders.OutsideColor = RGB(243, 243, 243) End If End Sub |
#2
|
||||
|
||||
![]()
If you don't see a property in the GUI, it's unlikely to exist, including via VBA.
PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Ah okay thanks Paul...figured the same but was worth checking! (sorry about the code...will use tags next time).
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Lebber | Word | 3 | 07-29-2013 12:27 AM |
![]() |
albertc | Excel Programming | 1 | 05-13-2012 07:05 PM |
![]() |
anna.a.julin | Word | 1 | 03-01-2012 08:05 PM |
![]() |
Jamal NUMAN | Word | 2 | 07-08-2011 04:09 AM |
![]() |
Jamal NUMAN | Word | 4 | 04-14-2011 04:55 PM |