PPT.Shadow in MS PowerPoint 2010 to View Properties of ShadowFormat in VB.NET

In this article I am going to explain about how to View Properties of ShadowFormat in a Microsoft PowerPoint 2010 presentation.
  • 3324

Introduction

In this article I am going to explain about how to View Properties of ShadowFormat in a Microsoft PowerPoint 2010 presentation. For this we use PPT.Shadow in Microsoft PowerPoint 2010.  
 

Microsoft Office 2010 offer some powerful tools, using this tools you can create application. Using Microsoft Visual Basic for Applications (VBA) you can create your own application according to your need. These application can performer some specific task.

For creating application we can use

  • VBA host of Excel 2010
  • VBA host of PowerPoint 2010
  • VBA host of Word 2010

NOTE : OneNote 2010 is not a VBA host.

Code that we use in this application are given below

Sub ShadowFormatDemo()

    ' Work with new Shadow Format features. 
    
' Create a blank slide. 

    Dim sld As Slide
    sld = ActivePresentation.Slides.Add(2, ppLayoutBlank)
 
    
' Add a shape to the new slide. 
    Dim shp As Shape
    shp = sld.Shapes.AddShape(msoShapeGear9, 100, 100, 200, 200)
 
    sld.Select()
 
    With shp.Shadow

        
' Set values to demonstrate blur: 
        .Size = 120
        .ForeColor.ObjectThemeColor = msoThemeColorAccent6
        .Transparency = 0.8
 
        .OffsetX = 20
        .OffsetY = 40
 
        
' Work with the Blur property, which indicates the 
        
' amount of blur in the shadow, measured in points: 
        .Blur = 1
        .Blur = 5
        .Blur = 10
 
        
' Now try varying the Size property, which measures the 
        
' size as a percentage of the size of the shape, times 100: 

        .Size = 100
        .Size = 120
        .Size = 140
        .Size = 160
        .Size = 180

    End 
With
 
    shp.Shadow.RotateWithShape = msoTrue
    shp.Rotation = 30
    shp.Rotation = 60
    shp.Rotation = 90
    shp.Rotation = 120
    shp.Rotation = 150
    shp.Rotation = 180
    shp.Rotation = 210
    shp.Rotation = 240
    shp.Rotation = 270
    shp.Rotation = 300
    shp.Rotation = 330
 
    shp.Shadow.RotateWithShape = msoFalse
    shp.Rotation = 30
    shp.Rotation = 60
    shp.Rotation = 90
    shp.Rotation = 120
    shp.Rotation = 150
    shp.Rotation = 180
    shp.Rotation = 210
    shp.Rotation = 240
    shp.Rotation = 270
    shp.Rotation = 300
    shp.Rotation = 330

End
 Sub

Steps for creating Application

Step 1 : Start Microsoft PowerPoint 2010 : 
 

1.jpg
 

Step 2 : Using Alt + F11 Key Start Visual Basic for Applications (VBA) Window :

2.jpg
 

Step 3 : Select on VBAProject(Presentation 1) : 
 

3.jpg
 

Step 4 : Right Click On VBAProject(Presentation 1) ==> Goto Insert==> Goto Module & click on Module:

4.jpg

5.jpg
 

Step 5 : Write Code in Visual Basic for Applications (VBA) Window :

Clipboard06.jpg
 

Step 6 : Run Application using F8 :

Step 7 : Macros window will open, Select Macros name and click on Run Button :

Clipboard05.jpg
 

Step 8 : Output of Application :

Clipboard01.jpg

Clipboard02.jpg

Clipboard03.jpg

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.