Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-14-2014, 08:04 AM
cheech1981 cheech1981 is offline change shadow distance Windows 7 64bit change shadow distance Office 2010 64bit
Advanced Beginner
change shadow distance
 
Join Date: Nov 2011
Location: New Jersey, USA
Posts: 77
cheech1981 is on a distinguished road
Default change shadow distance

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
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
change shadow distance Modifying the distance between columns in the index Lebber Word 3 07-29-2013 12:27 AM
change shadow distance How to change save location and file to print name change? albertc Excel Programming 1 05-13-2012 07:05 PM
change shadow distance change the view to final, my change bars disappear. I need them visible anna.a.julin Word 1 03-01-2012 08:05 PM
change shadow distance How to control the distance above tables as we do for images? Jamal NUMAN Word 2 07-08-2011 04:09 AM
change shadow distance Why do we have this distance above the footer? Jamal NUMAN Word 4 04-14-2011 04:55 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:06 PM.


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