PPT.ConvertTextToSmartArt in MS PowerPoint 2010 to Convert Text into SmartArt in VB.NET
In this article I am going to explain about how to Convert Text into SmartArt in a Microsoft PowerPoint 2010 presentation.
In this article I am going to explain about how to Convert Text into SmartArt in a Microsoft PowerPoint 2010 presentation. For this we use PPT.ColorFormat.Brightness in Microsoft PowerPoint 2010. Using PPT.ConvertTextToSmartArt we can convert text programmatically into different built-in SmartArt layouts. In this article I am also going to explain ow to create a list of all of the index values and smart art names in Microsoft PowerPoint 2010.
Using smart art in our presentation we make it more attractive and understandable. It is useful for both speaker and audience of presentation.
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
Dim vip As Slide
vip = ActivePresentation.Slides.Add(1, ppLayoutText)
Dim shp As Shape
shp = vip.Shapes(2)
' Create text with Main at the top level, and
' NW, NE, SW, SE as the four child paragraphs.
Dim a As String
a = "Main.NW.NE.SW.SE"
a = Replace(Text, ".", vbCrLf)
' Insert the text into the shape:
.Text = a
.Lines(2).IndentLevel = 2
.Lines(3).IndentLevel = 2
.Lines(4).IndentLevel = 2
.Lines(5).IndentLevel = 2
' Now that the shape includes text that is appropriate
' for the smart art layout you'll use, convert it to
' the appropriate layout (121, Titled Matrix):
Dim b As Integer
For b = 1 To Application.SmartArtLayouts.Count
Step for creating Application
Step 1 : Start Microsoft PowerPoint 2010 :
Step 2 : Using Alt + F11 Key Start Visual Basic for Applications (VBA) Window :
Step 3 : Select on VBAProject(Presentation 1) :
Step 4 : Right Click On VBAProject(Presentation 1) ==> Goto Insert==> Goto Module & click on Module:
Step 5 : Write Code in Visual Basic for Applications (VBA) Window :
Step 6 : Run Application using F5 :
Step 7 : Macros window will open, Select Macros name and click on Run Button :
Step 8 : Output of Application
Step 9 : Now click on SmartArtTools in your PowePoint Here you can change Layout of smartArt :
Step 10 : Here you can change Color of smartArt :
Step 11 : Here you can change Style of smartArt :