Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply...
Transcript of Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply...
![Page 1: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1.jpg)
NewObjectsVisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetworkWebsiteforthelatestinformationaboutprogrammingwithOfficePowerPoint2003,includingproductnews,technicalarticles,downloads,andsamples.
NonewobjectsareaddedtotheOfficePowerPoint2003objectmodel.
![Page 2: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2.jpg)
NewProperties(AlphabeticalList)VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetworkWebsiteforthelatestinformationaboutprogrammingwithOfficePowerPoint2003,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistspropertiesaddedtotheOfficePowerPoint2003objectmodel(sortedalphabetically).
NewProperty Object(s)DocumentLibraryVersions PresentationPermission PresentationSharedWorkspace PresentationSync Presentation
![Page 3: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/3.jpg)
NewProperties(byObject)VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetworkWebsiteforthelatestinformationaboutprogrammingwithOfficePowerPoint2003,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistspropertiesaddedtotheOfficePowerPoint2003objectmodel(sortedbyobjectname).
Object NewProperties
Presentation DocumentLibraryVersions,Permission,SharedWorkspace,Sync
![Page 4: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/4.jpg)
NewMethodsVisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetworkWebsiteforthelatestinformationaboutprogrammingwithOfficePowerPoint2003,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistsmethodsaddedtotheOfficePowerPoint2003objectmodel.
NewMethod ObjectPresentation SendFaxOverInternet
![Page 5: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/5.jpg)
NewEventsVisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetworkWebsiteforthelatestinformationaboutprogrammingwithOfficePowerPoint2003,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistseventsaddedtotheOfficePowerPoint2003objectmodel.
NewEvent ObjectPresentationSync Application
![Page 6: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/6.jpg)
UsingEventswiththeApplicationObjectTocreateaneventhandlerforaneventoftheApplicationobject,youneedtocompletethefollowingthreesteps:
1. Declareanobjectvariableinaclassmoduletorespondtotheevents.2. Writethespecificeventprocedures.3. Initializethedeclaredobjectfromanothermodule.
![Page 7: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/7.jpg)
DeclaretheObjectVariable
BeforeyoucanwriteproceduresfortheeventsoftheApplicationobject,youmustcreateanewclassmoduleanddeclareanobjectoftypeApplicationwithevents.Forexample,assumethatanewclassmoduleiscreatedandcalledEventClassModule.Thenewclassmodulecontainsthefollowingcode.
PublicWithEventsAppAsApplication
![Page 8: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/8.jpg)
WritetheEventProcedures
Afterthenewobjecthasbeendeclaredwithevents,itappearsintheObjectlistintheclassmodule,andyoucanwriteeventproceduresforthenewobject.(WhenyouselectthenewobjectintheObjectlist,thevalideventsforthatobjectarelistedintheProcedurelist.)SelectaneventfromtheProcedurelist;anemptyprocedureisaddedtotheclassmodule.
PrivateSubApp_NewPresentation()
EndSub
![Page 9: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/9.jpg)
InitializingtheDeclaredObject
Beforetheprocedurewillrun,youmustconnectthedeclaredobjectintheclassmodule(Appinthisexample)withtheApplicationobject.Youcandothiswiththefollowingcodefromanymodule.
DimXAsNewEventClassModule
SubInitializeApp()
SetX.App=Application
EndSub
RuntheInitializeAppprocedure.Aftertheprocedureisrun,theAppobjectintheclassmodulepointstotheMicrosoftPowerPointApplicationobject,andtheeventproceduresintheclassmodulewillrunwhentheeventsoccur.
![Page 10: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/10.jpg)
Workingwithshapes(drawingobjects)Shapes,ordrawingobjects,arerepresentedbythreedifferentobjects:theShapescollection,theShapeRangecollection,andtheShapeobject.Ingeneral,youusetheShapescollectiontocreateshapesandwhenyouwanttoiteratethroughalltheshapesonaslide;youusetheShapeobjectwhenyouwanttomodifyasingleshape;andyouusetheShapeRangecollectionwhenyouwanttomodifymultipleshapesthesamewayyoucanworkwithmultipleselectedshapesintheuserinterface.
![Page 11: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/11.jpg)
Settingpropertiesforashape
Manyformattingpropertiesofshapesaren'tsetbypropertiesthatapplydirectlytotheShapeorShapeRangeobject.Instead,relatedshapeattributesaregroupedundersecondaryobjects,suchastheFillFormatobject,whichcontainsallthepropertiesthatrelatetotheshape'sfill,ortheLinkFormatobject,whichcontainsallthepropertiesthatareuniquetolinkedOLEobjects.Tosetpropertiesforashape,youmustfirstreturntheobjectthatrepresentsthesetofrelatedshapeattributesandthensetpropertiesofthatreturnedobject.Forexample,youusetheFillpropertytoreturntheFillFormatobject,andthenyousettheForeColorpropertyoftheFillFormatobjecttosetthefillforegroundcolorforthespecifiedshape,asshowninthefollowingexample.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(1).Fill.ForeColor.RGB=RGB(255,0,0)
![Page 12: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/12.jpg)
Applyingapropertyormethodtoseveralshapesatthesametime
Intheuserinterface,therearesomeoperationsyoucanperformwithseveralshapesselected;forexample,youcanselectseveralshapesandsetalltheirindividualfillsatonce.Thereareotheroperationsyoucanonlyperformwithasingleshapeselected;forexample,youcanonlyeditthetextinashapeifasingleshapeisselected.
InVisualBasic,therearetwowaystoapplypropertiesandmethodstoasetofshapes.Thesetwowaysallowyoutoperformanyoperationthatyoucanperformonasingleshapeonarangeofshapes,whetherornotyoucanperformthesameoperationintheuserinterface.
Iftheoperationworksonmultipleselectedshapesintheuserinterface,youcanperformthesameoperationinVisualBasicbyconstructingaShapeRangecollectionthatcontainstheshapesyouwanttoworkwith,andapplyingtheappropriatepropertiesandmethodsdirectlytotheShapeRangecollection.Iftheoperationdoesn'tworkonmultipleselectedshapesintheuserinterface,youcanstillperformtheoperationinVisualBasicbyloopingthroughtheShapescollectionorthroughaShapeRangecollectionthatcontainstheshapesyouwanttoworkwith,andapplyingtheappropriatepropertiesandmethodstotheindividualShapeobjectsinthecollection.
ManypropertiesandmethodsthatapplytotheShapeobjectandShapeRangecollectionfailifappliedtocertainkindsofshapes.Forexample,theTextFramepropertyfailsifappliedtoashapethatcannotcontaintext.IfyouarenotpositivethateachshapeinaShapeRangecollectioncanhaveacertainpropertyormethodappliedtoit,don'tapplythepropertyormethodtotheShapeRangecollection.Ifyouwanttoapplyoneofthesepropertiesormethodstoacollectionofshapes,youmustloopthroughthecollectionandtesteachindividualshapetomakesureitisanappropriatetypeofshapebeforeapplyingthepropertyormethodtoit.
![Page 13: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/13.jpg)
ApplyingapropertyormethodtoaShapeRangecollection
Ifyoucanperformanoperationonmultipleselectedshapesintheuserinterfaceatthesametime,youcandotheprogrammaticequivalentbyconstructingaShapeRangecollectionandthenapplyingtheappropriatepropertiesormethodstoit.ThefollowingexampleconstructsashaperangethatcontainstheAutoShapesnamed"BigStar"and"LittleStar"onmyDocumentandappliesagradientfilltothem.
SetmyDocument=ActivePresentation.Slides(1)
SetmyRange=myDocument.Shapes_
.Range(Array("BigStar","LittleStar"))
myRange.Fill.PresetGradientmsoGradientHorizontal,_
1,msoGradientBrass
Thefollowingaregeneralguidelinesforhowpropertiesandmethodsbehavewhenthey'reappliedtoaShapeRangecollection.
ApplyingamethodtoathecollectionisequivalenttoapplyingthemethodtoeachindividualShapeobjectinthatcollection.Settingthevalueofapropertyofthecollectionisequivalenttosettingthevalueofthepropertyofeachindividualshapeinthatrange.Apropertyofthecollectionthatreturnsaconstantreturnsthevalueofthepropertyforanindividualshapeinthecollectionifallshapesinthecollectionhavethesamevalueforthatproperty.Ifnotallshapesinthecollectionhavethesamevaluefortheproperty,itreturnsthe"mixed"constant.Apropertyofthecollectionthatreturnsasimpledatatype(suchasLong,Single,orString)returnsthevalueofthepropertyforanindividualshapeifallshapesinthecollectionhavethesamevalueforthatproperty.Thevalueofsomepropertiescanbereturnedorsetonlyifthere'sexactlyoneshapeinthecollection.Ifthere'smorethanoneshapeinthecollection,arun-timeerroroccurs.Thisisgenerallythecaseforreturningorsettingpropertieswhentheequivalentactionintheuserinterfaceispossibleonlywithasingleshape(actionssuchaseditingtextinashapeoreditingthepointsofafreeform).
![Page 14: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/14.jpg)
TheprecedingguidelinesalsoapplywhenyouaresettingpropertiesofshapesthataregroupedundersecondaryobjectsoftheShapeRangecollection,suchastheFillFormatobject.Ifthesecondaryobjectrepresentsoperationsthatcanbeperformedonmultipleselectedobjectsintheuserinterface,youwillbeabletoreturntheobjectfromaShapeRangecollectionandsetitsproperties.Forexample,youcanusetheFillpropertytoreturntheFillFormatobjectthatrepresentsthefillsofalltheshapesintheShapeRangecollection.SettingthepropertiesofthisFillFormatobjectwillsetthesamepropertiesforalltheindividualshapesintheShapeRangecollection.
![Page 15: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/15.jpg)
LoopingthroughaShapesorShapeRangecollection
Evenifyoucannotperformanoperationonseveralshapesintheuserinterfaceatthesametimebyselectingthemandthenusingacommand,youcanperformtheequivalentactionprogrammaticallybyloopingthroughtheShapescollectionorthroughaShapeRangecollectionthatcontainstheshapesyouwanttoworkwith,andapplyingtheappropriatepropertiesandmethodstotheindividualShapeobjectsinthecollection.ThefollowingexampleloopsthroughalltheshapesonmyDocumentandaddstexttoeachshapethatisanAutoShape.
SetmyDocument=ActivePresentation.Slides(1)
ForEachshInmyDocument.Shapes
Ifsh.Type=msoAutoShapeThen
sh.TextFrame.TextRange.InsertAfter"(version1)"
EndIf
Next
ThefollowingexampleconstructsShapeRangecollectionthatcontainsallthecurrentlyselectedshapesintheactivewindowandsetsthetextineachshapeinthecollectionthatcancontaintext.
ForEachshinActiveWindow.Selection.ShapeRange
Ifsh.HasTextFrameThen
sh.TextFrame.TextRange="Initiallyselected"
EndIf
Next
![Page 16: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/16.jpg)
Aligning,distributing,andgroupingshapesinashaperange
UsetheAlignandDistributemethodstopositionasetofshapesrelativetooneanotherorrelativetothedocumentthatcontainsthem.UsetheGroupmethodortheRegroupmethodtoformasinglegroupedshapefromasetofshapes.
![Page 17: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/17.jpg)
WorkingwithPanesandViews
![Page 18: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/18.jpg)
ChangingtheActiveView
YoucanreturnorsetthecurrentviewintheactivedocumentwindowwiththeViewTypeproperty.Thisexamplechangestheviewintheactivedocumentwindowtoslideview.
ActiveWindow.ViewType=ppViewSlide
![Page 19: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/19.jpg)
ChangingPanesinNormalView
Innormalview,youcanusetheViewTypepropertywiththeactivePaneobjecttoreturntheactivepane.TheViewTypepropertyreturnsoneofthefollowingPpViewTypeconstants,identifyingtheactivepane:ppViewNotesPage,ppViewOutline,orppViewSlide.AllotherviewshaveonlyonepaneandtheViewTypepropertyreturnsthesamePpViewTypeconstantvalueastheactivedocumentwindow.
YoucanactivateapanebysettingtheViewTypepropertyorbyusingtheActivatemethod.ThisexamplereturnsthevalueoftheViewTypepropertytoidentifytheactiveviewandactivepane.Iftheactiveviewisnormalviewandtheactivepaneisthenotespane,thentheslidepaneisactivatedwiththeActivatemethod.
WithActiveWindow
If.ViewType=ppViewNormaland_
.ActivePane.ViewType=ppViewNotesPageThen
.Panes(2).Activate
EndIf
EndWith
![Page 20: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/20.jpg)
Resizingpanes
YoucanusetheSplitHorizontalandtheSplitVerticalpropertiestorepositionthepanedividersinnormalviewtothespecifiedpercentageoftheavailabledocumentwindow.Thisresizesthepanesoneithersideofthedivider.Themaximumvalueofthesepropertiesisalwayslessthan100%becausetheslidepanehasaminimumsizethatdependsona10%zoomlevel.Thisexamplesetsthepercentageoftheavailabledocumentwindowheightthattheslidepaneoccupiesto65percent,leavingthenotespaneat35percent.
ActiveWindow.SplitVertical=65
![Page 21: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/21.jpg)
PublishingaWebPresentationInMicrosoftPowerPoint,youcanpublishapresentationdirectlytoaWebserverandyoucaneditHTMLdocumentsdirectlyinPowerPoint.
![Page 22: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/22.jpg)
SavingaPresentationasaWebPage
SavingapresentationasaWebpageistheprocessofcreatingandsavinganHTMLversionofapresentation.Todothis,usetheSaveAsmethod,asshowninthefollowingexamplewhichsavesthecurrentpresentationasc:\myfile.htm.
ActivePresentation.SaveAs"c:\myfile.htm",ppSaveAsHTMLv3,msoTrue
![Page 23: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/23.jpg)
PublishingaWebPresentation
PublishingaWebpresentationistheprocessofcreatinganHTMLversionofapresentationandsavingittoaWebserverorafileserverusingthePublishmethod.ThisdiffersfromsavingapresentationasaWebpageusingtheSaveAsmethodinthatwhenyoupublishaWebpresentation,youcancustomizethepresentationbysettingvariousattributes,andyoucanpublishthepresentationdirectlytoaWebserver.AftersettingvariouspropertiesoftheWebOptionsobject,thisexamplepublishestheactivepresentationtoaWebserverwiththeURLaddresshttp://www.someones.homepage/mallard.htm.
WithActivePresentation
With.WebOptions
.FrameColors=ppFrameColorsWhiteTextOnBlack
.RelyonVML=True
.OrganizeInFolder=True
EndWith
With.PublishObjects(1)
.FileName="http://www.someones.homepage/mallard.htm"
.SourceType=ppPublishAll
.SpeakerNotes=True
.Publish
EndWith
EndWith
![Page 24: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/24.jpg)
WebOptionsandDefaultWebOptions
WhenusingthePublishmethod,youcancustomizetheappearance,content,browsersupport,editingsupport,graphicsformats,screenresolution,fileorganization,andencodingoftheHTMLdocumentbysettingpropertiesoftheDefaultWebOptionsobjectandtheWebOptionsobject.TheDefaultWebOptionsobjectcontainsapplication-levelproperties.Thesesettingsareoverriddenbyanypresentation-levelpropertysettingsthathavethesamename,containedintheWebOptionsobject.
Thisexamplesetsvariousapplication-levelpropertiesforWebpublishing.Theywillbethedefaultsettingsforanycurrentorfutureloadedpresentationuntilthesettingsarechangedagain.ThecodethenresetstheResizeGraphicspropertyfortheactivepresentation,whichoverridestheapplication-leveldefault.Itpublishestheactivepresentationas"c:\mallard.htm."
WithApplication.DefaultWebOptions
.FrameColors=ppFrameColorsWhiteTextOnBlack
.IncludeNavigation=False
.ResizeGraphics=True
EndWith
WithActivePresentation
.WebOptions.ResizeGraphics=False
With.PublishObjects(1)
.FileName="c:\mallard.htm"
.SourceType=ppPublishAll
.SpeakerNotes=True
.Publish
EndWith
EndWith
![Page 25: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/25.jpg)
OpeninganHTMLdocumentinPowerPoint
ToeditanHTMLdocumentinPowerPoint,opentheHTMLdocumentusingtheOpenmethod.Thisexampleopensthefile"myfile.htm"forediting.
Presentations.OpenFilename:="c:\Windows\myfile.htm"
![Page 26: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/26.jpg)
ShowAll
![Page 27: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/27.jpg)
UsingActiveXcontrolsonslidesYoucanaddcontrolstoyourslidestoprovideasophisticatedwaytoexchangeinformationwiththeuserwhileaslideshowisrunning.Forexample,youcouldusecontrolsonslidestoallowviewersofashowdesignedtoberuninakioskawaytochooseoptionsandthenrunacustomshowbasedontheviewer'schoices.
Forgeneralinformationonaddingandworkingwithcontrols,seeUsingActiveXControlsonaDocumentandCreatingaCustomDialogBox.
Keepthefollowingpointsinmindwhenyouareworkingwithcontrolsonslides.
Acontrolonaslideisindesignmodeexceptwhentheslideshowisrunning.Ifyouwantacontroltoappearonallslidesinapresentation,addittotheslidemaster.TheMekeywordinaneventprocedureforacontrolonaslidereferstotheslide,notthecontrol.
Writingeventcodeforcontrolsonslidesisverysimilartowritingeventcodeforcontrolsonforms.Thefollowingproceduresetsthebackgroundfortheslidethebuttonnamed"cmdChangeColor"isonwhenthebuttonisclicked.
PrivateSubcmdChangeColor_Click()
WithMe
.FollowMasterBackground=Not.FollowMasterBackground
.Background.Fill.PresetGradient_
msoGradientHorizontal,1,msoGradientBrass
EndWith
EndSub
YoumaywanttousecontrolstoprovideyourslideshowwithnavigationtoolsthataremorecomplexthanthosebuiltintoMicrosoftPowerPoint.Forexample,ifyouaddtwobuttonsnamed"cmdBack"and"cmdForward"totheslidemasterandwritethefollowingcodebehindthem,allslidesbasedonthemaster(andsettoshowmasterbackgroundgraphics)willhavetheseprofessional-lookingnavigationbuttonsthatwillbeactiveduringaslideshow.
![Page 28: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/28.jpg)
PrivateSubcmdBack_Click()
Me.Parent.SlideShowWindow.View.Previous
EndSub
PrivateSubcmdForward_Click()
Me.Parent.SlideShowWindow.View.Next
EndSub
ToworkwithalltheActiveXcontrolsonaslidewithoutaffectingtheothershapesontheslide,youcanconstructaShapeRangecollectionthatcontainsonlycontrols.Youcanthenapplypropertiesandmethodstotheentirecollectionoriteratethroughthecollectiontoworkwitheachcontrolindividually.Thefollowingexamplealignsallthecontrolsonslideoneintheactivepresentationanddistributesthemvertically.
WithActivePresentation.Slides(1).Shapes
numShapes=.Count
IfnumShapes>1Then
numControls=0
ReDimctrlArray(1TonumShapes)
Fori=1TonumShapes
If.Item(i).Type=msoOLEControlObjectThen
numControls=numControls+1
ctrlArray(numControls)=.Item(i).Name
EndIf
Next
IfnumControls>1Then
ReDimPreservectrlArray(1TonumControls)
SetctrlRange=.Range(ctrlArray)
ctrlRange.DistributemsoDistributeVertically,True
ctrlRange.AlignmsoAlignLefts,True
EndIf
EndIf
EndWith
![Page 29: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/29.jpg)
ShowAll
![Page 30: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/30.jpg)
UsingActiveXcontrolsonadocumentJustasyoucanaddActiveXcontrolstocustomdialogboxes,youcanaddcontrolsdirectlytoadocumentwhenyouwanttoprovideasophisticatedwayfortheusertointeractdirectlywithyourmacrowithoutthedistractionofdialogboxes.UsethefollowingproceduretoaddActiveXcontrolstoyourdocument.FormorespecificinformationaboutusingActiveXcontrolsinMicrosoftPowerPoint,seeUsingActiveXcontrolsonslides.
1. Addcontrolstothedocument
DisplaytheControlToolbox,clickthecontrolyouwanttoadd,andthenclickthedocument.
2. Setcontrolproperties
Right-clickacontrolindesignmodeandclickPropertiestodisplaythePropertieswindow.
3. Initializethecontrols
Youcaninitializecontrolsinaprocedure.
4. Writeeventprocedures
Allcontrolshaveapredefinedsetofevents.Forexample,acommandbuttonhasaClickeventthatoccurswhentheuserclicksthecommandbutton.Youcanwriteeventproceduresthatrunwhentheeventsoccur.
5. Usecontrolvalueswhilecodeisrunning
Somepropertiescanbesetatruntime.
![Page 31: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/31.jpg)
![Page 32: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/32.jpg)
CreatingacustomdialogboxUsethefollowingproceduretocreateacustomdialogbox:
1. CreateaUserForm
OntheInsertmenuintheVisualBasicEditor,clickUserForm.
2. AddcontrolstotheUserForm
FindthecontrolyouwanttoaddintheToolboxanddragthecontrolontotheform.
3. Setcontrolproperties
Right-clickacontrolindesignmodeandclickPropertiestodisplaythePropertieswindow.
4. Initializethecontrols
Youcaninitializecontrolsinaprocedurebeforeyoushowaform,oryoucanaddcodetotheInitializeeventoftheform.
5. Writeeventprocedures
Allcontrolshaveapredefinedsetofevents.Forexample,acommandbuttonhasaClickeventthatoccurswhentheuserclicksthecommandbutton.Youcanwriteeventproceduresthatrunwhentheeventsoccur.
6. Showthedialogbox
UsetheShowmethodtodisplayaUserForm.
7. Usecontrolvalueswhilecodeisrunning
Somepropertiescanbesetatruntime.Changesmadetothedialogboxbytheuserarelostwhenthedialogboxisclosed.
![Page 33: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/33.jpg)
![Page 34: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/34.jpg)
ShowAll
![Page 35: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/35.jpg)
ControllingoneMicrosoftOfficeapplicationfromanotherIfyouwanttoruncodeinoneMicrosoftOfficeapplicationthatworkswiththeobjectsinanotherapplication,followthesesteps.
1. Setareferencetotheotherapplication'stypelibraryintheReferencesdialogbox(Toolsmenu).Afteryouhavedonethis,theobjects,properties,andmethodswillshowupintheObjectBrowserandthesyntaxwillbecheckedatcompiletime.Youcanalsogetcontext-sensitiveHelponthem.
2. Declareobjectvariablesthatwillrefertotheobjectsintheotherapplicationasspecifictypes.Makesureyouqualifyeachtypewiththenameoftheapplicationthatissupplyingtheobject.Forexample,thefollowingstatementdeclaresavariablethatwillpointtoaMicrosoftWorddocument,andanotherthatreferstoaMicrosoftExcelapplication.DimappWDAsWord.Application,wbXLAsExcel.Application
NoteYoumustfollowthestepsaboveifyouwantyourcodetobeearlybound.
3. UsetheNewkeywordwiththeOLEProgrammaticIdentifieroftheobjectyouwanttoworkwithintheotherapplication,asshowninthefollowingexample.Ifyouwanttoseethesessionoftheotherapplication,settheVisiblepropertytoTrue.
DimappWDAsWord.Application
SetappWD=NewWord.Application
appWd.Visible=True
4. Applypropertiesandmethodstotheobjectcontainedinthevariable.Forexample,thefollowinginstructioncreatesanewWorddocument.
DimappWDAsWord.Application
SetappWD=NewWord.Application
appWD.Documents.Add
![Page 36: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/36.jpg)
5. Whenyouaredoneworkingwiththeotherapplication,usetheQuitmethodtocloseit,asshowninthefollowingexample.
appWd.Quit
![Page 37: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/37.jpg)
OLEProgrammaticIdentifiersYoucanuseanOLEprogrammaticidentifier(sometimescalledaProgID)tocreateanAutomationobject.ThefollowingtableslistOLEprogrammaticidentifiersforActiveXcontrols,MicrosoftOfficeapplications,andMicrosoftOfficeWebComponents.
ActiveXControls
MicrosoftAccess
MicrosoftExcel
MicrosoftGraph
MicrosoftOfficeWebComponents
MicrosoftOutlook
MicrosoftPowerPoint
MicrosoftWord
![Page 38: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/38.jpg)
ActiveXControls
TocreatetheActiveXcontrolslistedinthefollowingtable,usethecorrespondingOLEprogrammaticidentifier.
Tocreatethiscontrol UsethisidentifierCheckBox Forms.CheckBox.1ComboBox Forms.ComboBox.1CommandButton Forms.CommandButton.1Frame Forms.Frame.1Image Forms.Image.1Label Forms.Label.1ListBox Forms.ListBox.1MultiPage Forms.MultiPage.1OptionButton Forms.OptionButton.1ScrollBar Forms.ScrollBar.1SpinButton Forms.SpinButton.1TabStrip Forms.TabStrip.1TextBox Forms.TextBox.1ToggleButton Forms.ToggleButton.1
![Page 39: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/39.jpg)
MicrosoftAccess
TocreatetheMicrosoftAccessobjectslistedinthefollowingtable,useoneofthecorrespondingOLEprogrammaticidentifiers.Ifyouuseanidentifierwithoutaversionnumbersuffix,youcreateanobjectinthemostrecentversionofAccessavailableonthemachinewherethemacroisrunning.
Tocreatethisobject UseoneoftheseidentifiersApplication Access.ApplicationCurrentData Access.CodeData,Access.CurrentDataCurrentProject Access.CodeProject,Access.CurrentProjectDefaultWebOptions Access.DefaultWebOptions
![Page 40: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/40.jpg)
MicrosoftExcel
TocreatetheMicrosoftExcelobjectslistedinthefollowingtable,useoneofthecorrespondingOLEprogrammaticidentifiers.Ifyouuseanidentifierwithoutaversionnumbersuffix,youcreateanobjectinthemostrecentversionofExcelavailableonthemachinewherethemacroisrunning.
Tocreatethisobject
Useoneoftheseidentifiers Comments
Application Excel.ApplicationWorkbook Excel.AddIn
Workbook Excel.ChartReturnsaworkbookcontainingtwoworksheets;oneforthechartandoneforitsdata.Thechartworksheetistheactiveworksheet.
Workbook Excel.Sheet Returnsaworkbookwithoneworksheet.
![Page 41: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/41.jpg)
MicrosoftGraph
TocreatetheMicrosoftGraphobjectslistedinthefollowingtable,useoneofthecorrespondingOLEprogrammaticidentifiers.Ifyouuseanidentifierwithoutaversionnumbersuffix,youcreateanobjectinthemostrecentversionofGraphavailableonthemachinewherethemacroisrunning.
Tocreatethisobject UseoneoftheseidentifiersApplication MSGraph.ApplicationChart MSGraph.Chart
![Page 42: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/42.jpg)
MicrosoftOfficeWebComponents
TocreatetheMicrosoftOfficeWebComponentsobjectslistedinthefollowingtable,useoneofthecorrespondingOLEprogrammaticidentifiers.Ifyouuseanidentifierwithoutaversionnumbersuffix,youcreateanobjectinthemostrecentversionofMicrosoftOfficeWebComponentsavailableonthemachinewherethemacroisrunning.
Tocreatethisobject UseoneoftheseidentifiersChartSpace OWC10.ChartDataSourceControl OWC10.DataSourceControlExpandControl OWC.ExpandControlPivotTable OWC10.PivotTableRecordNavigationControlOWC10.RecordNavigationControlSpreadsheet OWC10.Spreadsheet
![Page 43: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/43.jpg)
MicrosoftOutlook
TocreatetheMicrosoftOutlookobjectgiveninthefollowingtable,useoneofthecorrespondingOLEprogrammaticidentifiers.Ifyouuseanidentifierwithoutaversionnumbersuffix,youcreateanobjectinthemostrecentversionofOutlookavailableonthemachinewherethemacroisrunning.
Tocreatethisobject UseoneoftheseidentifiersApplication Outlook.Application
![Page 44: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/44.jpg)
MicrosoftPowerPoint
TocreatetheMicrosoftPowerPointobjectgiveninthefollowingtable,useoneofthecorrespondingOLEprogrammaticidentifiers.Ifyouuseanidentifierwithoutaversionnumbersuffix,youcreateanobjectinthemostrecentversionofPowerPointavailableonthemachinewherethemacroisrunning.
Tocreatethisobject UseoneoftheseidentifiersApplication PowerPoint.Application
![Page 45: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/45.jpg)
MicrosoftWord
TocreatetheMicrosoftWordobjectslistedinthefollowingtable,useoneofthecorrespondingOLEprogrammaticidentifiers.Ifyouuseanidentifierwithoutaversionnumbersuffix,youcreateanobjectinthemostrecentversionofWordavailableonthemachinewherethemacroisrunning.
Tocreatethisobject UseoneoftheseidentifiersApplication Word.ApplicationDocument Word.Document,Word.TemplateGlobal Word.Global
![Page 46: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/46.jpg)
ActionSettingsCollectionObjectMultipleobjects ActionSettings
ActionSettingMultipleobjects
AcollectionthatcontainsthetwoActionSettingobjectsforashapeortextrange.OneActionSettingobjectrepresentshowthespecifiedobjectreactswhentheuserclicksitduringaslideshow,andtheotherActionSettingobjectrepresentshowthespecifiedobjectreactswhentheusermovesthemousepointeroveritduringaslideshow.
![Page 47: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/47.jpg)
UsingtheActionSettingsCollection
UsetheActionSettingspropertytoreturntheActionSettingscollection.UseActionSettings(index),whereindexiseitherppMouseClickorppMouseOver,toreturnasingleActionSettingobject.ThefollowingexamplespecifiesthattheCalculateTotalmacroberunwheneverthemousepointerpassesovertheshapeduringaslideshow.
WithActivePresentation.Slides(1).Shapes(3)_
.ActionSettings(ppMouseOver)
.Action=ppActionRunMacro
.Run="CalculateTotal"
.AnimateAction=True
EndWith
![Page 48: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/48.jpg)
ShowAll
![Page 49: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/49.jpg)
AddInsCollectionObjectApplication AddIns
AddIn
AcollectionofAddInobjectsthatrepresentalltheMicrosoftPowerPoint-specificadd-insavailabletoPowerPoint,regardlessofwhetherornotthey'reloaded.ThisdoesnotincludeComponentObjectModel(COM)add-ins.
![Page 50: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/50.jpg)
UsingtheAddInsCollection
UsetheAddInsmethodtoreturntheAddInscollection.Thefollowingexampledisplaysthenamesofalltheadd-insthatarecurrentlyloadedinPowerPoint.
ForEachadInAddIns
Ifad.LoadedThenMsgBoxad.Name
Next
UsetheAddmethodtoaddaPowerPoint-specificadd-intothelistofthoseavailable.TheAddmethodaddsanadd-intothelistbutdoesn'tloadtheadd-in.Toloadtheadd-in,settheLoadedpropertyoftheadd-intoTrueafteryouusetheAddmethod.Youcanperformthesetwoactionsinasinglestep,asshowninthefollowingexample(notethatyouusethenameoftheadd-in,notitstitle,withtheAddmethod).
AddIns.Add("graphdrs.ppa").Loaded=True
UseAddIns(index),whereindexistheadd-in'stitleorindexnumber,toreturnasingleAddInobject.Thefollowingexampleloadsthehypotheticaladd-intitled"myppttools."
AddIns("myppttools").Loaded=True
Don'tconfusetheadd-intitlewiththeadd-inname,whichisthefilenameoftheadd-in.Youmustspelltheadd-intitleexactlyasit'sspelledintheAdd-Insdialogbox,butthecapitalizationdoesn'thavetomatch.
![Page 51: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/51.jpg)
AdjustmentsObject
Multipleobjects Adjustments
ContainsacollectionofadjustmentvaluesforthespecifiedAutoShape,WordArtobject,orconnector.Eachadjustmentvaluerepresentsonewayanadjustmenthandlecanbeadjusted.Becausesomeadjustmenthandlescanbeadjustedintwoways—forinstance,somehandlescanbeadjustedbothhorizontallyandvertically—ashapecanhavemoreadjustmentvaluesthanithasadjustmenthandles.Ashapecanhaveuptoeightadjustments.
![Page 52: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/52.jpg)
UsingtheAdjustmentsObject
UsetheAdjustmentspropertytoreturnanAdjustmentsobject.UseAdjustments(index),whereindexistheadjustmentvalue'sindexnumber,toreturnasingleadjustmentvalue.
Differentshapeshavedifferentnumbersofadjustmentvalues,differentkindsofadjustmentschangethegeometryofashapeindifferentways,anddifferentkindsofadjustmentshavedifferentrangesofvalidvalues.Forexample,thefollowingillustrationshowswhateachofthefouradjustmentvaluesforaright-arrowcalloutcontributestothedefinitionofthecallout'sgeometry.
NoteBecauseeachadjustableshapehasadifferentsetofadjustments,thebestwaytoverifytheadjustmentbehaviorforaspecificshapeistomanuallycreateaninstanceoftheshape,makeadjustmentswiththemacrorecorderturnedon,andthenexaminetherecordedcode.
Thefollowingtablesummarizestherangesofvalidadjustmentvaluesfordifferenttypesofadjustments.Inmostcases,ifyouspecifyavaluethat'sbeyondtherangeofvalidvalues,theclosestvalidvaluewillbeassignedtotheadjustment.
Typeofadjustment Validvalues
Linear(horizontal
Generallythevalue0.0representstheleftortopedgeoftheshapeandthevalue1.0representstherightorbottomedgeoftheshape.Validvaluescorrespondtovalidadjustmentsyoucanmaketotheshapemanually.Forexample,ifyoucanonlypullanadjustmenthandlehalfwayacrosstheshapemanually,themaximumvaluefor
![Page 53: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/53.jpg)
orvertical) thecorrespondingadjustmentwillbe0.5.Forshapessuchasconnectorsandcallouts,wherethevalues0.0and1.0representthelimitsoftherectangledefinedbythestartingandendingpointsoftheconnectororcalloutline,negativenumbersandnumbersgreaterthan1.0arevalidvalues.
Radial Anadjustmentvalueof1.0correspondstothewidthoftheshape.Themaximumvalueis0.5,orhalfwayacrosstheshape.
Angle Valuesareexpressedindegrees.Ifyouspecifyavalueoutsidetherange–180to180,itwillbenormalizedtobewithinthatrange.
Thefollowingexampleaddsaright-arrowcallouttomyDocumentandsetsadjustmentvaluesforthecallout.Notethatalthoughtheshapehasonlythreeadjustmenthandles,ithasfouradjustments.Adjustmentsthreeandfourbothcorrespondtothehandlebetweentheheadandneckofthearrow.
SetmyDocument=ActivePresentation.Slides(1)
Setrac=myDocument.Shapes_
.AddShape(msoShapeRightArrowCallout,10,10,250,190)
Withrac.Adjustments
.Item(1)=0.5'adjustswidthoftextbox
.Item(2)=0.15'adjustswidthofarrowhead
.Item(3)=0.8'adjustslengthofarrowhead
.Item(4)=0.4'adjustswidthofarrowneck
EndWith
![Page 54: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/54.jpg)
AnimationBehaviorsCollectionEffect AnimationBehaviors
AnimationBehaviorMultipleobjects
RepresentsacollectionofAnimationBehaviorobjects.
![Page 55: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/55.jpg)
UsingtheAnimationBehaviorscollection
UsetheAddmethodtoaddananimationbehavior.Thefollowingexampleaddsafive-secondanimatedrotationbehaviortothemainanimationsequenceonthefirstslide.
SubAnimationObject()
DimtimeMainAsTimeLine
'Referencethemainanimationtimeline
SettimeMain=ActivePresentation.Slides(1).TimeLine
'Addafive-secondanimatedrotationbehavior
'asthefirstanimationinthemainanimationsequence
timeMain.MainSequence(1).Behaviors.AddType:=msoAnimTypeRotation,Index:=1
EndSub
![Page 56: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/56.jpg)
AnimationPointsCollectionPropertyEffect AnimationPoints
AnimationPoint
RepresentsacollectionofanimationpointsforaPropertyEffectobject.
![Page 57: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/57.jpg)
UsingtheAnimationPointscollection
UsethePointspropertyofthePropertyEffectobjecttoreturnanAnimationPointscollectionobject.Thefollowingexampleaddsananimationpointtothefirstbehaviorintheactivepresentation'smainanimationsequence.
SubAddPoint()
ActivePresentation.Slides(1).TimeLine.MainSequence(1)_
.Behaviors(1).PropertyEffect.Points.Add
EndSub
Transitionsfromoneanimationpointtoanothercansometimesbeabruptorchoppy.UsetheSmoothpropertytomaketransitionssmoother.Thisexamplesmoothesthetransitionsbetweenanimationpoints.
SubSmoothTransition()
ActivePresentation.Slides(1).TimeLine.MainSequence(1)_
.Behaviors(1).PropertyEffect.Points.Smooth=msoTrue
EndSub
![Page 58: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/58.jpg)
ShowAll
![Page 59: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/59.jpg)
BordersCollectionObjectMultipleobjects Borders
LineFormatColorFormat
AcollectionofLineFormatobjectsthatrepresentthebordersanddiagonallinesofacellorrangeofcellsinatable.
![Page 60: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/60.jpg)
UsingtheBordersCollection
EachCellobjectorCellRangecollectionhassixelementsintheBorderscollection.YoucannotaddobjectstotheBorderscollection.
UseBorders(index),whereindexidentifiesthecellborderordiagonalline,toreturnasingleBorderobject.IndexcanbeanyPPBorderTypeconstant.
PPBorderTypecanbeoneofthesePPBorderTypeconstants.ppBorderBottomppBorderLeftppBorderRightppBorderTopppBorderDiagonalDownppBorderDiagonalUp
UsetheDashStylepropertytoapplyadashedlinestyletoaBorderobject.Thisexampleselectsthesecondrowfromthetableandappliesadashedlinestyletothebottomborder.
ActiveWindow.Selection.ShapeRange.Table.Rows(2)_
.Cells.Borders(ppBorderBottom).DashStyle=msoLineDash
![Page 61: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/61.jpg)
CellRangeCollectionObjectMultipleobjects CellRange
Borders
AcollectionofCellobjectsinatablecolumnorrow.TheCellRangecollectionrepresentsallthecellsinthespecifiedcolumnorrow.TousetheCellRangecollection,usetheCellskeyword.
![Page 62: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/62.jpg)
UsingtheCellRangeCollection
UsetheCellspropertytoreturntheCellRangecollection.Thisexamplesetstherightborderforthecellsinthefirstcolumnofthetabletoadashedlinestyle.
WithActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Cells
.Borders(ppBorderRight).DashStyle=msoLineDash
EndWith
Thisexamplereturnsthenumberofcellsinrowoneoftheselectedtable.
num=ActiveWindow.Selection.ShapeRange.Table.Rows(1).Cells.Count
UseCell(row,column),whererowistherownumberandcolumnisthecolumnnumber,orCells(index),whereindexisthenumberofthecellinthespecifiedroworcolumn,toreturnasingleCellobject.Cellsarenumberedfromlefttorightinrowsandfromtoptobottomincolumns.Withright-to-leftlanguagesettings,thisschemeisreversed.Theexamplebelowmergesthefirsttwocellsinrowoneofthetableinshapefiveonslidetwo.
WithActivePresentation.Slides(2).Shapes(5).Table
.Cell(1,1).MergeMergeTo:=.Cell(1,2)
EndWith
![Page 63: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/63.jpg)
Remarks
AlthoughthecollectionobjectisnamedCellRangeandisshownintheObjectBrowser,thiskeywordisnotusedinprogrammingthePowerPointobjectmodel.ThekeywordCellsisusedinstead.
YoucannotprogrammaticallyaddcellstoordeletecellsfromaPowerPointtable.UsetheAddTablemethodwiththeTableobjecttoaddanewtable.UsetheAddmethodoftheColumnsorRowscollectionstoaddacolumnorrowtoatable.UsetheDeletemethodoftheColumnsorRowscollectionstodeleteacolumnorrowfromatable.
![Page 64: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/64.jpg)
ColorSchemesCollectionObjectPresentation ColorSchemes
ColorScheme
AcollectionofalltheColorSchemeobjectsinthespecifiedpresentation.EachColorSchemeobjectrepresentsacolorscheme,whichisasetofcolorsthatareusedtogetheronaslide.
![Page 65: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/65.jpg)
UsingtheColorSchemesCollection
UsetheColorSchemespropertytoreturntheColorSchemescollection.UseColorSchemes(index),whereindexisthecolorschemeindexnumber,toreturnasingleColorSchemeobject.Thefollowingexampledeletescolorschemetwofromtheactivepresentation.
ActivePresentation.ColorSchemes(2).Delete
UsetheAddmethodtocreateanewcolorschemeandaddittotheColorSchemescollection.Thefollowingexampleaddsacolorschemetotheactivepresentationandsetsthetitlecolorandbackgroundcolorforthecolorscheme(becausenoargumentwasusedwiththeAddmethod,theaddedcolorschemeisinitiallyidenticaltothefirststandardcolorschemeinthepresentation).
WithActivePresentation.ColorSchemes.Add
.Colors(ppTitle).RGB=RGB(255,0,0)
.Colors(ppBackground).RGB=RGB(128,128,0)
EndWith
SettheColorSchemepropertyofaSlide,SlideRange,orMasterobjecttoreturnthecolorschemeforoneslide,asetofslides,oramaster,respectively.Thefollowingexamplesetsthecolorschemeforalltheslidesintheactivepresentationtothethirdcolorschemeinthepresentation.
WithActivePresentation
.Slides.Range.ColorScheme=.ColorSchemes(3)
EndWith
![Page 66: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/66.jpg)
ColumnsCollectionObjectTable Columns
ColumnCellRange
AcollectionofColumnobjectsthatrepresentthecolumnsinatable.
![Page 67: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/67.jpg)
UsingtheColumnsCollection
UsetheColumnspropertytoreturntheColumnscollection.Thisexamplefindsthefirsttableintheactivepresentation,countsthenumberofColumnobjectsintheColumnscollection,anddisplaysinformationtotheuser.
DimColCount,sl,shAsInteger
WithActivePresentation
Forsl=1To.Slides.Count
Forsh=1To.Slides(sl).Shapes.Count
If.Slides(sl).Shapes(sh).HasTableThen
ColCount=.Slides(sl).Shapes(sh)_
.Table.Columns.Count
MsgBox"Shape"&sh&"onslide"&sl&_
"containsthefirsttableandhas"&_
ColCount&"columns."
ExitSub
EndIf
Next
Next
EndWith
UsetheAddmethodtoaddacolumntoatable.Thisexamplecreatesacolumninanexistingtableandsetsthewidthofthenewcolumnto72points(oneinch).
WithActivePresentation.Slides(2).Shapes(5).Table
.Columns.Add.Width=72
EndWith
UseColumns(index)toreturnasingleColumnobject.IndexrepresentsthepositionofthecolumnintheColumnscollection(usuallycountingfromlefttoright;althoughtheTableDirectionpropertycanreversethis).Thisexampleselectsthefirstcolumnofthetableinshapefiveonthesecondslide.
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Select
![Page 68: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/68.jpg)
![Page 69: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/69.jpg)
CommentsCollectionMultipleobjects Comments
Comment
RepresentsacollectionofCommentobjects.
![Page 70: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/70.jpg)
UsingtheCommentscollection
UsetheCommentspropertytorefertotheCommentscollection.Thefollowingexampledisplaysthenumberofcommentsonthecurrentslide.
SubCountComments()
MsgBox"Youhave"&ActiveWindow.Selection.SlideRange(1)_
.Comments.Count&"commentsonthisslide."
EndSub
UsetheAddmethodtoaddacommenttoaslide.Thisexampleaddsanewcommenttothefirstslideoftheactivepresentation.
SubAddComment()
DimsldNewAsSlide
DimcmtNewAsComment
SetsldNew=ActivePresentation.Slides.Add(Index:=1,_
Layout:=ppLayoutBlank)
SetcmtNew=sldNew.Comments.Add(Left:=12,Top:=12,_
Author:="JeffSmith",AuthorInitials:="JS",_
Text:="Youmightconsiderreviewingthenewspecs"&_
"formoreup-to-dateinformation.")
EndSub
![Page 71: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/71.jpg)
DesignsCollectionPresentation Designs
Design
Representsacollectionofslidedesigntemplates.
![Page 72: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/72.jpg)
UsingtheDesignscollection
UsetheDesignspropertyofthePresentationobjecttoreferenceadesigntemplate.
Toaddorcloneanindividualdesigntemplate,usetheDesignscollection'sAddorClonemethods,respectively.Torefertoanindividualdesigntemplate,usetheItemmethod.
Toloadadesigntemplate,usetheLoadmethod.
ThefollowingexampleaddsanewdesigntemplatetotheDesignscollectionandconfirmsitwasaddedcorrectly.
SubAddDesignMaster()
WithActivePresentation.Designs
.AdddesignName:="MyDesignName"
MsgBox.Item("MyDesignName").Name
EndWith
EndSub
![Page 73: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/73.jpg)
DiagramNodesCollectionDiagram DiagramNodes
DiagramNodeMultipleobjects
AcollectionofDiagramNodeobjectsthatrepresentsallthenodesinadiagram.
![Page 74: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/74.jpg)
UsingtheDiagramNodescollection
UsetheNodespropertyoftheDiagramobjecttoreturnaDiagramNodescollection.UsetheItemmethodtoselectandworkwithasinglediagramnodeinadiagram.Thisexampleassumesthefirstshapeonthefirstslideintheactivepresentationisadiagram,selectsthefirstnode,anddeletesit.
SubFillDiagramNode()
ActivePresentation.Slides(1).Shapes(1).Diagram.Nodes.Item(1).Delete
EndSub
UsetheSelectAllmethodtoselectandworkwithallnodesinadiagram.Thisexampleassumesthefirstshapeonthefirstslideintheactivepresentationisadiagram,selectsallnodes,andfillsthemwiththespecifiedpattern.
SubFillDiagramNodes()
ActivePresentation.Slides(1).Shapes(1).Diagram.Nodes.SelectAll
ActiveWindow.Selection.ShapeRange.Fill.Patterned_
Pattern:=msoPatternSmallConfetti
EndSub
![Page 75: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/75.jpg)
DocumentWindowsCollectionObjectMultipleobjects DocumentWindows
DocumentWindowMultipleobjects
AcollectionofalltheDocumentWindowobjectsthatarecurrentlyopeninPowerPoint.Thiscollectiondoesn'tincludeopenslideshowwindows,whichareincludedintheSlideShowWindowscollection.
![Page 76: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/76.jpg)
UsingtheDocumentWindowsCollection
UsetheWindowspropertytoreturntheDocumentWindowscollection.Thefollowingexampletilestheopendocumentwindows.
Windows.ArrangeppArrangeTiled
UsetheNewWindowmethodtocreateadocumentwindowandaddittotheDocumentWindowscollection.Thefollowingexamplecreatesanewwindowfortheactivepresentation.
ActivePresentation.NewWindow
UseWindows(index),whereindexisthewindowindexnumber,toreturnasingleDocumentWindowobject.Thefollowingexampleclosesdocumentwindowtwo.
Windows(2).Close
![Page 77: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/77.jpg)
FontsCollectionObjectPresentation Fonts
FontColorFormat
AcollectionofalltheFontobjectsinthespecifiedpresentation.EachFontobjectrepresentsafontthat'susedinthepresentation.
TheFontscollectionisusedbytheGeniWizardtodeterminewhetheranyofthefontsinthespecifiedpresentationwon'tbesupportedwhenGenigraphicsimagestheslides.Ifyoujustwanttosetcharacterformattingforaparticularbulletortextrange,usetheFontpropertytoreturntheFontobjectforthebulletortextrange.
TheGenigraphicswizardenablesuserstotransmittheirpresentationsdirectlytoGenigraphicsforconversionintofilmslides,overheadtransparencies,orotherspecializedmediaformats.FormoreinformationabouttheservicesGenigraphicsprovides,visittheGenigraphicsWebsiteathttp://www.genigraphics.com/.ThisservicemaynotbeavailableoutsidetheUnitedStates.
![Page 78: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/78.jpg)
UsingtheFontsObject
UsetheFontspropertytoreturntheFontscollection.Thefollowingexampledisplaysthenumberoffontsusedintheactivepresentation.
MsgBoxActivePresentation.Fonts.Count
UseFonts(index),whereindexisthefont'snameorindexnumber,toreturnasingleFontobject.Thefollowingexamplecheckstoseewhetherfontoneintheactivepresentationisembeddedinthepresentation.
IfActivePresentation.Fonts(1).Embedded=TrueThen
MsgBox"Font1isembedded"
![Page 79: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/79.jpg)
HeadersFootersObjectMultipleobjects HeadersFooters
HeaderFooter
ContainsalltheHeaderFooterobjectsonthespecifiedslide,notespage,handout,ormaster.EachHeaderFooterobjectrepresentsaheader,footer,dateandtime,orslidenumber.
NoteHeaderFooterobjectsaren'tavailableforSlideobjectsthatrepresentnotespages.TheHeaderFooterobjectthatrepresentsaheaderisavailableonlyforanotesmasterorhandoutmaster.
![Page 80: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/80.jpg)
UsingtheHeaderFootersObject
UsetheHeadersFooterspropertytoreturntheHeadersFootersobject.UsetheDateAndTime,Footer,Header,orSlideNumberpropertytoreturnanindividualHeaderFooterobject.Thefollowingexamplesetsthefootertextforslideoneintheactivepresentation.
ActivePresentation.Slides(1).HeadersFooters.Footer_
.Text="VolcanoCoffee"
![Page 81: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/81.jpg)
NamedSlideShowsCollectionObjectSlideShowSettings NamedSlideShows
NamedSlideShow
AcollectionofalltheNamedSlideShowobjectsinthepresentation.EachNamedSlideShowobjectrepresentsacustomslideshow.
![Page 82: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/82.jpg)
UsingtheNamedSlideShowsCollection
UsetheNamedSlideShowspropertytoreturntheNamedSlideShowscollection.UseNamedSlideShows(index),whereindexisthecustomslideshownameorindexnumber,toreturnasingleNamedSlideShowobject.Thefollowingexampledeletesthecustomslideshownamed"QuickShow."
ActivePresentation.SlideShowSettings_
.NamedSlideShows("QuickShow").Delete
UsetheAddmethodtocreateanewslideshowandaddittotheNamedSlideShowscollection.Thefollowingexampleaddstotheactivepresentationthenamedslideshow"QuickShow"thatcontainsslides2,7,and9.Theexamplethenrunsthiscustomslideshow.
DimqSlides(1To3)AsLong
WithActivePresentation
With.Slides
qSlides(1)=.Item(2).SlideID
qSlides(2)=.Item(7).SlideID
qSlides(3)=.Item(9).SlideID
EndWith
With.SlideShowSettings
.NamedSlideShows.Add"QuickShow",qSlides
.RangeType=ppShowNamedSlideShow
.SlideShowName="QuickShow"
.Run
EndWith
EndWith
![Page 83: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/83.jpg)
PanesCollectionObjectDocumentWindow Panes
Pane
AcollectionofPaneobjectsthatrepresenttheslide,outline,andnotespanesinthedocumentwindowfornormalview,orthesinglepaneofanyotherviewinthedocumentwindow.
![Page 84: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/84.jpg)
UsingthePanesCollection
UsethePanespropertytoreturnthePanescollection.Thefollowingexampletestsforthenumberofpanesintheactivewindow.Ifthevalueisone,indicatinganyviewotherthatnormalview,thennormalviewisactivatedandtheverticalpanedividerissettodividethedocumentwindowat15%outlinepaneand85%slidepane.
WithActiveWindow
If.Panes.Count=1Then
.ViewType=ppViewNormal
.SplitHorizontal=15
EndIf
EndWith
![Page 85: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/85.jpg)
Remarks
Innormalview,thePanescollectioncontainsthreemembers.Allotherdocumentwindowviewshaveonlyasinglepane,resultinginaPanescollectionwithonemember.
![Page 86: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/86.jpg)
ShowAll
![Page 87: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/87.jpg)
PlaceholdersCollectionObjectShapes Placeholders
ShapeMultipleobjects
AcollectionofalltheShapeobjectsthatrepresentplaceholdersonthespecifiedslide.EachShapeobjectinthePlaceholderscollectionrepresentsaplaceholderfortext,achart,atable,anorganizationalchart,orsomeothertypeofobject.Iftheslidehasatitle,thetitleisthefirstplaceholderinthecollection.
![Page 88: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/88.jpg)
UsingthePlaceholdersCollection
UsethePlaceholderspropertytoreturnthePlaceholderscollection.UsePlaceholders(index),whereindexistheplaceholderindexnumber,toreturnaShapeobjectthatrepresentsasingleplaceholder.Notethatforanyslidethathasatitle,Shapes.TitleisequivalenttoShapes.Placeholders(1).ThefollowingexampleaddsanewslidewithaBulletedListslidelayouttothebeginningofthepresentation,setsthetextforthetitle,andthenaddstwoparagraphstothetextplaceholder.
SetsObj=ActivePresentation.Slides.Add(1,ppLayoutText).Shapes
sObj.Title.TextFrame.TextRange.Text="Thisisthetitletext"
sObj.Placeholders(2).TextFrame.TextRange.Text=_
"Item1"&Chr(13)&"Item2"
YoucandeleteindividualplaceholdersbyusingtheDeletemethod,andyoucanrestoredeletedplaceholdersbyusingtheAddPlaceholdermethod,butyoucannotaddanymoreplaceholderstoaslidethanithadwhenitwascreated.Tochangethenumberofplaceholdersonagivenslide,settheLayoutproperty.
![Page 89: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/89.jpg)
PresentationsCollectionObjectApplication Presentations
PresentationMultipleobjects
AcollectionofallthePresentationobjectsinPowerPoint.EachPresentationobjectrepresentsapresentationthat'scurrentlyopeninPowerPoint.
![Page 90: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/90.jpg)
UsingthePresentationsCollection
UsethePresentationspropertytoreturnthePresentationscollection.UsetheAddmethodtocreateanewpresentationandaddittothecollection.Thefollowingexamplecreatesanewpresentation,addsaslidetothepresentation,andthensavesthepresentation.
SetnewPres=Presentations.Add(True)
newPres.Slides.Add1,1
newPres.SaveAs"Sample"
UsePresentations(index),whereindexisthepresentation'snameorindexnumber,toreturnasinglePresentationobject.Thefollowingexampleprintspresentationone.
Presentations(1).PrintOut
UsetheOpenmethodtoopenapresentationandaddittothePresentationscollection.ThefollowingexampleopensthefileSales.pptasaread-onlypresentation.
Presentations.OpenFileName:="sales.ppt",ReadOnly:=True
![Page 91: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/91.jpg)
Remarks
ThePresentationscollectiondoesn'tincludeopenadd-ins,whichareaspecialkindofhiddenpresentation.Youcan,however,returnasingleopenadd-inifyouknowitsfilename.ForexamplePresentations("oscar.ppa")willreturntheopenadd-innamed"Oscar.ppa"asaPresentationobject.However,itisrecommendedthattheAddInscollectionbeusedtoreturnopenadd-ins.
![Page 92: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/92.jpg)
PrintRangesCollectionObjectPrintOptions PrintRanges
PrintRange
AcollectionofallthePrintRangeobjectsinthespecifiedpresentation.EachPrintRangeobjectrepresentsarangeofconsecutiveslidesorpagestobeprinted.
![Page 93: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/93.jpg)
UsingthePrintRangesCollection
UsetheRangespropertytoreturnthePrintRangescollection.Thefollowingexampleclearsallpreviouslydefinedprintrangesfromthecollectionfortheactivepresentation.
ActivePresentation.PrintOptions.Ranges.ClearAll
UsetheAddmethodtocreateaPrintRangeobjectandaddittothePrintRangescollection.Thefollowingexampledefinesthreeprintrangesthatrepresentslide1,slides3through5,andslides8and9intheactivepresentationandthenprintstheslidesintheseranges.
WithActivePresentation.PrintOptions
.RangeType=ppPrintSlideRange
With.Ranges
.ClearAll
.Add1,1
.Add3,5
.Add8,9
EndWith
EndWith
ActivePresentation.PrintOut
UseRanges(index),whereindexistheprintrangeindexnumber,toreturnasinglePrintRangeobject.Thefollowingexampledisplaysamessagethatindicatesthestartingandendingslidenumbersforprintrangeoneintheactivepresentation.
WithActivePresentation.PrintOptions.Ranges
If.Count>0Then
With.Item(1)
MsgBox"Printrange1startsonslide"&.Start&_
"andendsonslide"&.End
EndWith
EndIf
EndWith
![Page 94: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/94.jpg)
![Page 95: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/95.jpg)
PublishObjectsCollectionObjectPresentation PublishObjects
PublishObject
AcollectionofPublishObjectobjectsrepresentingthesetofcompleteorpartialloadedpresentationsthatareavailableforpublishingtoHTML.
![Page 96: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/96.jpg)
UsingthePublishObjectsCollection
UsethePublishObjectspropertytoreturnthePublishObjectscollection.ThisexamplepublishesslidesthreethroughfiveoftheactivepresentationtoHTML.ItnamesthepublishedpresentationMallard.htm.
WithActivePresentation.PublishObjects(1)
.FileName="C:\Test\Mallard.htm"
.SourceType=ppPublishSlideRange
.RangeStart=3
.RangeEnd=5
.Publish
EndWith
UseItem(index),whereindexisalways"1",toreturnthesinglePublishObjectobjectforaloadedpresentation.TherecanbeonlyonePublishObjectobjectforeachloadedpresentation.
ThisexampledefinesthePublishObjectobjecttobetheentireactivepresentationbysettingtheSourceTypepropertytoppPublishAll.
ActivePresentation.PublishObjects.Item(1).SourceType=ppPublishAll
![Page 97: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/97.jpg)
Remarks
YoucanspecifythecontentandattributesofthepublishedpresentationbysettingvariouspropertiesofthePublishObjectobject.Forexample,theSourceTypepropertydefinestheportionofaloadedpresentationtobepublished.TheRangeStartpropertyandtheRangeEndpropertyspecifytherangeofslidestopublish,andtheSpeakerNotespropertydesignateswhetherornottopublishthespeaker'snotes.
YoucannotaddtothePublishObjectscollection.
![Page 98: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/98.jpg)
RowsCollectionObjectTable Rows
RowCellRange
AcollectionofRowobjectsthatrepresenttherowsinatable.
![Page 99: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/99.jpg)
UsingtheRowsCollection
UsetheRowspropertytoreturntheRowscollection.Thisexamplechangestheheightofallrowsinthespecifiedtableto160points.
DimiAsInteger
WithActivePresentation.Slides(2).Shapes(4).Table
Fori=1To.Rows.Count
.Rows.Height=160
Nexti
EndWith
UsetheAddmethodtoaddarowtoatable.Thisexampleinsertsarowbeforethesecondrowinthereferencedtable.
ActivePresentation.Slides(2).Shapes(5).Table.Rows.Add(2)
UseRows(index),whereindexisanumberthatrepresentsthepositionoftherowinthetable,toreturnasingleRowobject.Thisexampledeletesthefirstrowfromthetableinshapefiveonslidetwo.
ActivePresentation.Slides(2).Shapes(5).Table.Rows(1).Delete
![Page 100: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/100.jpg)
RulerLevelsCollectionObjectRuler RulerLevels
RulerLevel
AcollectionofalltheRulerLevelobjectsonthespecifiedruler.EachRulerLevelobjectrepresentsthefirst-lineandleftindentfortextataparticularoutlinelevel.Thiscollectionalwayscontainsfivemembers—oneforeachoftheavailableoutlinelevels.
![Page 101: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/101.jpg)
UsingtheRulerLevelsCollection
UsetheLevelspropertytoreturntheRulerLevelscollection.Thefollowingexamplesetsthemarginsforthefiveoutlinelevelsinbodytextintheactivepresentation.
WithActivePresentation.SlideMaster.TextStyles(ppBodyStyle).Ruler
.Levels(1).FirstMargin=0
.Levels(1).LeftMargin=40
.Levels(2).FirstMargin=60
.Levels(2).LeftMargin=100
.Levels(3).FirstMargin=120
.Levels(3).LeftMargin=160
.Levels(4).FirstMargin=180
.Levels(4).LeftMargin=220
.Levels(5).FirstMargin=240
.Levels(5).LeftMargin=280
EndWith
![Page 102: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/102.jpg)
SequenceCollectionTimeLine Sequence
EffectMultipleobjects
RepresentsacollectionofEffectobjectsforaslide'sinteractiveanimationsequences.TheSequencecollectionisamemberoftheSequencescollection.
![Page 103: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/103.jpg)
UsingtheSequencecollection
UsetheMainSequencepropertyoftheTimeLineobjecttoreturnaSequenceobject.
UsetheAddEffectmethodtoaddanewSequenceobject.Thisexampleaddsashapeandananimationsequencetothefirstshapeonthefirstslideintheactivepresentation.
SubNewEffect()
DimeffNewAsEffect
DimshpFirstAsShape
SetshpFirst=ActivePresentation.Slides(1).Shapes(1)
SeteffNew=ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect_
(Shape:=shpFirst,effectId:=msoAnimEffectBlinds)
EndSub
![Page 104: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/104.jpg)
SequencesCollectionTimeLine Sequences
Sequence
RepresentsacollectionofSequenceobjects.UseaSequenceobjecttoadd,find,modify,andcloneanimationeffects.
![Page 105: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/105.jpg)
UsingtheSequencescollection
UsetheInteractiveSequencespropertyoftheTimeLineobjecttoreturnaSequencescollection.UsetheAddmethodtoaddaninteractiveanimationsequence.Thefollowingexampleaddstwoshapesonthefirstslideoftheactivepresentationandsetsinteractiveeffectforthestarshapesothatwhenyouclickonthebevelshape,thestarshapeisbeanimated.
SubAddNewSequence()
Dimshp1AsShape
Dimshp2AsShape
DiminterEffectAsEffect
Setshp1=ActivePresentation.Slides(1).Shapes.AddShape_
(Type:=msoShape32pointStar,Left:=100,_
Top:=100,Width:=200,Height:=200)
Setshp2=ActivePresentation.Slides(1).Shapes.AddShape_
(Type:=msoShapeBevel,Left:=400,_
Top:=200,Width:=150,Height:=100)
WithActivePresentation.Slides(1).TimeLine.InteractiveSequences.Add(1)
SetinterEffect=.AddEffect(shp2,msoAnimEffectBlinds,_
trigger:=msoAnimTriggerOnShapeClick)
interEffect.Shape=shp1
EndWith
EndSub
![Page 106: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/106.jpg)
ShapeNodesCollectionObjectMultipleobjects ShapeNodes
ShapeNode
AcollectionofalltheShapeNodeobjectsinthespecifiedfreeform.EachShapeNodeobjectrepresentseitheranodebetweensegmentsinafreeformoracontrolpointforacurvedsegmentofafreeform.YoucancreateafreeformmanuallyorbyusingtheBuildFreeformandConvertToShapemethods.
![Page 107: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/107.jpg)
UsingtheShapeNodesCollection
UsetheNodespropertytoreturntheShapeNodescollection.ThefollowingexampledeletesnodefourinshapethreeonmyDocument.Forthisexampletowork,shapethreemustbeafreeformwithatleastfournodes.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(3).Nodes.Delete4
UsetheInsertmethodtocreateanewnodeandaddittotheShapeNodescollection.ThefollowingexampleaddsasmoothnodewithacurvedsegmentafternodefourinshapethreeonmyDocument.Forthisexampletowork,shapethreemustbeafreeformwithatleastfournodes.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Nodes
.Insert4,msoSegmentCurve,msoEditingSmooth,210,100
EndWith
UseNodes(index),whereindexisthenodeindexnumber,toreturnasingleShapeNodeobject.IfnodeoneinshapethreeonmyDocumentisacornerpoint,thefollowingexamplemakesitasmoothpoint.Forthisexampletowork,shapethreemustbeafreeform.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3)
If.Nodes(1).EditingType=msoEditingCornerThen
.Nodes.SetEditingType1,msoEditingSmooth
EndIf
EndWith
![Page 108: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/108.jpg)
ShapesCollectionObjectMultipleobjects Shapes
Multipleobjects
AcollectionofalltheShapeobjectsonthespecifiedslide.EachShapeobjectrepresentsanobjectinthedrawinglayer,suchasanAutoShape,freeform,OLEobject,orpicture.
NoteIfyouwanttoworkwithasubsetoftheshapesonadocument—forexample,todosomethingtoonlytheAutoShapesonthedocumentortoonlytheselectedshapes—youmustconstructaShapeRangecollectionthatcontainstheshapesyouwanttoworkwith.Foranoverviewofhowtoworkeitherwithasingleshapeorwithmorethanoneshapeatatime,seeWorkingwithShapes(DrawingObjects).
![Page 109: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/109.jpg)
UsingtheShapesCollection
UsetheShapespropertytoreturntheShapescollection.Thefollowingexampleselectsalltheshapesintheactivepresentation.
ActivePresentation.Slides(1).Shapes.SelectAll
NoteIfyouwanttodosomething(likedeleteorsetaproperty)toalltheshapesonadocumentatthesametime,usetheRangemethodwithnoargumenttocreateaShapeRangeobjectthatcontainsalltheshapesintheShapescollection,andthenapplytheappropriatepropertyormethodtotheShapeRangeobject.
UsetheAddCallout,AddComment,AddConnector,AddCurve,AddLabel,AddLine,AddMediaObject,AddOLEObject,AddPicture,AddPlaceholder,AddPolyline,AddShape,AddTable,AddTextbox,AddTextEffect,orAddTitlemethodtocreateanewshapeandaddittotheShapescollection.UsetheBuildFreeformmethodinconjunctionwiththeConvertToShapemethodtocreateanewfreeformandaddittothecollection.Thefollowingexampleaddsarectangletotheactivepresentation.
ActivePresentation.Slides(1).Shapes.AddShapeType:=msoShapeRectangle,_
Left:=50,Top:=50,Width:=100,Height:=200
UseShapes(index),whereindexistheshape'snameorindexnumber,toreturnasingleShapeobject.Thefollowingexamplesetsthefilltoapresetshadeforshapeoneintheactivepresentation.
ActivePresentation.Slides(1).Shapes(1).Fill_
.PresetGradientStyle:=msoGradientHorizontal,Variant:=1,_
PresetGradientType:=msoGradientBrass
UseShapes.Range(index),whereindexistheshape'snameorindexnumberoranarrayofshapenamesorindexnumbers,toreturnaShapeRangecollectionthatrepresentsasubsetoftheShapescollection.Thefollowingexamplesetsthefillpatternforshapesoneandthreeintheactivepresentation.
![Page 110: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/110.jpg)
ActivePresentation.Slides(1).Shapes.Range(Array(1,3)).Fill_
.PatternedPattern:=msoPatternHorizontalBrick
UseShapes.Placeholders(index),whereindexistheplaceholdernumber,toreturnaShapeobjectthatrepresentsaplaceholder.Ifthespecifiedslidehasatitle,useShapes.Placeholders(1)orShapes.Titletoreturnthetitleplaceholder.Thefollowingexampleaddsaslidetotheactivepresentationandthenaddstexttoboththetitleandthesubtitle(thesubtitleisthesecondplaceholderonaslidewiththislayout).
WithActivePresentation.Slides.Add(Index:=1,Layout:=ppLayoutTitle).Shapes
.Title.TextFrame.TextRange="Thisisthetitletext"
.Placeholders(2).TextFrame.TextRange="Thisissubtitletext"
EndWith
![Page 111: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/111.jpg)
SlideRangeCollectionObjectMultipleobjects SlideRange
Multipleobjects
Acollectionthatrepresentsanotespageorasliderange,whichisasetofslidesthatcancontainaslittleasasingleslideorasmuchasalltheslidesinapresentation.Youcanincludewhicheverslidesyouwant—chosenfromalltheslidesinthepresentationorfromalltheslidesintheselection—toconstructasliderange.Forexample,youcouldconstructaSlideRangecollectionthatcontainsthefirstthreeslidesinapresentation,alltheselectedslidesinthepresentation,orallthetitleslidesinthepresentation.
![Page 112: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/112.jpg)
UsingtheSlideRangeCollection
Thissectiondescribeshowto:
ReturnasetofslidesthatyouspecifybynameorindexnumberReturnallorsomeoftheselectedslidesinapresentationReturnanotespageApplypropertiesandmethodstoasliderange
![Page 113: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/113.jpg)
Returningasetofslidesthatyouspecifybynameorindexnumber
UseSlides.Range(index),whereindexisthenameorindexnumberoftheslideoranarraythatcontainseithernamesorindexnumbersofslides,toreturnaSlideRangecollectionthatrepresentsasetofslidesinapresentation.YoucanusetheArrayfunctiontoconstructanarrayofnamesorindexnumbers.Thefollowingexamplesetsthebackgroundfillforslidesoneandthreeintheactivepresentation.
WithActivePresentation.Slides.Range(Array(1,3))
.FollowMasterBackground=False
.Background.Fill.PresetGradientmsoGradientHorizontal,_
1,msoGradientLateSunset
EndWith
Thefollowingexamplesetsthebackgroundfillfortheslidesnamed"Intro"and"BigChart"intheactivepresentation.NotethatslidesareassignedautomaticallygeneratednamesoftheformSliden(wherenisaninteger)whenthey'recreated.Toassignamoremeaningfulnametoaslide,usetheNameproperty.
WithActivePresentation.Slides.Range(Array("Intro","BigChart"))
.FollowMasterBackground=False
.Background.Fill.PresetGradientmsoGradientHorizontal,_
1,msoGradientLateSunset
EndWith
AlthoughyoucanusetheRangemethodtoreturnanynumberofslides,it'ssimplertousetheItemmethodifyouonlywanttoreturnasinglememberoftheSlideRangecollection.Forexample,Slides(1)issimplerthanSlides.Range(1).
![Page 114: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/114.jpg)
Returningallorsomeoftheselectedslidesinapresentation
UsetheSlideRangepropertyoftheSelectionobjecttoreturnalltheslidesintheselection.Thefollowingexamplesetsthebackgroundfillforalltheselectedslidesinwindowone,assumingthatthere'satleastoneslideselected.
WithWindows(1).Selection.SlideRange
.FollowMasterBackground=False
.Background.Fill.PresetGradientmsoGradientHorizontal,_
1,msoGradientLateSunset
EndWith
UseSelection.SlideRange(index),whereindexistheslidenameorindexnumber,toreturnasingleslidefromtheselection.Thefollowingexamplesetsthebackgroundfillforslidetwointhecollectionofselectedslidesinwindowone,assumingthatthereareatleasttwoslidesselected.
WithWindows(1).Selection.SlideRange(2)
.FollowMasterBackground=False
.Background.Fill.PresetGradientmsoGradientHorizontal,_
1,msoGradientLateSunset
EndWith
![Page 115: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/115.jpg)
Returninganotespage
UsetheNotesPagepropertytoreturnaSlideRangecollectionthatrepresentsthespecifiednotespage.Thefollowingexampleinsertstextintoplaceholdertwo(thenotesarea)onthenotespageforslideoneintheactivepresentation.
ActivePresentation.Slides(1).NotesPage.Shapes_
.Placeholders(2).TextFrame.TextRange.InsertAfter"AddedText"
![Page 116: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/116.jpg)
Applyingapropertyormethodtoasliderange
Justasyoucanworkwithseveralslidesatthesametimeintheuserinterfacebyselectingthemandapplyingacommand,youcanworkwithseveralslidesatthesametimeprogrammaticallybyconstructingaSlideRangecollectionandapplyingpropertiesormethodstoit.Andjustassomecommandsintheuserinterfacethatworkonsingleslidesaren'tvalidwhenmultipleslidesareselected,somepropertiesandmethodsthatworkonaSlideobjectoronaSlideRangecollectionthatcontainsonlyoneslidewillfailifthey'reappliedtoaSlideRangecollectionthatcontainsmorethanoneslide.Ingeneral,ifyoucan'tdosomethingmanuallywhenmorethanoneslideisselected(suchasreturntheindividualshapesononeoftheslides),youcan'tdoitprogrammaticallybyusingaSlideRangecollectionthatcontainsmorethanoneslide.
Forthoseoperationsthatworkintheuserinterfacewhetheryouhaveasingleslideormultipleslidesselected(suchascopyingtheselectiontotheClipboardorsettingtheslidebackgroundfill),theassociatedpropertiesandmethodswillworkonaSlideRangecollectionthatcontainsmorethanoneslide.Herearesomegeneralguidelinesforhowthesepropertiesandmethodsbehavewhenthey'reappliedtomultipleslides.
ApplyingamethodtoaSlideRangecollectionisequivalenttoapplyingthemethodtoalltheSlideobjectsinthatrangeasagroup.SettingthevalueofapropertyoftheSlideRangecollectionisequivalenttosettingthevalueofthepropertyineachslideinthatrangeindividually(forapropertythattakesanenumeratedtype,settingthevaluetothe"Mixed"valuehasnoeffect).ApropertyoftheSlideRangecollectionthatreturnsanenumeratedtypereturnsthevalueofthepropertyforanindividualslideinthecollectionifallslidesinthecollectionhavethesamevalueforthatproperty.Iftheslidesinthecollectiondon'tallhavethesamevaluefortheproperty,thepropertyreturnsthe"Mixed"value.ApropertyoftheSlideRangecollectionthatreturnsasimpledatatype(suchasLong,Single,orString)returnsthevalueofthepropertyforanindividualslideinthecollectionifallslidesinthecollectionhavethesamevalueforthatproperty.Iftheslidesinthecollectiondon'tallhavethesamevaluefortheproperty,thepropertywillreturn–2orgenerateanerror.For
![Page 117: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/117.jpg)
example,usingtheNamepropertyonaSlideRangeobjectthatcontainsmultipleslideswillgenerateanerrorbecauseeachslidehasadifferentvalueforitsNameproperty.Someformattingpropertiesofslidesaren'tsetbypropertiesandmethodsthatapplydirectlytotheSlideRangecollection,butbypropertiesandmethodsthatapplytoanobjectcontainedintheSlideRangecollection,suchastheColorSchemeobject.Ifthecontainedobjectrepresentsoperationsthatcanbeperformedonmultipleobjectsintheuserinterface,you'llbeabletoreturntheobjectfromaSlideRangecollectionthatcontainsmorethanoneslide,anditspropertiesandmethodswillfollowtheprecedingrules.Forexample,youcanusetheColorSchemepropertytoreturntheColorSchemeobjectthatrepresentsthecolorschemesusedonalltheslidesinthespecifiedSlideRangecollection.SettingpropertiesforthisColorSchemeobjectwillalsosetthesepropertiesfortheColorSchemeobjectsonalltheindividualslidesintheSlideRangecollection.
![Page 118: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/118.jpg)
SlidesCollectionObjectPresentation Slides
SlideMultipleobjects
AcollectionofalltheSlideobjectsinthespecifiedpresentation.
![Page 119: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/119.jpg)
UsingtheSlidesCollection
Thissectiondescribeshowto:
CreateaslideandaddittothecollectionReturnasingleslidethatyouspecifybyname,indexnumber,orslideIDnumberReturnasubsetoftheslidesinthepresentationApplyapropertyormethodtoalltheslidesinthepresentationatthesametime
![Page 120: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/120.jpg)
Creatingaslideandaddingittothecollection
UsetheSlidespropertytoreturnaSlidescollection.UsetheAddmethodtocreateanewslideandaddittothecollection.Thefollowingexampleaddsanewslidetotheactivepresentation.
ActivePresentation.Slides.Add2,ppLayoutBlank
![Page 121: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/121.jpg)
Returningasingleslidethatyouspecifybyname,indexnumber,orslideIDnumber
UseSlides(index),whereindexistheslidenameorindexnumber,orusetheSlides.FindBySlideID(index),whereindexistheslideIDnumber,toreturnasingleSlideobject.Thefollowingexamplesetsthelayoutforslideoneintheactivepresentation.
ActivePresentation.Slides(1).Layout=ppLayoutTitle
Thefollowingexamplesetsthelayoutfortheslidenamed"BigChart"intheactivepresentation.NotethatslidesareassignedautomaticallygeneratednamesoftheformSliden(wherenisaninteger)whenthey'recreated.Toassignamoremeaningfulnametoaslide,usetheNameproperty.
ActivePresentation.Slides("BigChart").Layout=ppLayoutTitle
![Page 122: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/122.jpg)
Returningasubsetoftheslidesinthepresentation
UseSlides.Range(index),whereindexistheslideindexnumberornameoranarrayofslideindexnumbersoranarrayofslidenames,toreturnaSlideRangeobjectthatrepresentsasubsetoftheSlidescollection.Thefollowingexamplesetsthebackgroundfillforslidesoneandthreeintheactivepresentation.
WithActivePresentation.Slides.Range(Array(1,3))
.FollowMasterBackground=False
.Background.Fill.PresetGradientmsoGradientHorizontal,_
1,msoGradientLateSunset
EndWith
![Page 123: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/123.jpg)
Applyingapropertyormethodtoalltheslidesinthepresentationatthesametime
Ifyouwanttodosomethingtoalltheslidesinyourpresentationatthesametime(suchasdeleteallofthemorsetapropertyforallofthem),useSlides.RangewithnoargumenttoconstructaSlideRangecollectionthatcontainsalltheslidesintheSlidescollection,andthenapplytheappropriatepropertyormethodtotheSlideRangecollection.Thefollowingexamplesetsthebackgroundfillforalltheslidesintheactivepresentation
WithActivePresentation.Slides.Range
.FollowMasterBackground=False
.Background.Fill.PresetGradientmsoGradientHorizontal,_
1,msoGradientLateSunset
EndWith
![Page 124: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/124.jpg)
SlideShowWindowsCollectionObjectApplication SlideShowWindows
SlideShowWindowMultipleobjects
AcollectionofalltheSlideShowWindowobjectsthatrepresenttheopenslideshowsinPowerPoint.
![Page 125: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/125.jpg)
UsingtheSlideShowWindowsCollection
UsetheSlideShowWindowspropertytoreturntheSlideShowWindowscollection.UseSlideShowWindows(index),whereindexisthewindowindexnumber,toreturnasingleSlideShowWindowobject.Thefollowingexamplereducestheheightofslideshowwindowoneifit'safull-screenwindow.
WithSlideShowWindows(1)
If.IsFullScreenThen
.Height=.Height-20
EndIf
EndWith
UsetheRunmethodtocreateanewslideshowwindowandaddittotheSlideShowWindowscollection.Thefollowingexamplerunsaslideshowoftheactivepresentation.
ActivePresentation.SlideShowSettings.Run
![Page 126: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/126.jpg)
TabStopsCollectionObjectRuler TabStops
TabStop
AcollectionofalltheTabStopobjectsononeruler.
![Page 127: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/127.jpg)
UsingtheTabStopsCollection
UsetheTabStopspropertytoreturntheTabStopscollection.Thefollowingexampleclearsallthetabstopsforthetextinshapetwoonslideoneintheactivepresentation.
WithActivePresentation.Slides(1).Shapes(2)_
.TextFrame.Ruler.TabStops
Fort=.CountTo1Step-1
.Item(t).Clear
Next
EndWith
UsetheAddmethodtocreateatabstopandaddittotheTabStopscollection.Thefollowingexampleaddsatabstoptothebody-textstyleontheslidemasterfortheactivepresentation.Thenewtabstopwillbepositioned2inches(144points)fromtheleftedgeoftherulerandwillbeleftaligned.
ActivePresentation.SlideMaster_
.TextStyles(ppBodyStyle).Ruler.TabStops.AddppTabStopLeft,144
![Page 128: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/128.jpg)
TextStyleLevelsCollectionObjectTextStyle TextStyleLevels
TextStyleLevelMultipleobjects
Acollectionofalltheoutlinetextlevels.Thiscollectionalwayscontainsfivemembers,eachofwhichisrepresentedbyaTextStyleLevelobject.
![Page 129: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/129.jpg)
UsingtheTextStyleLevelsCollection
UseLevels(index),whereindexisanumberfrom1through5thatcorrespondstotheoutlinelevel,toreturnasingleTextStyleLevelobject.Thefollowingexamplesetsthefontnameandfontsizeforlevel-onebodytextonalltheslidesintheactivepresentation.
WithActivePresentation.SlideMaster_
.TextStyles(ppBodyStyle).Levels(1)
With.Font
.Name="Arial"
.Size=36
EndWith
EndWith
Thefollowingexamplesetsthefontsizefortextateachoutlinelevelforthenotesbodyareaonallthenotespagesintheactivepresentation.
WithActivePresentation.NotesMaster.TextStyles(ppBodyStyle).Levels
.Item(1).Font.Size=34
.Item(2).Font.Size=30
.Item(3).Font.Size=25
.Item(4).Font.Size=20
.Item(5).Font.Size=15
EndWith
![Page 130: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/130.jpg)
TextStylesCollectionObjectMaster TextStyles
TextStyleMultipleobjects
Acollectionofthreetextstyles titletext,bodytext,anddefaulttext eachofwhichisrepresentedbyaTextStyleobject.EachtextstylecontainsaTextFrameobjectthatdescribeshowtextisplacedwithinthetextboundingbox,aRulerobjectthatcontainstabstopsandoutlineindentformattinginformation,andaTextStyleLevelscollectionthatcontainsoutlinetextformattinginformation.
![Page 131: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/131.jpg)
UsingtheTextStylesCollection
UseTextStyles(index),whereindexiseitherppBodyStyle,ppDefaultStyle,orppTitleStyle,toreturnasingleTextStyleobject.Thisexamplesetsthemarginsforthenotesbodyareaonallthenotespagesintheactivepresentation.
WithActivePresentation.NotesMaster_
.TextStyles(ppBodyStyle).TextFrame
.MarginBottom=50
.MarginLeft=50
.MarginRight=50
.MarginTop=50
EndWith
![Page 132: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/132.jpg)
ActionSettingObjectActionSettings ActionSetting
Multipleobjects
Containsinformationabouthowthespecifiedshapeortextrangereactstomouseactionsduringaslideshow.TheActionSettingobjectisamemberoftheActionSettingscollection.TheActionSettingscollectioncontainsoneActionSettingobjectthatrepresentshowthespecifiedobjectreactswhentheuserclicksitduringaslideshowandoneActionSettingobjectthatrepresentshowthespecifiedobjectreactswhentheusermovesthemousepointeroveritduringaslideshow.
![Page 133: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/133.jpg)
UsingtheActionSettingObject
UseActionSettings(index),whereindexistheeitherppMouseClickorppMouseOver,toreturnasingleActionSettingobject.Thefollowingexamplesetsthemouse-clickactionforthetextinthethirdshapeonslideoneintheactivepresentationtoanInternetlink.
WithActivePresentation.Slides(1).Shapes(3)_
.TextFrame.TextRange.ActionSettings(ppMouseClick)
.Action=ppActionHyperlink
.Hyperlink.Address="http://www.microsoft.com"
EndWith
![Page 134: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/134.jpg)
Remarks
Ifyou'vesetpropertiesoftheActionSettingobjectthatdon'tseemtobetakingeffect,makesurethatyou'vesettheActionpropertytotheappropriatevalue.
![Page 135: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/135.jpg)
ShowAll
![Page 136: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/136.jpg)
AddInObjectAddIns AddIn
Representsasingleadd-in,eitherloadedornotloaded.TheAddInobjectisamemberoftheAddInscollection.TheAddInscollectioncontainsallofthePowerPoint-specificadd-insavailable,regardlessofwhetherornotthey'reloaded.ThecollectiondoesnotincludeComponentObjectModel(COM)add-ins.
![Page 137: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/137.jpg)
UsingtheAddInObject
UseAddIns(index),whereindexistheadd-in'stitleorindexnumber,toreturnasingleAddInobject.ThefollowingexampleloadstheMyPptToolsadd-in.
AddIns("myppttools").Loaded=True
Theadd-intitle,shownabove,shouldnotbeconfusedwiththeadd-inname,whichisthefilenameoftheadd-in.Youmustspelltheadd-intitleexactlyasit'sspelledintheAdd-Insdialogbox,butthecapitalizationdoesn'thavetomatch.
Theindexnumberrepresentsthepositionoftheadd-inintheAvailableAdd-InslistintheAdd-Insdialogbox.Thefollowingexampledisplaysthenamesofalltheadd-insthatarecurrentlyloadedinPowerPoint.
Fori=1ToAddIns.Count
IfAddIns(i).LoadedThenMsgBoxAddIns(i).Name
Next
![Page 138: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/138.jpg)
Remarks
UsetheAddmethodtoaddaPowerPoint-specificadd-intothelistofthoseavailable.Note,however,thatusingthismethoddoesn'tloadtheadd-in.Toloadtheadd-in,settheLoadedpropertyoftheadd-intoTrueafteryouusetheAddmethod.Youcanperformbothoftheseactionsinasinglestep,asshowninthefollowingexample(notethatyouusethenameoftheadd-in,notitstitle,withtheAddmethod).
AddIns.Add("generic.ppa").Loaded=True
UseAddIns(index),whereindexistheadd-in'stitle,toreturnareferencetotheloadedadd-in.ThefollowingexamplesetsthepresAddinvariabletotheadd-intitled"myppttools"andsetsthemyNamevariabletothenameoftheadd-in.
SetpresAddin=AddIns("myppttools")
WithpresAddin
myName=.Name
EndWith
![Page 139: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/139.jpg)
AnimationBehaviorObjectAnimationBehaviors AnimationBehavior
Multipleobjects
Representsthebehaviorofananimationeffect,themainanimationsequence,oraninteractiveanimationsequence.TheAnimationBehaviorobjectisamemberoftheAnimationBehaviorscollection.
![Page 140: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/140.jpg)
UsingtheAnimationBehaviorobject
UseBehaviors(index),whereindexisthenumberofthebehaviorinthesequenceofbehaviors,toreturnasingleAnimationBehaviorobject.Thefollowingexamplesetsthepositionsofthearotation'sstartingandendingpoints.ThisexampleassumesthatthefirstbehaviorforthemainanimationsequenceisaRotationEffectobject.
SubChange()
WithActivePresentation.Slides(1).TimeLine.MainSequence(1)_
.Behaviors(1).RotationEffect
.From=1
.To=180
EndWith
EndSub
![Page 141: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/141.jpg)
AnimationPointObjectAnimationPoints AnimationPoint
Representsanindividualanimationpointforananimationbehavior.TheAnimationPointobjectisamemberoftheAnimationPointscollection.TheAnimationPointscollectioncontainsalltheanimationpointsforananimationbehavior.
![Page 142: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/142.jpg)
UsingtheAnimationPointobject
ToaddorreferenceanAnimationPointobject,usetheAddorItemmethod,respectively.UsetheTimepropertyofanAnimationPointobjecttosettimingbetweenanimationpoints.UsetheValuepropertytosetotheranimationpointproperties,suchascolor.Thefollowingexampleaddsthreeanimationpointstothefirstbehaviorintheactivepresentation'smainanimationsequence,andthenitchangescolorsateachanimationpoint.
SubAniPoint()
DimsldNewSlideAsSlide
DimshpHeartAsShape
DimeffCustomAsEffect
DimaniBehaviorAsAnimationBehavior
DimaptNewPointAsAnimationPoint
SetsldNewSlide=ActivePresentation.Slides.Add_
(Index:=1,Layout:=ppLayoutBlank)
SetshpHeart=sldNewSlide.Shapes.AddShape_
(Type:=msoShapeHeart,Left:=100,Top:=100,_
Width:=200,Height:=200)
SeteffCustom=sldNewSlide.TimeLine.MainSequence_
.AddEffect(shpHeart,msoAnimEffectCustom)
SetaniBehavior=effCustom.Behaviors.Add(msoAnimTypeProperty)
WithaniBehavior.PropertyEffect
.Property=msoAnimShapeFillColor
SetaptNewPoint=.Points.Add
aptNewPoint.Time=0.2
aptNewPoint.Value=RGB(0,0,0)
SetaptNewPoint=.Points.Add
aptNewPoint.Time=0.5
aptNewPoint.Value=RGB(0,255,0)
SetaptNewPoint=.Points.Add
aptNewPoint.Time=1
aptNewPoint.Value=RGB(0,255,255)
EndWith
EndSub
![Page 143: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/143.jpg)
![Page 144: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/144.jpg)
AnimationSettingsObjectMultipleobjects AnimationSettings
Multipleobjects
Representsthespecialeffectsappliedtotheanimationforthespecifiedshapeduringaslideshow.
![Page 145: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/145.jpg)
UsingtheAnimationSettingsObject
UsetheAnimationSettingspropertyoftheShapeobjecttoreturntheAnimationSettingsobject.Thefollowingexampleaddsaslidethatcontainsbothatitleandathree-itemlisttotheactivepresentation,andthenitsetsthelisttobeanimatedbyfirst-levelparagraphs,toflyinfromtheleftwhenanimated,todimtothespecifiedcolorafterbeinganimated,andtoanimateitsitemsinreverseorder.
SetsObjs=ActivePresentation.Slides.Add(2,ppLayoutText).Shapes
sObjs.Title.TextFrame.TextRange.Text="TopThreeReasons"
WithsObjs.Placeholders(2)
.TextFrame.TextRange.Text=_
"Reason1"&VBNewLine&"Reason2"&VBNewLine&"Reason3"
With.AnimationSettings
.TextLevelEffect=ppAnimateByFirstLevel
.EntryEffect=ppEffectFlyFromLeft
.AfterEffect=ppAfterEffectDim
.DimColor.RGB=RGB(100,120,100)
.AnimateTextInReverse=True
EndWith
EndWith
![Page 146: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/146.jpg)
ApplicationObjectApplication Multipleobjects
RepresentstheentireMicrosoftPowerPointapplication.TheApplicationobjectcontains:
Application-widesettingsandoptions(thenameoftheactiveprinter,forexample).Propertiesthatreturntop-levelobjects,suchasActivePresentation,Windows,andsoon.
![Page 147: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/147.jpg)
UsingtheApplicationObject
UsetheApplicationpropertytoreturntheApplicationobject.Thefollowingexamplereturnsthepathtotheapplicationfile.
DimMyPathAsString
MyPath=Application.Path
ThefollowingexamplecreatesaPowerPointApplicationobjectinanotherapplication,startsPowerPoint(ifit'snotalreadyrunning),andopensanexistingpresentationnamed"Ex_a2a.ppt."
Setppt=NewPowerpoint.Application
ppt.Visible=True
ppt.Presentations.Open"c:\MyDocuments\ex_a2a.ppt"
![Page 148: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/148.jpg)
Remarks
WhenyouarewritingcodethatwillrunfromPowerPoint,thefollowingpropertiesoftheApplicationobjectcanbeusedwithouttheobjectqualifier:ActivePresentation,ActiveWindow,AddIns,Assistant,CommandBars,Presentations,SlideShowWindows,Windows.Forexample,insteadofwritingApplication.ActiveWindow.Height=200,youcanwriteActiveWindow.Height=200.
![Page 149: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/149.jpg)
AutoCorrectObjectApplication AutoCorrect
RepresentstheAutoCorrectfunctionalityinMicrosoftPowerPoint.
![Page 150: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/150.jpg)
UsingtheAutoCorrectobject
UsetheAutoCorrectpropertytoreturnanAutoCorrectobject.ThefollowingexampledisablesdisplayingtheAutoCorrectoptionsbuttons.
SubHideAutoCorrectOpButton()
WithApplication.AutoCorrect
.DisplayAutoCorrectOptions=msoFalse
.DisplayAutoLayoutOptions=msoFalse
EndWith
EndSub
![Page 151: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/151.jpg)
BulletFormatObjectParagraphFormat BulletFormat
Font
Representsbulletformatting.
![Page 152: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/152.jpg)
UsingtheBulletFormatObject
UsetheBulletpropertytoreturntheBulletFormatobject.Thefollowingexamplesetsthebulletsizeandcolorfortheparagraphsinshapetwoonslideoneintheactivepresentation.
WithActivePresentation.Slides(1).Shapes(2)
With.TextFrame.TextRange.ParagraphFormat.Bullet
.Visible=True
.RelativeSize=1.25
.Character=169
With.Font
.Color.RGB=RGB(255,255,0)
.Name="Symbol"
EndWith
EndWith
EndWith
![Page 153: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/153.jpg)
CalloutFormatObjectMultipleobjects CalloutFormat
Containspropertiesandmethodsthatapplytolinecallouts.
![Page 154: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/154.jpg)
UsingtheCalloutFormatObject
UsetheCalloutpropertytoreturnaCalloutFormatobject.Thefollowingexamplespecifiesthefollowingattributesofshapethree(alinecallout)onmyDocument:
Thecalloutwillhaveaverticalaccentbarthatseparatesthetextfromthecalloutline.Theanglebetweenthecalloutlineandthesideofthecallouttextboxwillbe30degrees.Therewillbenoborderaroundthecallouttext.Thecalloutlinewillbeattachedtothetopofthecallouttextbox.Thecalloutlinewillcontaintwosegments.
Forthisexampletowork,shapethreemustbeacallout.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Callout
.Accent=True
.Angle=msoCalloutAngle30
.Border=False
.PresetDropmsoCalloutDropTop
.Type=msoCalloutThree
EndWith
![Page 155: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/155.jpg)
CellObjectCellRange Cell
Multipleobjects
Representsatablecell.TheCellobjectisamemberoftheCellRangecollection.TheCellRangecollectionrepresentsallthecellsinthespecifiedcolumnorrow.TousetheCellRangecollection,usetheCellskeyword.
![Page 156: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/156.jpg)
UsingtheCellObject
UseCell(row,column),whererowistherownumberandcolumnisthecolumnnumber,orCells(index),whereindexisthenumberofthecellinthespecifiedroworcolumn,toreturnasingleCellobject.Cellsarenumberedfromlefttorightinrowsandfromtoptobottomincolumns.Withright-to-leftlanguagesettings,thisschemeisreversed.Thefollowingexamplemergesthefirsttwocellsinrowoneofthetableinshapefiveonslidetwo.
WithActivePresentation.Slides(2).Shapes(5).Table
.Cell(1,1).MergeMergeTo:=.Cell(1,2)
EndWith
Thisexamplesetsthebottomborderforcelloneinthefirstcolumnofthetabletoadashedlinestyle.
WithActivePresentation.Slides(2).Shapes(5).Table.Columns(1)_
.Cells(1)
.Borders(ppBorderBottom).DashStyle=msoLineDash
EndWith
UsetheShapepropertytoaccesstheShapeobjectandtomanipulatethecontentsofeachcell.Thisexampledeletesthetextinthefirstcell(row1,column1),insertsnewtext,andthensetsthewidthoftheentirecolumnto110points.
WithActivePresentation.Slides(2).Shapes(5).Table.Cell(1,1)
.Shape.TextFrame.TextRange.Delete
.Shape.TextFrame.TextRange.Text="Rooster"
.Parent.Columns(1).Width=110
EndWith
![Page 157: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/157.jpg)
Remarks
YoucannotprogrammaticallyaddcellstoordeletecellsfromaPowerPointtable.UsetheAddmethodoftheColumnsorRowscollectionstoaddacolumnorrowtoatable.UsetheDeletemethodoftheColumnsorRowscollectionstodeleteacolumnorrowfromatable.
![Page 158: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/158.jpg)
ColorEffectObjectAnimationBehavior ColorEffect
ColorFormat
Representsacoloreffectforananimationbehavior.
![Page 159: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/159.jpg)
UsingtheColorEffectobject
UsetheColorEffectpropertyoftheAnimationBehaviorobjecttoreturnaColorEffectobject.ColoreffectscanbechangedusingtheColorEffectobject'sFromandToproperties,asshownbelow.ColoreffectsareinitiallysetusingtheToproperty,andthencanbechangedbyaspecificnumberusingtheByproperty.Thefollowingexampleaddsashapetothefirstslideoftheactivepresentationandsetsacoloreffectanimationbehaviortochangethefillcolorofthenewshape.
SubChangeColorEffect()
DimsldFirstAsSlide
DimshpHeartAsShape
DimeffNewAsEffect
DimbhvEffectAsAnimationBehavior
SetsldFirst=ActivePresentation.Slides(1)
SetshpHeart=sldFirst.Shapes.AddShape(Type:=msoShapeHeart,_
Left:=100,Top:=100,Width:=100,Height:=100)
SeteffNew=sldFirst.TimeLine.MainSequence.AddEffect_
(Shape:=shpHeart,EffectID:=msoAnimEffectChangeFillColor,_
Trigger:=msoAnimTriggerAfterPrevious)
SetbhvEffect=effNew.Behaviors.Add(Type:=msoAnimTypeColor)
WithbhvEffect.ColorEffect
.From.RGB=RGB(Red:=255,Green:=0,Blue:=0)
.To.RGB=RGB(Red:=0,Green:=0,Blue:=255)
EndWith
EndSub
![Page 160: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/160.jpg)
ColorFormatObject
Multipleobjects ColorFormat
Representsthecolorofaone-colorobject,theforegroundorbackgroundcolorofanobjectwithagradientorpatternedfill,orthepointercolor.Youcansetcolorstoanexplicitred-green-bluevalue(byusingtheRGBproperty)ortoacolorinthecolorscheme(byusingtheSchemeColorproperty).
![Page 161: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/161.jpg)
UsingtheColorFormatObject
UseoneofthepropertieslistedinthefollowingtabletoreturnaColorFormatobject.
Usethisproperty Withthisobject
ToreturnaColorFormatobjectthatrepresentsthis
DimColor AnimationSettings Colorusedfordimmedobjects
BackColor FillFormat Backgroundfillcolor(usedinashadedorpatternedfill)
ForeColor FillFormat Foregroundfillcolor(orsimplythefillcolorforasolidfill)
Color Font Bulletorcharactercolor
BackColor LineFormat Backgroundlinecolor(usedinapatternedline)
ForeColor LineFormat Foregroundlinecolor(orjustthelinecolorforasolidline)
ForeColor ShadowFormat ShadowcolorPointerColor SlideShowSettings Defaultpointercolorforapresentation
PointerColor SlideShowView Temporarypointercolorforaviewofaslideshow
ExtrusionColor ThreeDFormat Colorofthesidesofanextrudedobject
UsetheSchemeColorpropertytosetthecolorofaslideelementtooneofthecolorsinthestandardcolorscheme.Thefollowingexamplesetsthetextcolorforshapeoneonslidetwointheactivepresentationtothestandardcolor-schemetitlecolor.
ActivePresentation.Slides(2).Shapes(1).TextFrame_
.TextRange.Font.Color.SchemeColor=ppTitle
UsetheRGBpropertytosetacolortoanexplicitred-green-bluevalue.ThefollowingexampleaddsarectangletomyDocumentandthensetstheforegroundcolor,backgroundcolor,andgradientfortherectangle'sfill.
![Page 162: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/162.jpg)
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(msoShapeRectangle,90,90,90,50).Fill
.ForeColor.RGB=RGB(128,0,0)
.BackColor.RGB=RGB(170,170,170)
.TwoColorGradientmsoGradientHorizontal,1
EndWith
![Page 163: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/163.jpg)
ColorSchemeObjectMultipleobjects ColorScheme
Representsacolorscheme,whichisasetofeightcolorsusedforthedifferentelementsofaslide,notespage,orhandout,suchasthetitleorbackground.(Notethatthecolorschemesforslides,notespages,andhandoutsinapresentationcanbesetindependently.)EachcolorisrepresentedbyanRGBColorobject.TheColorSchemeobjectisamemberoftheColorSchemescollection.TheColorSchemescollectioncontainsallthecolorschemesinapresentation.
![Page 164: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/164.jpg)
UsingtheColorSchemeObject
Thissectiondescribeshowtodothefollowing:
ReturnaColorSchemeobjectfromthecollectionofallthecolorschemesinthepresentationReturntheColorSchemeobjectattachedtoaspecificslideormasterReturnthecolorofasingleslideelementfromaColorSchemeobject
![Page 165: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/165.jpg)
ReturningaColorSchemeobjectfromthecollectionofallthecolorschemesinthepresentation
UseColorSchemes(index),whereindexisthecolorschemeindexnumber,toreturnasingleColorSchemeobject.Thefollowingexampledeletescolorschemetwofromtheactivepresentation.
ActivePresentation.ColorSchemes(2).Delete
![Page 166: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/166.jpg)
ReturningtheColorSchemeobjectattachedtoaspecificslideormaster
SettheColorSchemepropertyofaSlide,SlideRange,orMasterobjecttoreturnthecolorschemeforoneslide,asetofslides,oramaster,respectively.Thefollowingexamplecreatesacolorschemebasedonthecurrentslide,addsthenewcolorschemetothecollectionofstandardcolorschemesforthepresentation,andsetsthecolorschemefortheslidemastertothenewcolorscheme.Allnewslidesbasedonthemasterwillhavethiscolorscheme.
SetnewScheme=ActiveWindow.View.Slide.ColorScheme
newScheme.Colors(ppTitle).RGB=RGB(0,150,250)
SetnewStandardScheme=_
ActivePresentation.ColorSchemes.Add(newScheme)
ActivePresentation.SlideMaster.ColorScheme=newStandardScheme
![Page 167: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/167.jpg)
ReturningthecolorofasingleslideelementfromaColorSchemeobject
UsetheColorsmethodtoreturnanRGBColorobjectthatrepresentsthecolorofasingleslide-elementtype.YoucansetanRGBColorobjecttoanotherRGBColorobject,oryoucanusetheRGBpropertytosetorreturntheexplicitred-green-blue(RGB)valueforanRGBColorobject.Thefollowingexamplesetsthebackgroundcolorincolorschemeonetoredandsetsthetitlecolortothetitlecolorthat'sdefinedforcolorschemetwo.
WithActivePresentation.ColorSchemes
.Item(1).Colors(ppBackground).RGB=RGB(255,0,0)
.Item(1).Colors(ppTitle)=.Item(2).Colors(ppTitle)
EndWith
![Page 168: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/168.jpg)
ColumnObjectColumns Column
CellRange
Representsatablecolumn.TheColumnobjectisamemberoftheColumnscollection.TheColumnscollectionincludesallthecolumnsinatable.
![Page 169: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/169.jpg)
UsingtheColumnObject
UseColumns(index)toreturnasingleColumnobject.IndexrepresentsthepositionofthecolumnintheColumnscollection(usuallycountingfromlefttoright;althoughtheTableDirectionpropertycanreversethis).Thisexampleselectsthefirstcolumnofthetableinshapefiveonthesecondslide.
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Select
UsetheCellobjecttoindirectlyreferencetheColumnobject.Thisexampledeletesthetextinthefirstcell(row1,column1),insertsnewtext,andthensetsthewidthoftheentirecolumnto110points.
WithActivePresentation.Slides(2).Shapes(5).Table.Cell(1,1)
.Shape.TextFrame.TextRange.Delete
.Shape.TextFrame.TextRange.Text="Rooster"
.Parent.Columns(1).Width=110
EndWith
UsetheAddmethodtoaddacolumntoatable.Thisexamplecreatesacolumninanexistingtableandsetsthecolumnwidthto72points(oneinch).
WithActivePresentation.Slides(2).Shapes(5).Table
.Columns.Add.Width=72
EndWith
![Page 170: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/170.jpg)
Remarks
UsetheCellspropertytomodifytheindividualcellsinaColumnobject.Thisexampleselectsthefirstcolumninthetableandappliesadashedlinestyletothebottomborder.
ActiveWindow.Selection.ShapeRange.Table.Columns(1)_
.Cells.Borders(ppBorderBottom).DashStyle=msoLineDash
![Page 171: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/171.jpg)
CommandEffectObjectAnimationBehavior CommandEffect
Representsacommandeffectforananimationbehavior.Youcansendevents,callfunctions,andsendOLEverbstoembeddedobjectsusingthisobject.
![Page 172: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/172.jpg)
UsingtheCommandEffectObject
UsetheCommandEffectpropertyoftheAnimationBehaviorobjecttoreturnaCommandEffectobject.CommandeffectscanbechangedusingtheCommandEffectobject'sCommandandTypeproperties.
![Page 173: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/173.jpg)
Example
Thefollowingexampleshowshowtosetacommandeffectanimationbehavior.
SetbhvEffect=effectNew.Behaviors.Add(msoAnimTypeCommand)
WithbhvEffect.CommandEffect
.Type=msoAnimCommandTypeVerb
.Command=Play
EndWith
![Page 174: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/174.jpg)
CommentObject
Comments Comment
Representsacommentonagivenslideorsliderange.TheCommentobjectisamemberoftheCommentscollectionobject.
![Page 175: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/175.jpg)
UsingtheCommentobject
UseComments(index),whereindexisthenumberofthecomment,ortheItemmethodtoaccessasinglecommentonaslide.Thisexampledisplaystheauthorofthefirstcommentonthefirstslide.Iftherearenocomments,itdisplaysamessagestatingsuch.
SubShowComment()
WithActivePresentation.Slides(1).Comments
If.Count>0Then
MsgBox"Thefirstcommentonthisslideisby"&_
.Item(1).Author
Else
MsgBox"Therearenocommentsonthisslide."
EndIf
EndWith
EndSub
Usethefollowingpropertiestoaccesscommentdata:
Author Theauthor'sfullnameAuthorIndex Theauthor'sindexinthelistofcommentsAuthorInitials Theauthor'sinitialsDateTime ThedateandtimethecommentwascreatedText ThetextofthecommentLeft,Top Thecomment'sscreencoordinates
Thisexampledisplaysamessagecontainingtheauthor,dateandtime,andcontentsofallthemessagesonthefirstslide.
SubSlideComments()
DimcmtExistingAsComment
DimcmtAllAsComments
DimstrCommentsAsString
SetcmtAll=ActivePresentation.Slides(1).Comments
IfcmtAll.Count>0Then
ForEachcmtExistingIncmtAll
strComments=strComments&cmtExisting.Author&vbTab&_
![Page 176: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/176.jpg)
cmtExisting.DateTime&vbTab&cmtExisting.Text&vbLf
Next
MsgBox"Thecommentsinyourdocumentareasfollows:"&vbLf_
&strComments
Else
MsgBox"Thisslidedoesn'thaveanycomments."
EndIf
EndSub
![Page 177: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/177.jpg)
ConnectorFormatObject
Multipleobjects ConnectorFormatShape
Containspropertiesandmethodsthatapplytoconnectors.Aconnectorisalinethatattachestwoothershapesatpointscalledconnectionsites.Ifyourearrangeshapesthatareconnected,thegeometryoftheconnectorwillbeautomaticallyadjustedsothattheshapesremainconnected.
![Page 178: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/178.jpg)
UsingtheConnectorFormatObject
UsetheConnectorFormatpropertytoreturnaConnectorFormatobject.UsetheBeginConnectandEndConnectmethodstoattachtheendsoftheconnectortoothershapesinthedocument.UsetheRerouteConnectionsmethodtoautomaticallyfindtheshortestpathbetweenthetwoshapesconnectedbytheconnector.UsetheConnectorpropertytoseewhetherashapeisaconnector.
NotethatyouassignasizeandapositionwhenyouaddaconnectortotheShapescollection,butthesizeandpositionareautomaticallyadjustedwhenyouattachthebeginningandendoftheconnectortoothershapesinthecollection.Therefore,ifyouintendtoattachaconnectortoothershapes,theinitialsizeandpositionyouspecifyareirrelevant.Likewise,youspecifywhichconnectionsitesonashapetoattachtheconnectortowhenyouattachtheconnector,butusingtheRerouteConnectionsmethodaftertheconnectorisattachedmaychangewhichconnectionsitestheconnectorattachesto,makingyouroriginalchoiceofconnectionsitesirrelevant.
ThefollowingexampleaddstworectanglestomyDocumentandconnectsthemwithacurvedconnector.
SetmyDocument=ActivePresentation.Slides(1)
Sets=myDocument.Shapes
SetfirstRect=s.AddShape(msoShapeRectangle,100,50,200,100)
SetsecondRect=s.AddShape(msoShapeRectangle,300,300,200,100)
Withs.AddConnector(msoConnectorCurve,0,0,0,0).ConnectorFormat
.BeginConnectConnectedShape:=firstRect,ConnectionSite:=1
.EndConnectConnectedShape:=secondRect,ConnectionSite:=1
.Parent.RerouteConnections
EndWith
![Page 179: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/179.jpg)
Remarks
Connectionsitesaregenerallynumberedaccordingtotherulespresentedinthefollowingtable.
Shapetype ConnectionsitenumberingschemeAutoShapes,WordArt,pictures,andOLEobjects
Theconnectionsitesarenumberedstartingatthetopandproceedingcounterclockwise.
Freeforms Theconnectionsitesarethevertices,andtheycorrespondtothevertexnumbers.
Tofigureoutwhichnumbercorrespondstowhichconnectionsiteonacomplexshape,youcanexperimentwiththeshapewhilethemacrorecorderisturnedonandthenexaminetherecordedcode;oryoucancreateashape,selectit,andthenrunthefollowingexample.Thiscodewillnumbereachconnectionsiteandattachaconnectortoit.
Setmainshape=ActiveWindow.Selection.ShapeRange(1)
Withmainshape
bx=.Left+.Width+50
by=.Top+.Height+50
EndWith
WithActiveWindow.View.Slide
Forj=1Tomainshape.ConnectionSiteCount
With.Shapes.AddConnector(msoConnectorStraight,_
bx,by,bx+50,by+50)
.ConnectorFormat.EndConnectmainshape,j
.ConnectorFormat.Type=msoConnectorElbow
.Line.ForeColor.RGB=RGB(255,0,0)
l=.Left
t=.Top
EndWith
With.Shapes.AddTextbox(msoTextOrientationHorizontal,_
l,t,36,14)
.Fill.Visible=False
.Line.Visible=False
.TextFrame.TextRange.Text=j
EndWith
Nextj
EndWith
![Page 180: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/180.jpg)
![Page 181: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/181.jpg)
DefaultWebOptionsObjectApplication DefaultWebOptions
Containsglobalapplication-levelattributesusedbyMicrosoftPowerPointwhenyoupublishorsaveacompleteorpartialpresentationasaWebpageorwhenyouopenaWebpage.Youcanreturnorsetattributeseitherattheapplication(global)leveloratthepresentationlevel.(Notethatattributevaluescanbedifferentfromonepresentationtoanother,dependingontheattributevalueatthetimethepresentationwassaved.)Presentation-levelattributesettingsoverrideapplication-levelattributesettings.Presentation-levelattributesarecontainedintheWebOptionsobject.
![Page 182: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/182.jpg)
UsingtheDefaultWebOptionsObject
UsetheDefaultWebOptionspropertytoreturntheDefaultWebOptionsobject.ThefollowingexamplecheckstoseewhetherPNG(PortableNetworkGraphics)areallowedasanimageformat,andthensetsthestrImageFileTypevariableaccordingly.
SetobjAppWebOptions=Application.DefaultWebOptions
WithobjAppWebOptions
If.AllowPNG=TrueThen
strImageFileType="PNG"
Else
strImageFileType="JPG"
EndIf
EndWith
![Page 183: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/183.jpg)
DesignObjectMultipleobjects Design
Representsanindividualslidedesigntemplate.TheDesignobjectisamemberoftheDesignsandSlideRangecollectionsandtheMasterandSlideobjects.
![Page 184: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/184.jpg)
UsingtheDesignobject
UsetheDesignpropertyoftheMaster,Slide,orSlideRangeobjectstoaccessaDesignobject,forexample:
ActivePresentation.SlideMaster.Design
ActivePresentation.Slides(1).Design
ActivePresentation.Slides.Range.Design
UsetheAdd,Item,Clone,orLoadmethodsoftheDesignscollectiontoadd,referto,clone,orloadaDesignobject,respectively.Forexample,toaddadesigntemplate,useActivePresentation.Designs.AdddesignName:="MyDesign"
TheDesignobject'sAddTitleMastermethodandHasTitleMasterpropertycanbeusedtoaddand/orquerythestatusofatitleslidemaster.Forexample:
SubAddQueryTitleMaster(dsnAsDesign)
dsn.AddTitleMaster
MsgBoxdsn.HasTitleMaster
EndSub
![Page 185: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/185.jpg)
DiagramObjectMultipleobjects Diagram
DiagramNodes
Representsasinglediagraminadocument.TheDiagramobjectisamemberoftheDiagramNodeandShapeobjectsandtheShapeRangecollection.
![Page 186: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/186.jpg)
UsingtheDiagramobject
UsetheDiagrampropertyoftheShapeobjectorShapeRangecollectiontoreturnaDiagramobject.
UsetheConvertmethodtochangeadiagramfromonetypetoanother.Thisexampleconvertsthefirstdiagramonthefirstslideoftheactivepresentationintoaradialdiagram.Thisexampleassumesthatthefirstshapeintheactivepresentationisadiagramandnotanothertypeofshape.
SubDiagramConvert()
ActivePresentation.Slides(1).Shapes(1).Diagram_
.ConvertType:=msoDiagramRadial
EndSub
UsetheReversepropertytofliptheorderofthenodesinadiagram,sothatthefirstnodebecomesthelastnode,andviceversa.Thisexamplereversestheorderofthediagramnodesforthesecondshapeonthefirstslideoftheactivepresentation.Thisassumesthatthesecondshapeintheactivepresentationisadiagramandnotanothertypeofshape.
SubDiagramReverse()
ActivePresentation.Slides(1).Shapes(2).Diagram.Reverse=msoTrue
EndSub
ADiagramNodeobjectcanhaveanestedDiagramobject.UsetheDiagrampropertyofaDiagramNodeobjecttoreturnthenestedDiagramobject.
![Page 187: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/187.jpg)
DiagramNodeObjectMultipleobjects DiagramNode
Multipleobjects
Representsanodeinadiagram.
![Page 188: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/188.jpg)
UsingtheDiagramNodeobject
ToreturnaDiagramNodeobject,useoneofthefollowing:
TheDiagramNodeobject'sAddNode,CloneNode,NextNodeorPrevNodemethods,orRootproperty.TheDiagramNodeChildrencollection'sAddNodeorItemmethods,orFirstChildorLastChildproperties.
TheDiagramNodescollection'sItemmethod.TheShapeobject'sorShapeRangecollection'sDiagramNodeproperty.
Adiagramnodecanterminate,orcontainotherchilddiagrams,childdiagramnodes,orchildshapes:
Torefertoachilddiagram,usetheDiagramproperty.Torefertoanindividualchilddiagramnode,usetheAddNode,CloneNode,NextNodeorPrevNodemethods,orRootproperty.Torefertoacollectionofchilddiagramnodes,usetheChildrenproperty.Torefertoashape,usetheShapeorTextShapeproperties.
UsetheAddNodemethodtoaddanodetoadiagramortoadiagramnode.Thisexampleassumesthethirdshapeintheactivepresentationisadiagramandaddsanodetoit.
SubAddDiagramNode()
ActivePresentation.Shapes(3).DiagramNode.Children.AddNode
EndSub
UsetheDeletemethodtoremoveanodefromadiagramordiagramnode.Thisexampleassumesthesecondshapeinthepresentationisadiagramandremovesthefirstnodefromit.
SubDeleteDiagramNode()
ActivePresentation.Shapes(2).DiagramNode.Children(1).Delete
EndSub
![Page 189: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/189.jpg)
![Page 190: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/190.jpg)
DiagramNodeChildrenCollectionDiagramNode DiagramNodeChildren
DiagramNode
AcollectionofDiagramNodeobjectsthatrepresentschildnodesinadiagram.
![Page 191: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/191.jpg)
UsingtheDiagramNodeChildrencollection
UsetheChildrenpropertyoftheDiagramNodeobjecttoreturnaDiagamNodeChildrencollection.Toaddanindividualchilddiagramnodetothecollection,usetheAddNodemethod.Toreturnindividualchilddiagramnodesinthecollection,usetheFirstChildorLastChildpropertiesortheItemmethod.
Thisexampledeletesthefirstchildofthesecondnodeinthefirstdiagraminthedocument.Thisexampleassumesthatthefirstshapeintheactivedocumentisadiagramwithatleasttwonodes,onewithchildnodes.
SubDiagramNodeChild()
ActiveDocument.Shapes(1).Diagram.Nodes.Item(2)_
.Children.FirstChild.Delete
EndSub
![Page 192: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/192.jpg)
DocumentWindowObjectMultipleobjects DocumentWindows
DocumentWindowMultipleobjects
Representsadocumentwindow.TheDocumentWindowobjectisamemberoftheDocumentWindowscollection.TheDocumentWindowscollectioncontainsalltheopendocumentwindows.
![Page 193: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/193.jpg)
UsingtheDocumentWindowObject
UseWindows(index),whereindexisthedocumentwindowindexnumber,toreturnasingleDocumentWindowobject.Thefollowingexampleactivatesdocumentwindowtwo.
Windows(2).Activate
ThefirstmemberoftheDocumentWindowscollection,Windows(1),alwaysreturnstheactivedocumentwindow.Alternatively,youcanusetheActiveWindowpropertytoreturntheactivedocumentwindow.Thefollowingexamplemaximizestheactivewindow.
ActiveWindow.WindowState=ppWindowMaximized
UsePanes(index),whereindexisthepaneindexnumber,tomanipulatepaneswithinnormal,slide,outline,ornotespageviewsofthedocumentwindow.Thefollowingexampleactivatespanethree,whichisthenotespane.
ActiveWindow.Panes(3).Activate
UsetheActivePanepropertytoreturntheactivepanewithinthedocumentwindow.Thefollowingexamplecheckstoseeiftheactivepaneistheoutlinepane.Ifnot,itactivatestheoutlinepane.
mypane=ActiveWindow.ActivePane.ViewType
Ifmypane<>1Then
ActiveWindow.Panes(1).Activate
EndIf
UsethePresentationpropertytoreturnthepresentationthat'scurrentlyrunninginthespecifieddocumentwindow.
UsetheSelectionpropertytoreturntheselection.
UsetheSplitHorizontalpropertytoreturnthepercentageofthescreenwidththattheoutlinepaneoccupiesinnormalview.
![Page 194: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/194.jpg)
UsetheSplitVerticalpropertytoreturnthepercentageofthescreenheightthattheslidepaneoccupiesinnormalview.
UsetheViewpropertytoreturntheviewinthespecifieddocumentwindow.
![Page 195: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/195.jpg)
EffectObjectSequence Effect
Multipleobjects
Representstiminginformationaboutaslideanimation.
![Page 196: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/196.jpg)
UsingtheEffectobject
UsetheAddEffectmethodtoaddaneffect.Thisexampleaddsashapetothefirstslideintheactivepresentationandaddsaneffectandabehaviortotheshape.
SubNewShapeAndEffect()
DimshpStarAsShape
DimsldOneAsSlide
DimeffNewAsEffect
SetsldOne=ActivePresentation.Slides(1)
SetshpStar=sldOne.Shapes.AddShape(Type:=msoShape5pointStar,_
Left:=150,Top:=72,Width:=400,Height:=400)
SeteffNew=sldOne.TimeLine.MainSequence.AddEffect(Shape:=shpStar,_
EffectId:=msoAnimEffectStretchy,Trigger:=msoAnimTriggerAfterPrevious)
WitheffNew
With.Behaviors.Add(msoAnimTypeScale).ScaleEffect
.FromX=75
.FromY=75
.ToX=0
.ToY=0
EndWith
.Timing.AutoReverse=msoTrue
EndWith
EndSub
TorefertoanexistingEffectobject,useMainSequence(index),whereindexisthenumberoftheEffectobjectintheSequencecollection.Thisexamplechangestheeffectforthefirstsequenceandspecifiesthebehaviorforthateffect.
SubChangeEffect()
WithActivePresentation.Slides(1).TimeLine_
.MainSequence(1)
.EffectType=msoAnimEffectSpin
With.Behaviors(1).RotationEffect
.From=100
.To=360
.By=5
EndWith
EndWith
EndSub
![Page 197: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/197.jpg)
ThereisalwaysatleastoneEffectobjectineachslideregardlessofwhethertheslidehasanimationsornot.
![Page 198: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/198.jpg)
EffectInformationObjectEffect EffectInformation
Multipleobjects
RepresentsvariousanimationoptionsforanEffectobject.
![Page 199: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/199.jpg)
UsingtheEffectInformationobject
UsethemembersoftheEffectInformationobjecttoreturnthecurrentstateofanEffectobject,suchastheaftereffect,whetherthebackgroundanimatesalongwithitscorrespondingtext,whethertextanimatesinreverse,playsettings,soundeffects,textbuildingbehavior,andsoon.AllofthemembersoftheEffectInformationobjectareread-only.Tochangeanyeffectinformationproperties,youmustusethemethodsofthecorrespondingSequenceobject.
UsetheEffectInformationpropertyoftheEffectobjecttoreturnanEffectInformationobject.ThefollowingexamplesetstheHideWhileNotPlayingpropertyfortheplaysettingsinthemainanimationsequence.
SubHideEffect()
ActiveWindow.Selection.SlideRange(1).TimeLine_
.MainSequence(1).EffectInformation.PlaySettings_
.HideWhileNotPlaying=msoTrue
EndSub
![Page 200: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/200.jpg)
EffectParametersObjectEffect EffectParameters
ColorFormat
RepresentsvariousanimationparametersforanEffectobject,suchascolors,fonts,sizes,anddirections.
![Page 201: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/201.jpg)
UsingtheEffectParametersobject
UsetheEffectParameterspropertyoftheEffectobjecttoreturnanEffectParametersobject.Thefollowingexamplecreatesashape,setsafilleffect,andchangesthestartingandendingfillcolors.
SubeffParam()
DimshpNewAsShape
DimeffNewAsEffect
SetshpNew=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeHeart,Left:=100,_
Top:=100,Width:=150,Height:=150)
SeteffNew=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpNew,EffectID:=msoAnimEffectChangeFillColor,_
Trigger:=msoAnimTriggerAfterPrevious)
WitheffNew.EffectParameters
.Color1.RGB=RGB(Red:=0,Green:=0,Blue:=255)
.Color2.RGB=RGB(Red:=255,Green:=0,Blue:=0)
EndWith
EndSub
![Page 202: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/202.jpg)
ShowAll
![Page 203: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/203.jpg)
ExtraColorsObjectPresentation ExtraColors
Representstheextracolorsinapresentation.Theobjectcancontainuptoeightcolors,eachofwhichisrepresentedbyanred-green-blue(RGB)value.
![Page 204: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/204.jpg)
UsingtheExtraColorsObject
UsetheExtraColorspropertytoreturntheExtraColorsobject.UseExtraColors(index),whereindexistheextracolorindexnumber,toreturnthered-green-blue(RGB)valueforasingleextracolor.Thefollowingexampleaddsarectangletoslideoneintheactivepresentationandsetsitsfillforegroundcolortothefirstextracolor.Iftherehasn'tbeenatleastoneextracolordefinedforthepresentation,thisexamplewillfail.
WithActivePresentation
Setrect=.Slides(1).Shapes_
.AddShape(msoShapeRectangle,50,50,100,200)
rect.Fill.ForeColor.RGB=.ExtraColors(1)
EndWith
UsetheAddmethodtoaddanextracolor.Thefollowingexampleaddsanextracolortotheactivepresentation(ifthecolorhasn'talreadybeenadded).
ActivePresentation.ExtraColors.AddRGB(69,32,155)
![Page 205: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/205.jpg)
FillFormatObjectMultipleobjects FillFormat
ColorFormat
Representsfillformattingforashape.Ashapecanhaveasolid,gradient,texture,pattern,picture,orsemi-transparentfill.
![Page 206: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/206.jpg)
UsingtheFillFormatObject
UsetheFillpropertytoreturnaFillFormatobject.ThefollowingexampleaddsarectangletomyDocumentandthensetsthegradientandcolorfortherectangle'sfill.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes_
.AddShape(msoShapeRectangle,90,90,90,80).Fill
.ForeColor.RGB=RGB(0,128,128)
.OneColorGradientmsoGradientHorizontal,1,1
EndWith
![Page 207: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/207.jpg)
Remarks
ManyofthepropertiesoftheFillFormatobjectareread-only.Tosetoneoftheseproperties,youhavetoapplythecorrespondingmethod.
![Page 208: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/208.jpg)
FilterEffectObjectAnimationBehavior FilterEffect
Representsafiltereffectforananimationbehavior.
![Page 209: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/209.jpg)
UsingtheFilterEffectObject
UsetheFilterEffectpropertyoftheAnimationBehaviorobjecttoreturnaFilterEffectobject.FiltereffectscanbechangedusingtheFilterEffectobject'sReveal,SubType,andTypeproperties.
![Page 210: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/210.jpg)
Example
Thefollowingexampleaddsashapetothefirstslideoftheactivepresentationandsetsafiltereffectanimationbehavior.
SubChangeFilterEffect()
DimsldFirstAsSlide
DimshpHeartAsShape
DimeffNewAsEffect
DimbhvEffectAsAnimationBehavior
SetsldFirst=ActivePresentation.Slides(1)
SetshpHeart=sldFirst.Shapes.AddShape(Type:=msoShapeHeart,_
Left:=100,Top:=100,Width:=100,Height:=100)
SeteffNew=sldFirst.TimeLine.MainSequence.AddEffect_
(Shape:=shpHeart,EffectID:=msoAnimEffectChangeFillColor,_
Trigger:=msoAnimTriggerAfterPrevious)
SetbhvEffect=effNew.Behaviors.Add(msoAnimTypeFilter)
WithbhvEffect.FilterEffect
.Type=msoAnimFilterEffectTypeWipe
.Subtype=msoAnimFilterEffectSubtypeUp
.Reveal=msoTrue
EndWith
EndSub
![Page 211: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/211.jpg)
FontObjectMultipleobjects Font
ColorFormat
Representscharacterformattingfortextorabullet.TheFontobjectisamemberoftheFontscollection.TheFontscollectioncontainsallthefontsusedinapresentation.
![Page 212: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/212.jpg)
UsingtheFontObject
Thissectiondescribeshowtodothefollowing:
ReturntheFontobjectthatrepresentsthefontattributesofaspecifiedbullet,aspecifiedrangeoftext,oralltextataspecifiedoutlinelevelReturnaFontobjectfromthecollectionofallthefontsusedinthepresentation
![Page 213: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/213.jpg)
ReturningtheFontobjectthatrepresentsthefontattributesofaspecifiedbullet,aspecifiedrangeoftext,oralltextataspecifiedoutlinelevel
UsetheFontpropertytoreturntheFontobjectthatrepresentsthefontattributesforaspecificbullet,textrange,oroutlinelevel.Thefollowingexamplesetsthetitletextonslideoneandsetsthefontproperties.
WithActivePresentation.Slides(1).Shapes.Title_
.TextFrame.TextRange
.Text="VolcanoCoffee"
With.Font
.Italic=True
.Name="Palatino"
.Color.RGB=RGB(0,0,255)
EndWith
EndWith
![Page 214: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/214.jpg)
ReturningaFontobjectfromthecollectionofallthefontsusedinthepresentation
UseFonts(index),whereindexisthefont'snameorindexnumber,toreturnasingleFontobject.Thefollowingexamplecheckstoseewhetherfontoneintheactivepresentationisembeddedinthepresentation.
IfActivePresentation.Fonts(1).Embedded=_
TrueThenMsgBox"Font1isembedded"
![Page 215: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/215.jpg)
FreeformBuilderObjectFreeformBuilder
Representsthegeometryofafreeformwhileit'sbeingbuilt.
![Page 216: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/216.jpg)
UsingtheFreeformBuilderObject
UsetheBuildFreeformmethodtoreturnaFreeformBuilderobject.UsetheAddNodesmethodtoaddnodestothefreefrom.UsetheConvertToShapemethodtocreatetheshapedefinedintheFreeformBuilderobjectandaddittotheShapescollection.ThefollowingexampleaddsafreeformwithfoursegmentstomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.BuildFreeform(msoEditingCorner,360,200)
.AddNodesmsoSegmentCurve,msoEditingCorner,_
380,230,400,250,450,300
.AddNodesmsoSegmentCurve,msoEditingAuto,480,200
.AddNodesmsoSegmentLine,msoEditingAuto,480,400
.AddNodesmsoSegmentLine,msoEditingAuto,360,200
.ConvertToShape
EndWith
![Page 217: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/217.jpg)
GroupShapesCollectionObjectMultipleobjects GroupShapes
Representstheindividualshapeswithinagroupedshape.EachshapeisrepresentedbyaShapeobject.UsingtheItemmethodwiththisobject,youcanworkwithsingleshapeswithinagroupwithouthavingtoungroupthem.
![Page 218: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/218.jpg)
UsingTheGroupshapesCollection
UsetheGroupItemspropertytoreturntheGroupShapescollection.UseGroupItems(index),whereindexisthenumberoftheindividualshapewithinthegroupedshape,toreturnasingleshapefromtheGroupShapescollection.ThefollowingexampleaddsthreetrianglestomyDocument,groupsthem,setsacolorfortheentiregroup,andthenchangesthecolorforthesecondtriangleonly.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
.AddShape(msoShapeIsoscelesTriangle,10,_
10,100,100).Name="shpOne"
.AddShape(msoShapeIsoscelesTriangle,150,_
10,100,100).Name="shpTwo"
.AddShape(msoShapeIsoscelesTriangle,300,_
10,100,100).Name="shpThree"
With.Range(Array("shpOne","shpTwo","shpThree")).Group
.Fill.PresetTexturedmsoTextureBlueTissuePaper
.GroupItems(2).Fill.PresetTexturedmsoTextureGreenMarble
EndWith
EndWith
![Page 219: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/219.jpg)
HeaderFooterObject
HeadersFooters HeaderFooter
Representsaheader,footer,dateandtime,slidenumber,orpagenumberonaslideormaster.AlltheHeaderFooterobjectsforaslideormasterarecontainedinaHeadersFootersobject.
![Page 220: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/220.jpg)
UsingtheHeaderFooterObject
UseoneofthepropertieslistedinthefollowingtabletoreturntheHeaderFooterobject.
Usethisproperty Toreturn
DateAndTimeAHeaderFooterobjectthatrepresentsthedateandtimeontheslide.Footer AHeaderFooterobjectthatrepresentsthefooterfortheslide.
Header AHeaderFooterobjectthatrepresentstheheaderfortheslide.Thisworksonlyfornotespagesandhandouts,notforslides.
SlideNumber AHeaderFooterobjectthatrepresenttheslidenumber(onaslide)orpagenumber(onanotespageorahandout).
NoteHeaderFooterobjectsaren'tavailableforSlideobjectsthatrepresentnotespages.TheHeaderFooterobjectthatrepresentsaheaderisavailableonlyforanotesmasterorhandoutmaster.
YoucansetpropertiesofHeaderFooterobjectsforsingleslides.Thefollowingexamplesetsthefootertextforslideoneintheactivepresentation.
ActivePresentation.Slides(1).HeadersFooters.Footer_
.Text="VolcanoCoffee"
YoucanalsosetpropertiesofHeaderFooterobjectsfortheslidemaster,titlemaster,notesmaster,orhandoutmastertoaffectallslides,titleslides,notespages,orhandoutsandoutlinesatthesametime.Thefollowingexamplesetsthetextforthefooterintheslidemasterfortheactivepresentation,setstheformatforthedateandtime,andturnsonthedisplayofslidenumbers.Thesesettingswillapplytoallslidesthatarebasedonthismasterthatdisplaymastergraphicsandthathavenothadtheirfooteranddateandtimesetindividually.
SetmySlidesHF=ActivePresentation.SlideMaster.HeadersFooters
WithmySlidesHF
.Footer.Visible=True
![Page 221: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/221.jpg)
.Footer.Text="RegionalSales"
.SlideNumber.Visible=True
.DateAndTime.Visible=True
.DateAndTime.UseFormat=True
.DateAndTime.Format=ppDateTimeMdyy
EndWith
Toclearheaderandfooterinformationthathasbeensetforindividualslidesandmakesureallslidesdisplaytheheaderandinformationyoudefinefortheslidemaster,runthefollowingcodebeforerunningthepreviousexample.
ForEachsInActivePresentation.Slides
s.DisplayMasterShapes=True
s.HeadersFooters.Clear
Next
![Page 222: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/222.jpg)
LineFormatObjectMultipleobjects LineFormat
ColorFormat
Representslineandarrowheadformatting.Foraline,theLineFormatobjectcontainsformattinginformationforthelineitself;forashapewithaborder,thisobjectcontainsformattinginformationfortheshape'sborder.
![Page 223: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/223.jpg)
UsingtheLineFormatObject
UsetheLinepropertytoreturnaLineFormatobject.Thefollowingexampleaddsablue,dashedlinetomyDocument.There'sashort,narrowovalattheline'sstartingpointandalong,widetriangleatitsendpoint.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(100,100,200,300).Line
.DashStyle=msoLineDashDotDot
.ForeColor.RGB=RGB(50,0,128)
.BeginArrowheadLength=msoArrowheadShort
.BeginArrowheadStyle=msoArrowheadOval
.BeginArrowheadWidth=msoArrowheadNarrow
.EndArrowheadLength=msoArrowheadLong
.EndArrowheadStyle=msoArrowheadTriangle
.EndArrowheadWidth=msoArrowheadWide
EndWith
![Page 224: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/224.jpg)
LinkFormatObjectMultipleobjects LinkFormat
ContainspropertiesandmethodsthatapplytolinkedOLEobjects.TheOLEFormatobjectcontainspropertiesandmethodsthatapplytoOLEobjectswhetherornotthey'relinked.ThePictureFormatobjectcontainspropertiesandmethodsthatapplytopicturesandOLEobjects.
![Page 225: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/225.jpg)
UsingtheLinkFormatObject
UsetheLinkFormatpropertytoreturnaLinkFormatobject.ThefollowingexampleloopsthroughalltheshapesonalltheslidesintheactivepresentationandsetsalllinkedMicrosoftExcelworksheetstobeupdatedmanually.
ForEachsldInActivePresentation.Slides
ForEachshInsld.Shapes
Ifsh.Type=msoLinkedOLEObjectThen
Ifsh.OLEFormat.ProgID="Excel.Sheet"Then
sh.LinkFormat.AutoUpdate=ppUpdateOptionManual
EndIf
EndIf
Next
Next
![Page 226: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/226.jpg)
MasterObjectMaster Multipleobjects
Representsaslidemaster,titlemaster,handoutmaster,notesmaster,ordesignmaster.
![Page 227: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/227.jpg)
UsingtheMasterObject
ToreturnaMasterobject,usetheMasterpropertyoftheSlideobjectorSlideRangecollection,orusetheHandoutMaster,NotesMaster,SlideMaster,orTitleMasterpropertyofthePresentationobject.NotethatsomeofthesepropertiesarealsoavailablefromtheDesignobjectaswell.Thefollowingexamplesetsthebackgroundfillfortheslidemasterfortheactivepresentation.
ActivePresentation.SlideMaster.Background.Fill_
.PresetGradientmsoGradientHorizontal,1,msoGradientBrass
ToaddatitlemasterordesigntoapresentationandreturnaMasterobjectthatrepresentsthenewtitlemasterordesign,usetheAddTitleMastermethod.Thefollowingexampleaddsatitlemastertotheactivepresentationandplacesthetitleplaceholder10pointsfromthetopofthemaster.
ActivePresentation.AddTitleMaster.Shapes.Title.Top=10
![Page 228: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/228.jpg)
MotionEffectObjectAnimationBehavior MotionEffect
RepresentsamotioneffectforanAnimationBehaviorobject.
![Page 229: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/229.jpg)
UsingtheMotionEffectobject
UsetheMotionEffectpropetyoftheAnimationBehaviorobjecttoreturnaMotionEffectobject.Thefollowingexamplereferstothemotioneffectforagivenanimationbehavior.
ActivePresentation.Slides(1).TimeLine.MainSequence.Item.Behaviors(1).MotionEffect
UsetheByX,ByY,FromX,FromY,ToX,andToYpropertiesoftheMotionEffectobjecttoconstructamotionpath.Thefollowingexampleaddsashapetothefirstslideandcreatesamotionpath.
SubAddMotionPath()
DimshpNewAsShape
DimeffNewAsEffect
DimaniMotionAsAnimationBehavior
SetshpNew=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShape5pointStar,Left:=0,_
Top:=0,Width:=100,Height:=100)
SeteffNew=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpNew,effectId:=msoAnimEffectCustom,_
Trigger:=msoAnimTriggerWithPrevious)
SetaniMotion=effNew.Behaviors.Add(msoAnimTypeMotion)
WithaniMotion.MotionEffect
.FromX=0
.FromY=0
.ToX=500
.ToY=500
EndWith
EndSub
![Page 230: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/230.jpg)
NamedSlideShowObjectNamedSlideShows NamedSlideShow
Representsacustomslideshow,whichisanamedsubsetofslidesinapresentation.TheNamedSlideShowobjectisamemberoftheNamedSlideShowscollection.TheNamedSlideShowscollectioncontainsallthenamedslideshowsinthepresentation.
![Page 231: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/231.jpg)
UsingtheNamedSlideShowObject
UseNamedSlideShows(index),whereindexisthecustomslideshownameorindexnumber,toreturnasingleNamedSlideShowobject.Thefollowingexampledeletesthecustomslideshownamed"QuickShow."
ActivePresentation.SlideShowSettings_
.NamedSlideShows("QuickShow").Delete
UsetheSlideIDspropertytoreturnanarraythatcontainstheuniqueslideIDsforalltheslidesinthespecifiedcustomshow.ThefollowingexampledisplaystheslideIDsfortheslidesinthecustomslideshownamed"QuickShow."
idArray=ActivePresentation.SlideShowSettings_
.NamedSlideShows("QuickShow").SlideIDs
Fori=1ToUBound(idArray)
MsgBoxidArray(i)
Next
![Page 232: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/232.jpg)
ObjectVerbsObjectOLEFormat ObjectVerbs
RepresentsthecollectionofOLEverbsforthespecifiedOLEobject.OLEverbsaretheoperationssupportedbyanOLEobject.CommonlyusedOLEverbsare"play"and"edit."
![Page 233: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/233.jpg)
UsingtheObjectVerbsObject
UsetheObjectVerbspropertytoreturnanObjectVerbsobject.ThefollowingexampledisplaysalltheavailableverbsfortheOLEobjectcontainedinshapeoneonslidetwointheactivepresentation.Forthisexampletowork,shapeonemustcontainanOLEobject.
WithActivePresentation.Slides(2).Shapes(1).OLEFormat
ForEachvIn.ObjectVerbs
MsgBoxv
Next
EndWith
![Page 234: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/234.jpg)
OLEFormatObjectMultipleobjects OLEFormat
ObjectVerbs
ContainspropertiesandmethodsthatapplytoOLEobjects.TheLinkFormatobjectcontainspropertiesandmethodsthatapplytolinkedOLEobjectsonly.ThePictureFormatobjectcontainspropertiesandmethodsthatapplytopicturesandOLEobjects.
![Page 235: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/235.jpg)
UsingtheOLEFormatObject
UsetheOLEFormatpropertytoreturnanOLEFormatobject.ThefollowingexampleloopsthroughalltheshapesonalltheslidesintheactivepresentationandsetsalllinkedMicrosoftExcelworksheetstobeupdatedmanually.
ForEachsldInActivePresentation.Slides
ForEachshInsld.Shapes
Ifsh.Type=msoLinkedOLEObjectThen
Ifsh.OLEFormat.ProgID="Excel.Sheet"Then
sh.LinkFormat.AutoUpdate=ppUpdateOptionManual
EndIf
EndIf
Next
Next
![Page 236: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/236.jpg)
OptionsObjectApplication Options
RepresentsapplicationoptionsinMicrosoftPowerPoint.
![Page 237: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/237.jpg)
UsingtheOptionsobject
UsetheOptionspropertytoreturnanOptionsobject.ThefollowingexamplesetsthreeapplicationoptionsforPowerPoint.
SubTogglePasteOptionsButton()
WithApplication.Options
If.DisplayPasteOptions=FalseThen
.DisplayPasteOptions=True
EndIf
EndWith
EndSub
![Page 238: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/238.jpg)
PageSetupObjectPresentation PageSetup
Containsinformationaboutthepagesetupforslides,notespages,handouts,andoutlinesinapresentation.
![Page 239: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/239.jpg)
UsingthePageSetupObject
UsethePageSetuppropertytoreturnthePageSetupobject.Thefollowingexamplesetsallslidesintheactivepresentationtobe11incheswideand8.5incheshighandsetstheslidenumberingforthepresentationtostartat17.
WithActivePresentation.PageSetup
.SlideWidth=11*72
.SlideHeight=8.5*72
.FirstSlideNumber=17
EndWith
![Page 240: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/240.jpg)
ShowAll
![Page 241: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/241.jpg)
PaneObject
DocumentWindow PanesPane
Anobjectrepresentingoneofthethreepanesinnormalvieworthesinglepaneofanyotherviewinthedocumentwindow.
![Page 242: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/242.jpg)
UsingthePaneObject
UsePanes(index),whereindexistheindexnumberforapane,toreturnasinglePaneobject.Thefollowingtableliststhenamesofthepanesinnormalviewwiththeircorrespondingindexnumbers.
Pane IndexnumberOutline 1Slide 2Notes 3
Whenusingadocumentwindowviewotherthannormalview,usePanes(1)toreferencethesinglePaneobject.
UsetheActivatemethodtomakethespecifiedpaneactive.
UsetheViewTypepropertytodeterminewhichpaneisactive.ThefollowingexampleusestheViewTypepropertytodeterminewhethertheslidepaneistheactivepane.Ifitis,thentheActivatemethodmakesthenotespanetheactivepane.
WithActiveWindow
If.ActivePane.ViewType=ppViewSlideThen
.Panes(3).Activate
EndIf
EndWith
![Page 243: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/243.jpg)
Remarks
Normalviewistheonlyviewwithmultiplepanes.Allotherdocumentwindowviewshaveonlyasinglepane,whichisthedocumentwindow.
![Page 244: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/244.jpg)
ParagraphFormatObjectMultipleobjects ParagraphFormat
BulletFormat
Representstheparagraphformattingofatextrange.
![Page 245: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/245.jpg)
UsingtheParagraphFormatObject
UsetheParagraphFormatpropertytoreturntheParagraphFormatobject.Thefollowingexampleleftalignstheparagraphsinshapetwoonslideoneintheactivepresentation.
ActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange_
.ParagraphFormat.Alignment=ppAlignLeft
![Page 246: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/246.jpg)
PictureFormatObjectMultipleobjects PictureFormat
ContainspropertiesandmethodsthatapplytopicturesandOLEobjects.TheLinkFormatobjectcontainspropertiesandmethodsthatapplytolinkedOLEobjectsonly.TheOLEFormatobjectcontainspropertiesandmethodsthatapplytoOLEobjectswhetherornotthey'relinked.
![Page 247: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/247.jpg)
UsingthePictureFormatObject
UsethePictureFormatpropertytoreturnaPictureFormatobject.Thefollowingexamplesetsthebrightness,contrast,andcolortransformationforshapeoneonmyDocumentandcrops18pointsoffthebottomoftheshape.Forthisexampletowork,shapeonemustbeeitherapictureoranOLEobject.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).PictureFormat
.Brightness=0.3
.Contrast=0.7
.ColorType=msoPictureGrayScale
.CropBottom=18
EndWith
![Page 248: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/248.jpg)
PlaceholderFormatObjectMultipleobjects PlaceholderFormat
Containspropertiesthatapplyspecificallytoplaceholders,suchasplaceholdertype.
![Page 249: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/249.jpg)
UsingthePlaceholderFormatObject
UsethePlaceholderFormatpropertytoreturnaPlaceholderFormatobject.Thefollowingexampleaddstexttoplaceholderoneonslideoneintheactivepresentationifthatplaceholderexistsandisahorizontaltitleplaceholder.
WithActivePresentation.Slides(1).Shapes.Placeholders
If.Count>0Then
With.Item(1)
SelectCase.PlaceholderFormat.Type
CaseppPlaceholderTitle
.TextFrame.TextRange="TitleText"
CaseppPlaceholderCenterTitle
.TextFrame.TextRange="CenteredTitleText"
CaseElse
MsgBox"There'snohorizontal"_
"titleonthisslide"
EndSelect
EndWith
EndIf
EndWith
![Page 250: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/250.jpg)
PlaySettingsObjectMultipleobjects PlaySettings
Containsinformationabouthowthespecifiedmediaclipwillbeplayedduringaslideshow.
![Page 251: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/251.jpg)
UsingthePlaySettingsObject
UsethePlaySettingspropertytoreturnthePlaySettingsobject.Thefollowingexampleinsertsamovienamed"Clock.avi"intoslideoneintheactivepresentation.Itthensetsittobeplayedautomaticallyafterthepreviousanimationorslidetransition,specifiesthattheslideshowcontinuewhilethemovieplays,andspecifiesthatthemovieobjectbehiddenduringaslideshowexceptwhenit'splaying.
SetclockMovie=ActivePresentation.Slides(1).Shapes_
.AddMediaObject(FileName:="C:\WINNT\clock.avi",_
Left:=20,Top:=20)
WithclockMovie.AnimationSettings.PlaySettings
.PlayOnEntry=True
.PauseAnimation=False
.HideWhileNotPlaying=True
EndWith
![Page 252: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/252.jpg)
PresentationObjectMultipleobjects Presentation
Multipleobjects
RepresentsaPowerPointpresentation.ThePresentationobjectisamemberofthePresentationscollection.ThePresentationscollectioncontainsallthePresentationobjectsthatrepresentopenpresentationsinPowerPoint.
![Page 253: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/253.jpg)
UsingthePresentationObject
Thissectiondescribeshowto:
ReturnapresentationthatyouspecifybynameorindexnumberReturnthepresentationintheactivewindowReturnthepresentationinanydocumentwindoworslideshowwindowyouspecify
![Page 254: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/254.jpg)
Returningapresentationthatyouspecifybynameorindexnumber
UsePresentations(index),whereindexisthepresentation'snameorindexnumber,toreturnasinglePresentationobject.Thenameofthepresentationisthefilename,withorwithoutthefilenameextension,andwithoutthepath.ThefollowingexampleaddsaslidetothebeginningofSamplePresentation.
Presentations("SamplePresentation").Slides.Add1,1
Notethatifmultiplepresentationswiththesamenameareopen,thefirstpresentationinthecollectionwiththespecifiednameisreturned.
![Page 255: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/255.jpg)
Returningthepresentationintheactivewindow
UsetheActivePresentationpropertytoreturnthepresentationintheactivewindow.Thefollowingexamplesavestheactivepresentation.
ActivePresentation.Save
Notethatifanembeddedpresentationisin-placeactive,theActivePresentationpropertyreturnstheembeddedpresentation.
![Page 256: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/256.jpg)
Returningthepresentationinanydocumentwindoworslideshowwindowyouspecify
UsethePresentationpropertytoreturnthepresentationthat'sinthespecifieddocumentwindoworslideshowwindow.Thefollowingexampledisplaysthenameoftheslideshowrunninginslideshowwindowone.
MsgBoxSlideShowWindows(1).Presentation.Name
![Page 257: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/257.jpg)
PrintOptionsObjectMultipleobjects PrintOptions
PrintRanges
Containsprintoptionsforapresentation.
NoteSpecifyingtheoptionalargumentsFrom,To,Copies,andCollateforthePrintOutmethodwillsetthecorrespondingpropertiesofthePrintOptionsobject.
![Page 258: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/258.jpg)
UsingthePrintOptionsObject
UsethePrintOptionspropertytoreturnthePrintOptionsobject.Thefollowingexampleprintstwouncollatedcolorcopiesofalltheslides(whethervisibleorhidden)intheactivepresentation.Theexamplealsoscaleseachslidetofittheprintedpageandframeseachslidewithathinborder.
WithActivePresentation
With.PrintOptions
.NumberOfCopies=2
.Collate=False
.PrintColorType=ppPrintColor
.PrintHiddenSlides=True
.FitToPage=True
.FrameSlides=True
.OutputType=ppPrintOutputSlides
EndWith
.PrintOut
EndWith
UsetheRangeTypepropertytospecifywhethertoprinttheentirepresentationoronlyaspecifiedpartofit.Ifyouwanttoprintonlycertainslides,settheRangeTypepropertytoppPrintSlideRange,andusetheRangespropertytospecifywhichpagestoprint.Thefollowingexampleprintsslides1,4,5,and6intheactivepresentation
WithActivePresentation
With.PrintOptions
.RangeType=ppPrintSlideRange
With.Ranges
.Add1,1
.Add4,6
EndWith
EndWith
.PrintOut
EndWith
![Page 259: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/259.jpg)
![Page 260: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/260.jpg)
PrintRangeObjectPrintRanges PrintRange
Representsasinglerangeofconsecutiveslidesorpagestobeprinted.ThePrintRangeobjectisamemberofthePrintRangescollection.ThePrintRangescollectioncontainsalltheprintrangesthathavebeendefinedforthespecifiedpresentation.
![Page 261: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/261.jpg)
UsingthePrintRangeObject
UseRanges(index),whereindexistheprintrangeindexnumber,toreturnasinglePrintRangeobject.Thefollowingexampledisplaysamessagethatindicatesthestartingandendingslidenumbersforprintrangeoneintheactivepresentation.
WithActivePresentation.PrintOptions.Ranges
If.Count>0Then
With.Item(1)
MsgBox"Printrange1startsonslide"&.Start&_
"andendsonslide"&.End
EndWith
EndIf
EndWith
UsetheAddmethodtocreateaPrintRangeobjectandaddittothePrintRangescollection.Thefollowingexampledefinesthreeprintrangesthatrepresentslide1,slides3through5,andslides8and9intheactivepresentationandthenprintstheslidesintheseranges.
WithActivePresentation.PrintOptions
.RangeType=ppPrintSlideRange
With.Ranges
.ClearAll
.Add1,1
.Add3,5
.Add8,9
EndWith
EndWith
ActivePresentation.PrintOut
![Page 262: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/262.jpg)
Remarks
YoucansetprintrangesinthePrintRangescollectionindependentoftheRangeTypesetting;theserangesareretainedaslongasthepresentationthey'recontainedinisloaded.TherangesinthePrintRangescollectionareappliedwhentheRangeTypepropertyissettoppPrintSlideRange.
![Page 263: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/263.jpg)
PropertyEffectObjectAnimationBehavior PropertyEffect
AnimationPoints
RepresentsapropertyeffectforanAnimationBehaviorobject.
![Page 264: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/264.jpg)
UsingthePropertyEffectobject
UsethePropertyEffectpropertyoftheAnimationBehaviorobjecttoreturnaPropertyEffectobject.Thefollowingexamplereferstothepropertyeffectforaspecifiedanimationbehavior.
ActivePresentation.Slides(1).TimeLine.MainSequence.Item(1)_
.Behaviors(1).PropertyEffect
UsethePointspropertytoaccesstheanimationpointsofaparticularanimationbehavior.Ifyouwanttochangeonlytwostatesofananimationbehavior,usetheFromandToproperties.Thisexampleaddsanewshapetotheandsetsthepropertyeffecttoanimatethefillcolorfrombluetored.
SubAddShapeSetAnimFill()
DimeffBlindsAsEffect
DimshpRectangleAsShape
DimanimPropertyAsAnimationBehavior
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffBlinds=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectBlinds)
effBlinds.Timing.Duration=3
SetanimProperty=effBlinds.Behaviors.Add(msoAnimTypeProperty)
WithanimProperty.PropertyEffect
.Property=msoAnimColor
.From=RGB(Red:=0,Green:=0,Blue:=255)
.To=RGB(Red:=255,Green:=0,Blue:=0)
EndWith
EndSub
![Page 265: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/265.jpg)
![Page 266: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/266.jpg)
PublishObjectObjectPublishObjects PublishObject
RepresentsacompleteorpartialloadedpresentationthatisavailableforpublishingtoHTML.ThePublishObjectobjectisamemberofthePublishObjectscollection.
![Page 267: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/267.jpg)
UsingthePublishObjectObject
UsePublishObjects(index),whereindexisalways"1",toreturnthesingleobjectforaloadedpresentation.TherecanbeonlyonePublishObjectobjectforeachloadedpresentation.ThisexamplepublishesslidesthreethroughfiveofpresentationtwotoHTML.ItnamesthepublishedpresentationMallard.htm.
WithPresentations(2).PublishObjects(1)
.FileName="C:\Test\Mallard.htm"
.SourceType=ppPublishSlideRange
.RangeStart=3
.RangeEnd=5
.Publish
EndWith
![Page 268: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/268.jpg)
Remarks
YoucanspecifythecontentandattributesofthepublishedpresentationbysettingvariouspropertiesofthePublishObjectobject.Forexample,theSourceTypepropertydefinestheportionofaloadedpresentationtobepublished.TheRangeStartpropertyandtheRangeEndpropertyspecifytherangeofslidestopublish,andtheSpeakerNotespropertydesignateswhetherornottopublishthespeaker'snotes.
![Page 269: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/269.jpg)
RGBColorObjectRGBColor
Representsasinglecolorinacolorscheme.
![Page 270: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/270.jpg)
UsingtheRGBColorObject
UsetheColorsmethodtoreturnanRGBColorobject.YoucansetanRGBColorobjecttoanotherRGBColorobject.YoucanusetheRGBpropertytosetorreturntheexplicitred-green-bluevalueforanRGBColorobject,withtheexceptionoftheRGBColorobjectsdefinedbytheppNotSchemeColorandppSchemeColorMixedconstants.TheRGBpropertycanbereturned,butnotset,forthesetwoobjects.Thefollowingexamplesetsthebackgroundcolorincolorschemeoneintheactivepresentationtoredandsetsthetitlecolortothetitlecolorthat'sdefinedforcolorschemetwo.
WithActivePresentation.ColorSchemes
.Item(1).Colors(ppBackground).RGB=RGB(255,0,0)
.Item(1).Colors(ppTitle)=.Item(2).Colors(ppTitle)
EndWith
![Page 271: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/271.jpg)
RotationEffectObjectAnimationBehavior RotationEffect
RepresentsarotationeffectforanAnimationBehaviorobject.
![Page 272: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/272.jpg)
UsingtheRotationEffectobject
UsetheRotationEffectpropertyoftheAnimationBehaviorobjecttoreturnaRotationEffectobject.Thefollowingexamplereferstotherotationeffectforagivenanimationbehavior.
ActivePresentation.Slides(1).TimeLine.MainSequence.Item.Behaviors(1).RotationEffect
UsetheBy,From,andTopropertiesoftheRotationEffectobjecttoaffectanobject'sanimationrotation.Thefollowingexampleaddsanewshapetothefirstslideandsetstherotationanimationbehavior.
SubAddRotation()
DimshpNewAsShape
DimeffNewAsEffect
DimaniNewAsAnimationBehavior
SetshpNew=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShape5pointStar,Left:=0,_
Top:=0,Width:=100,Height:=100)
SeteffNew=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpNew,effectId:=msoAnimEffectCustom)
SetaniNew=effNew.Behaviors.Add(msoAnimTypeRotation)
WithaniNew.RotationEffect
'Rotate270degreesfromcurrentposition
.By=270
EndWith
EndSub
![Page 273: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/273.jpg)
RowObjectRows Row
CellRange
Representsarowinatable.TheRowobjectisamemberoftheRowscollection.TheRowscollectionincludesalltherowsinthespecifiedtable.
![Page 274: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/274.jpg)
UsingtheRowObject
UseRows(index),whereindexisanumberthatrepresentsthepositionoftherowinthetable,toreturnasingleRowobject.Thisexampledeletesthefirstrowfromthetableinshapefiveonslidetwooftheactivepresentation.
ActivePresentation.Slides(2).Shapes(5).Table.Rows(1).Delete
UsetheSelectmethodtoselectarowinatable.Thisexampleselectsrowoneofthespecifiedtable.
ActivePresentation.Slides(2).Shapes(5).Table.Rows(1).Select
![Page 275: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/275.jpg)
Remarks
UsetheCellspropertytomodifytheindividualcellsinaRowobject.Thisexampleselectsthesecondrowinthetableandappliesadashedlinestyletothebottomborder.
ActiveWindow.Selection.ShapeRange.Table.Rows(2)_
.Cells.Borders(ppBorderBottom).DashStyle=msoLineDash
![Page 276: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/276.jpg)
RulerObjectMultipleobjects Ruler
Multipleobjects
Representstherulerforthetextinthespecifiedshapeorforalltextinthespecifiedtextstyle.Containstabstopsandtheindentationsettingsfortextoutlinelevels.
![Page 277: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/277.jpg)
UsingtheRulerObject
UsetheRulerpropertyoftheTextFrameobjecttoreturntheRulerobjectthatrepresentstherulerforthetextinthespecifiedshape.UsetheTabStopspropertytoreturntheTabStopsobjectthatcontainsthetabstopsontheruler.UsetheLevelspropertytoreturntheRulerLevelsobjectthatcontainstheindentationsettingsfortextoutlinelevels.Thefollowingexamplesetsaleft-alignedtabstopat2inches(144Points)andsetsahangingindentforthetextinobjecttwoonslideoneintheactivepresentation.
WithActivePresentation.Slides(1).Shapes(2).TextFrame.Ruler
.TabStops.AddppTabStopLeft,144
.Levels(1).FirstMargin=0
.Levels(1).LeftMargin=36
EndWith
UsetheRulerpropertyoftheTextStyleobjecttoreturntheRulerobjectthatrepresentstherulerforoneofthefourdefinedtextstyles(titletext,bodytext,notestext,ordefaulttext).Thefollowingexamplesetsthefirst-lineindentandhangingindentforoutlineleveloneinbodytextontheslidemasterfortheactivepresentation.
WithActivePresentation.SlideMaster_
.TextStyles(ppBodyStyle).Ruler.Levels(1)
.FirstMargin=9
.LeftMargin=54
EndWith
![Page 278: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/278.jpg)
RulerLevelObjectRulerLevels RulerLevel
Containsfirst-lineindentandhangingindentinformationforanoutlinelevel.TheRulerLevelobjectisamemberoftheRulerLevelscollection.TheRulerLevelscollectioncontainsaRulerLevelobjectforeachofthefiveavailableoutlinelevels.
![Page 279: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/279.jpg)
UsingtheRulerLevelObject
UseRulerLevels(index),whereindexistheoutlinelevel,toreturnasingleRulerLevelobject.Thefollowingexamplesetsthefirst-lineindentandhangingindentforoutlineleveloneinbodytextontheslidemasterfortheactivepresentation.
WithActivePresentation.SlideMaster_
.TextStyles(ppBodyStyle).Ruler.Levels(1)
.FirstMargin=9
.LeftMargin=54
EndWith
Thefollowingexamplesetsthefirst-lineindentandhangingindentforoutlineleveloneinshapetwoonslideoneintheactivepresentation.
WithActivePresentation.SlideMaster.Shapes(2)_
.TextFrame.Ruler.Levels(1)
.FirstMargin=9
.LeftMargin=54
EndWith
![Page 280: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/280.jpg)
SelectionObjectDocumentWindow Selection
Multipleobjects
Representstheselectioninthespecifieddocumentwindow.
![Page 281: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/281.jpg)
UsingtheSelectionObject
UsetheSelectionpropertytoreturntheSelectionobject.ThefollowingexampleplacesacopyoftheselectionintheactivewindowontheClipboard.
ActiveWindow.Selection.Copy
UsetheShapeRange,SlideRange,orTextRangepropertytoreturnarangeofshapes,slides,ortextfromtheselection.
Thefollowingexamplesetsthefillforegroundcolorfortheselectedshapesinwindowtwo,assumingthatthere'satleastoneshapeselected,andassumingthatallselectedshapeshaveafillwhoseforecolorcanbeset.
WithWindows(2).Selection.ShapeRange.Fill
.Visible=True
.ForeColor.RGB=RGB(255,0,255)
EndWith
Thefollowingexamplesetsthetextinthefirstselectedshapeinwindowtwoifthatshapecontainsatextframe.
WithWindows(2).Selection.ShapeRange(1)
If.HasTextFrameThen
.TextFrame.TextRange="CurrentChoice"
EndIf
EndWith
ThefollowingexamplecutstheselectedtextintheactivewindowandplacesitontheClipboard.
ActiveWindow.Selection.TextRange.Cut
Thefollowingexampleduplicatesalltheslidesintheselection(ifyou'reinslideview,thisduplicatesthecurrentslide).
ActiveWindow.Selection.SlideRange.Duplicate
![Page 282: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/282.jpg)
Ifyoudon'thaveanobjectoftheappropriatetypeselectedwhenyouuseoneoftheseproperties(forinstance,ifyouusetheShapeRangepropertywhentherearenoshapesselected),anerroroccurs.UsetheTypepropertytodeterminewhatkindofobjectorobjectsareselected.Thefollowingexamplecheckstoseewhethertheselectioncontainsslides.Iftheselectiondoescontainslides,theexamplesetsthebackgroundforthefirstslideintheselection.
WithWindows(2).Selection
If.Type=ppSelectionSlidesThen
With.SlideRange(1)
.FollowMasterBackground=False
.Background.Fill.PresetGradient_
msoGradientHorizontal,1,msoGradientLateSunset
EndWith
EndIf
EndWith
![Page 283: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/283.jpg)
Remarks
TheSelectionobjectisdeletedwheneveryouchangeslidesinanactiveslideview(theTypepropertywillreturnppSelectionNone).
![Page 284: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/284.jpg)
SetEffectObjectAnimationBehavior SetEffect
Representsaseteffectforananimationbehavior.YoucanusetheSetEffectobjecttosetthevalueofaproperty.
![Page 285: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/285.jpg)
UsingtheSetEffectObject
UsetheSetEffectpropertyoftheAnimationBehaviorobjecttoreturnaSetEffectobject.SeteffectscanbechangedusingtheSetEffectobject'sPropertyandToproperties.
![Page 286: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/286.jpg)
Example
Thefollowingexampleaddsashapetothefirstslideoftheactivepresentationandsetsaseteffectanimationbehavior.
SubChangeSetEffect()
DimsldFirstAsSlide
DimshpHeartAsShape
DimeffNewAsEffect
DimbhvEffectAsAnimationBehavior
SetsldFirst=ActivePresentation.Slides(1)
SetshpHeart=sldFirst.Shapes.AddShape(Type:=msoShapeHeart,_
Left:=100,Top:=100,Width:=100,Height:=100)
SeteffNew=sldFirst.TimeLine.MainSequence.AddEffect_
(Shape:=shpHeart,EffectID:=msoAnimEffectChangeFillColor,_
Trigger:=msoAnimTriggerAfterPrevious)
SetbhvEffect=effNew.Behaviors.Add(msoAnimTypeSet)
WithbhvEffect.SetEffect
.Property=msoAnimShapeFillColor
.To=RGB(Red:=0,Green:=255,Blue:=255)
EndWith
EndSub
![Page 287: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/287.jpg)
ShadowFormatObjectMultipleobjects ShadowFormat
ColorFormat
Representsshadowformattingforashape.
![Page 288: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/288.jpg)
UsingtheShadowFormatObject
UsetheShadowpropertytoreturnaShadowFormatobject.ThefollowingexampleaddsashadowedrectangletomyDocument.Thesemitransparent,blueshadowisoffset5pointstotherightoftherectangleand3pointsaboveit.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(msoShapeRectangle,_
50,50,100,200).Shadow
.ForeColor.RGB=RGB(0,0,128)
.OffsetX=5
.OffsetY=-3
.Transparency=0.5
.Visible=True
EndWith
![Page 289: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/289.jpg)
ShowAll
![Page 290: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/290.jpg)
ShapeObjectMultipleobjects Shape
Multipleobjects
Representsanobjectinthedrawinglayer,suchasanAutoShape,freeform,OLEobject,orpicture.
NoteTherearethreeobjectsthatrepresentshapes:theShapescollection,whichrepresentsalltheshapesonadocument;theShapeRangecollection,whichrepresentsaspecifiedsubsetoftheshapesonadocument(forexample,aShapeRangeobjectcouldrepresentshapesoneandfouronthedocument,oritcouldrepresentalltheselectedshapesonthedocument);theShapeobject,whichrepresentsasingleshapeonadocument.Ifyouwanttoworkwithseveralshapeatthesametimeorwithshapeswithintheselection,useaShapeRangecollection.Foranoverviewofhowtoworkwitheitherasingleshapeorwithmorethanoneshapeatatime,seeWorkingwithShapes(DrawingObjects).
![Page 291: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/291.jpg)
UsingtheShapeObject
Thissectiondescribeshowto:
Returnanexistingshapeonaslide,indexedbynameornumber.Returnanewlycreatedshapeonaslide.Returnashapewithintheselection.Returntheslidetitleandotherplaceholdersonaslide.Returntheshapesattachedtotheendsofaconnector.Returnthedefaultshapeforapresentation.Returnanewlycreatedfreeform.Returnasingleshapefromwithinagroup.Returnanewlyformedgroupofshapes.
![Page 292: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/292.jpg)
ReturninganExistingShapeonaSlide
UseShapes(index),whereindexistheshapenameortheindexnumber,toreturnaShapeobjectthatrepresentsashapeonaslide.ThefollowingexamplehorizontallyflipsshapeoneandtheshapenamedRectangle1onmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(1).FlipmsoFlipHorizontal
myDocument.Shapes("Rectangle1").FlipmsoFlipHorizontal
EachshapeisassignedadefaultnamewhenyouaddittotheShapescollection.Togivetheshapeamoremeaningfulname,usetheNameproperty.ThefollowingexampleaddsarectangletomyDocument,givesitthenameRedSquare,andthensetsitsforegroundcolorandlinestyle.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(Type:=msoShapeRectangle,_
Top:=144,Left:=144,Width:=72,Height:=72)
.Name="RedSquare"
.Fill.ForeColor.RGB=RGB(255,0,0)
.Line.DashStyle=msoLineDashDot
EndWith
![Page 293: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/293.jpg)
ReturningaNewlyCreatedShapeonaSlide
ToaddashapetoaslideandreturnaShapeobjectthatrepresentsthenewlycreatedshape,useoneofthefollowingmethodsoftheShapescollection:AddCallout,AddComment,AddConnector,AddCurve,AddLabel,AddLine,AddMediaObject,AddOLEObject,AddPicture,AddPlaceholder,AddPolyline,AddShape,AddTable,AddTextbox,AddTextEffect,AddTitle.
![Page 294: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/294.jpg)
ReturningaShapeWithintheSelection
UseSelection.ShapeRange(index),whereindexistheshapenameortheindexnumber,toreturnaShapeobjectthatrepresentsashapewithintheselection.Thefollowingexamplesetsthefillforthefirstshapeintheselectionintheactivewindow,assumingthatthere'satleastoneshapeintheselection.
ActiveWindow.Selection.ShapeRange(1).Fill_
.ForeColor.RGB=RGB(255,0,0)
![Page 295: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/295.jpg)
ReturningtheSlideTitleandOtherPlaceholdersonaSlide
UseShapes.TitletoreturnaShapeobjectthatrepresentsanexistingslidetitle.UseShapes.AddTitletoaddatitletoaslidethatdoesn'talreadyhaveoneandreturnaShapeobjectthatrepresentsthenewlycreatedtitle.UseShapes.Placeholders(index),whereindexistheplaceholder'sindexnumber,toreturnaShapeobjectthatrepresentsaplaceholder.Ifyouhavenotchangedthelayeringorderoftheshapesonaslide,thefollowingthreestatementsareequivalent,assumingthatslideonehasatitle.
ActivePresentation.Slides(1).Shapes.Title_
.TextFrame.TextRange.Font.Italic=True
ActivePresentation.Slides(1).Shapes.Placeholders(1)_
.TextFrame.TextRange.Font.Italic=True
ActivePresentation.Slides(1).Shapes(1).TextFrame_
.TextRange.Font.Italic=True
![Page 296: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/296.jpg)
ReturningtheShapesAttachedtotheEndsofaConnector
ToreturnaShapeobjectthatrepresentsoneoftheshapesattachedbyaconnector,usetheBeginConnectedShapeorEndConnectedShapeproperty.
![Page 297: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/297.jpg)
ReturningtheDefaultShapeforaPresentation
ToreturnaShapeobjectthatrepresentsthedefaultshapeforapresentation,usetheDefaultShapeproperty.
![Page 298: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/298.jpg)
Returninganewlycreatedfreeform
UsetheBuildFreeformandAddNodesmethodstodefinethegeometryofanewfreeform,andusetheConvertToShapemethodtocreatethefreeformandreturntheShapeobjectthatrepresentsit.
![Page 299: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/299.jpg)
ReturningaSingleShapefromWithinaGroup
UseGroupItems(index),whereindexistheshapenameortheindexnumberwithinthegroup,toreturnaShapeobjectthatrepresentsasingleshapeinagroupedshape.
![Page 300: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/300.jpg)
ReturningaNewlyFormedGroupofShapes
UsetheGrouporRegroupmethodtogrouparangeofshapesandreturnasingleShapeobjectthatrepresentsthenewlyformedgroup.Afteragrouphasbeenformed,youcanworkwiththegroupthesamewayyouworkwithanyothershape.
![Page 301: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/301.jpg)
ShapeNodeObjectShapeNodes ShapeNode
Representsthegeometryandthegeometry-editingpropertiesofthenodesinauser-definedfreeform.Nodesincludetheverticesbetweenthesegmentsofthefreeformandthecontrolpointsforcurvedsegments.TheShapeNodeobjectisamemberoftheShapeNodescollection.TheShapeNodescollectioncontainsallthenodesinafreeform.
![Page 302: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/302.jpg)
UsingtheShapeNodeObject
UseNodes(index),whereindexisthenodeindexnumber,toreturnasingleShapeNodeobject.IfnodeoneinshapethreeonmyDocumentisacornerpoint,thefollowingexamplemakesitasmoothpoint.Forthisexampletowork,shapethreemustbeafreeform.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3)
If.Nodes(1).EditingType=msoEditingCornerThen
.Nodes.SetEditingType1,msoEditingSmooth
EndIf
EndWith
![Page 303: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/303.jpg)
ShapeRangeCollectionObjectMultipleobjects ShapeRange
Multipleobjects
Representsashaperange,whichisasetofshapesonadocument.Ashaperangecancontainasfewasasingleshapeorasmanyasalltheshapesonthedocument.Youcanincludewhichevershapesyouwant—chosenfromamongalltheshapesonthedocumentoralltheshapesintheselection—toconstructashaperange.Forexample,youcouldconstructaShapeRangecollectionthatcontainsthefirstthreeshapesonadocument,alltheselectedshapesonadocument,orallthefreeformsonadocument.
Foranoverviewofhowtoworkwitheitherasingleshapeorwithmorethanoneshapeatatime,seeWorkingwithShapes(DrawingObjects).
![Page 304: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/304.jpg)
UsingtheShapeRangeCollection
Thissectiondescribeshowto:
Returnasetofshapesyouspecifybynameorindexnumber.Returnallorsomeoftheselectedshapesonadocument.
![Page 305: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/305.jpg)
ReturningaSetofShapesYouSpecifybyNameorIndexNumber
UseShapes.Range(index),whereindexisthenameorindexnumberoftheshapeoranarraythatcontainseithernamesorindexnumbersofshapes,toreturnaShapeRangecollectionthatrepresentsasetofshapesonadocument.YoucanusetheArrayfunctiontoconstructanarrayofnamesorindexnumbers.ThefollowingexamplesetsthefillpatternforshapesoneandthreeonmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.Range(Array(1,3)).Fill_
.PatternedmsoPatternHorizontalBrick
Thefollowingexamplesetsthefillpatternfortheshapesnamed"Oval4"and"Rectangle5"onmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
SetmyRange=myDocument.Shapes_
.Range(Array("Oval4","Rectangle5"))
myRange.Fill.PatternedmsoPatternHorizontalBrick
AlthoughyoucanusetheRangemethodtoreturnanynumberofshapesorslides,it'ssimplertousetheItemmethodifyouwanttoreturnonlyasinglememberofthecollection.Forexample,Shapes(1)issimplerthanShapes.Range(1).
![Page 306: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/306.jpg)
ReturningAllorSomeoftheSelectedShapesonaDocument
UsetheShapeRangepropertyoftheSelectionobjecttoreturnalltheshapesintheselection.Thefollowingexamplesetsthefillforegroundcolorforalltheshapesintheselectioninwindowone,assumingthatthere'satleastoneshapeintheselection.
Windows(1).Selection.ShapeRange.Fill.ForeColor_
.RGB=RGB(255,0,255)
UseSelection.ShapeRange(index),whereindexistheshapenameortheindexnumber,toreturnasingleshapewithintheselection.Thefollowingexamplesetsthefillforegroundcolorforshapetwointhecollectionofselectedshapesinwindowone,assumingthatthereareatleasttwoshapesintheselection.
Windows(1).Selection.ShapeRange(2).Fill.ForeColor_
.RGB=RGB(255,0,255)
![Page 307: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/307.jpg)
SlideObjectMultipleobjects SlideRange
SlideMultipleobjects
Representsaslide.TheSlidescollectioncontainsalltheSlideobjectsinapresentation.
NoteDon'tbeconfusedifyou'retryingtoreturnareferencetoasingleslidebutyouendupwithaSlideRangeobject.AsingleslidecanberepresentedeitherbyaSlideobjectorbyaSlideRangecollectionthatcontainsonlyoneslide,dependingonhowyoureturnareferencetotheslide.Forexample,ifyoucreateandreturnareferencetoaslidebyusingtheAddmethod,theslideisrepresentedbyaSlideobject.However,ifyoucreateandreturnareferencetoaslidebyusingtheDuplicatemethod,theslideisrepresentedbyaSlideRangecollectionthatcontainsasingleslide.BecauseallthepropertiesandmethodsthatapplytoaSlideobjectalsoapplytoaSlideRangecollectionthatcontainsasingleslide,youcanworkwiththereturnedslideinthesameway,regardlessofwhetherit'srepresentedbyaSlideobjectoraSlideRangecollection.
![Page 308: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/308.jpg)
UsingtheSlideObject
Thissectiondescribeshowto:
Returnaslidethatyouspecifybyname,indexnumber,orslideIDnumberReturnaslideintheselectionReturntheslidethat'scurrentlydisplayedinanydocumentwindoworslideshowwindowyouspecifyCreateanewslide
![Page 309: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/309.jpg)
Returningaslidethatyouspecifybyname,indexnumber,orslideIDnumber
UseSlides(index),whereindexistheslidenameorindexnumber,oruseSlides.FindBySlideID(index),whereindexistheslideIDnumber,toreturnasingleSlideobject.Thefollowingexamplesetsthelayoutforslideoneintheactivepresentation.
ActivePresentation.Slides(1).Layout=ppLayoutTitle
ThefollowingexamplesetsthelayoutfortheslidewiththeIDnumber265.
ActivePresentation.Slides.FindBySlideID(265).Layout=ppLayoutTitle
![Page 310: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/310.jpg)
Returningaslideintheselection
UseSelection.SlideRange(index),whereindexistheslidenameorindexnumberwithintheselection,toreturnasingleSlideobject.Thefollowingexamplesetsthelayoutforslideoneintheselectionintheactivewindow,assumingthatthere'satleastoneslideselected.
ActiveWindow.Selection.SlideRange(1).Layout=ppLayoutTitle
Ifthere'sonlyoneslideselected,youcanuseSelection.SlideRangetoreturnaSlideRangecollectionthatcontainstheselectedslide.Thefollowingexamplesetsthelayoutforslideoneinthecurrentselectionintheactivewindow,assumingthatthere'sexactlyoneslideselected.
ActiveWindow.Selection.SlideRange.Layout=ppLayoutTitle
![Page 311: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/311.jpg)
Returningtheslidethat'scurrentlydisplayedinanydocumentwindoworslideshowwindowyouspecify
UsetheSlidepropertytoreturntheslidethat'scurrentlydisplayedinthespecifieddocumentwindoworslideshowwindowview.Thefollowingexamplecopiestheslidethat'scurrentlydisplayedindocumentwindowtwototheClipboard.
Windows(2).View.Slide.Copy
![Page 312: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/312.jpg)
Creatinganewslide
UsetheAddmethodtocreateanewslideandaddittothepresentation.Thefollowingexampleaddsatitleslidetothebeginningoftheactivepresentation.
ActivePresentation.Slides.Add1,ppLayoutTitleOnly
![Page 313: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/313.jpg)
SlideShowSettingsObjectPresentation SlideShowSettings
Multipleobjects
Representstheslideshowsetupforapresentation.
![Page 314: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/314.jpg)
UsingtheSlideShowSettingsObject
UsetheSlideShowSettingspropertytoreturntheSlideShowSettingsobject.Thefirstsectioninthefollowingexamplesetsalltheslidesintheactivepresentationtoadvanceautomaticallyafterfiveseconds.Thesecondsectionsetstheslideshowtostartonslidetwo,endonslidefour,advanceslidesbyusingthetimingssetinthefirstsection,andruninacontinuousloopuntiltheuserpressesESC.Finally,theexamplerunstheslideshow.
ForEachsInActivePresentation.Slides
Withs.SlideShowTransition
.AdvanceOnTime=True
.AdvanceTime=5
EndWith
Next
WithActivePresentation.SlideShowSettings
.RangeType=ppShowSlideRange
.StartingSlide=2
.EndingSlide=4
.AdvanceMode=ppSlideShowUseSlideTimings
.LoopUntilStopped=True
.Run
EndWith
![Page 315: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/315.jpg)
SlideShowTransitionObjectMultipleobjects SlideShowTransition
SoundEffect
Containsinformationabouthowthespecifiedslideadvancesduringaslideshow.
![Page 316: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/316.jpg)
UsingtheSlideShowTransitionObject
UsetheSlideShowTransitionpropertytoreturntheSlideShowTransitionobject.ThefollowingexamplespecifiesaFastStripsDown-LefttransitionaccompaniedbytheBass.wavsoundforslideoneintheactivepresentationandspecifiesthattheslideadvanceautomaticallyfivesecondsafterthepreviousanimationorslidetransition.
WithActivePresentation.Slides(1).SlideShowTransition
.Speed=ppTransitionSpeedFast
.EntryEffect=ppEffectStripsDownLeft
.SoundEffect.ImportFromFile"c:\sndsys\bass.wav"
.AdvanceOnTime=True
.AdvanceTime=5
EndWith
ActivePresentation.SlideShowSettings.AdvanceMode=_
ppSlideShowUseSlideTimings
![Page 317: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/317.jpg)
ShowAll
![Page 318: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/318.jpg)
SlideShowViewObjectSlideShowWindow SlideShowView
Multipleobjects
Representstheviewinaslideshowwindow.
![Page 319: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/319.jpg)
UsingtheSlideShowViewObject
UsetheViewpropertyoftheSlideShowWindowobjecttoreturntheSlideShowViewobject.Thefollowingexamplesetsslideshowwindowonetodisplaythefirstslideinthepresentation.
SlideShowWindows(1).View.First
UsetheRunmethodoftheSlideShowSettingsobjecttocreateaSlideShowWindowobject,andthenusetheViewpropertytoreturntheSlideShowViewobjectthewindowcontains.Thefollowingexamplerunsaslideshowoftheactivepresentation,changesthepointertoapen,andsetsthepencolorfortheslideshowtored.
WithActivePresentation.SlideShowSettings.Run.View
.PointerColor.RGB=RGB(255,0,0)
.PointerType=ppSlideShowPointerPen
EndWith
![Page 320: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/320.jpg)
SlideShowWindowObjectApplication SlideShowWindows
SlideShowWindowMultipleobjects
Representsawindowinwhichaslideshowruns.
![Page 321: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/321.jpg)
UsingtheSlideShowWindowObject
UseSlideShowWindows(index),whereindexistheslideshowwindowindexnumber,toreturnasingleSlideShowWindowobject.Thefollowingexampleactivatesslideshowwindowtwo.
SlideShowWindows(2).Activate
UsetheRunmethodtocreateanewslideshowwindowandreturnareferencetothisslideshowwindow.Thefollowingexamplerunsaslideshowoftheactivepresentationandreducestheheightoftheslideshowwindowjustenoughsothatyoucanseethetaskbar(forscreenswitharesolutionof800by600).
WithActivePresentation.SlideShowSettings
.ShowType=ppShowTypeSpeaker
With.Run
.Height=300
.Width=400
EndWith
EndWith
UsetheViewpropertytoreturntheviewinthespecifiedslideshowwindow.Thefollowingexamplesetstheviewinslideshowwindowonetodisplayslidethreeinthepresentation.
SlideShowWindows(1).View.GotoSlide3
UsethePresentationpropertytoreturnthepresentationthat'scurrentlyrunninginthespecifiedslideshowwindow.Thefollowingexampledisplaysthenameofthepresentationthat'scurrentlyrunninginslideshowwindowone.
MsgBoxSlideShowWindows(1).Presentation.Name
![Page 322: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/322.jpg)
![Page 323: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/323.jpg)
SoundEffectObjectMultipleobjects SoundEffect
Representsthesoundeffectthataccompaniesananimationorslidetransitioninaslideshow.
![Page 324: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/324.jpg)
UsingtheSoundEffectObject
UsetheSoundEffectpropertyoftheAnimationSettingsobjecttoreturntheSoundEffectobjectthatrepresentsthesoundeffectthataccompaniesananimation.ThefollowingexamplespecifiesthattheanimationofthetitleonslideoneintheactivepresentationbeaccompaniedbythesoundintheBass.wavfile.
WithActivePresentation.Slides(1).Shapes(1).AnimationSettings
.TextLevelEffect=ppAnimateByAllLevels
.SoundEffect.ImportFromFile"c:\sndsys\bass.wav"
EndWith
UsetheSoundEffectpropertyoftheSlideShowTransitionobjecttoreturntheSoundEffectobjectthatrepresentsthesoundeffectthataccompaniesaslidetransition.
ThefollowingexamplespecifiesthatthetransitiontoslideoneintheactivepresentationbeaccompaniedbythesoundintheBass.wavfile.
ActivePresentation.Slides(1).SlideShowTransition.SoundEffect_
.ImportFromFile"c:\sndsys\bass.wav"
![Page 325: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/325.jpg)
TableObjectMultipleobjects Table
Multipleobjects
Representsatableshapeonaslide.TheTableobjectisamemberoftheShapescollection.TheTableobjectcontainstheColumnscollectionandtheRowscollection.
![Page 326: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/326.jpg)
UsingtheTableObject
UseShapes(index),whereindexisanumber,toreturnashapecontainingatable.UsetheHasTablepropertytoseeifashapecontainsatable.Thisexamplewalksthroughtheshapesonslideone,checkstoseeifeachshapehasatable,andthensetsthemouseclickactionforeachtableshapetoadvancetothenextslide.
WithActivePresentation.Slides(2).Shapes
Fori=1To.Count
If.Item(i).HasTableThen
.Item(i).ActionSettings(ppMouseClick)_
.Action=ppActionNextSlide
EndIf
Next
EndWith
UsetheCellmethodoftheTableobjecttoaccessthecontentsofeachcell.Thisexampleinsertsthetext"Cell1"inthefirstcellofthetableinshapefiveonslidethree.
ActivePresentation.Slides(3).Shapes(5).Table_
.Cell(1,1).Shape.TextFrame.TextRange_
.Text="Cell1"
UsetheAddTablemethodtoaddatabletoaslide.Thisexampleaddsa3x3tableonslidetwointheactivepresentation.
ActivePresentation.Slides(2).Shapes.AddTable(3,3)
![Page 327: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/327.jpg)
TabStopObjectTabStops TabStop
Representsasingletabstop.TheTabStopobjectisamemberoftheTabStopscollection.TheTabStopscollectionrepresentsallthetabstopsononeruler.
![Page 328: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/328.jpg)
UsingTheTabstopObject
UseTabStops(index),whereindexisthetabstopindexnumber,toreturnasingleTabStopobject.Thefollowingexampleclearstabstoponeforthetextinshapetwoonslideoneintheactivepresentation.
ActivePresentation.Slides(1).Shapes(2).TextFrame_
.Ruler.TabStops(1).Clear
![Page 329: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/329.jpg)
TagsObjectMultipleobjects Tags
Representsatagoracustompropertythatyoucancreateforashape,slide,orpresentation.EachTagsobjectcontainsthenameofacustompropertyandavalueforthatproperty.
Createtagswhenyouwanttobeabletoselectivelyworkwithspecificmembersofacollection,basedonanattributethatisn'talreadyrepresentedbyabuilt-inproperty.Forexample,ifyouwanttobeabletocategorizeslidesinapresentationbasedonwhatregionofthecountry/regiontheyapplyto,youcouldcreateaRegiontagandassignaRegionvaluetoeachslideinthepresentation.Youcouldthenselectivelyperformanoperationonsomeoftheslides,basedonthevaluesoftheirRegiontags,suchashidingalltheslideswiththeRegionvalue"East."
![Page 330: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/330.jpg)
UsingtheTagsObject
UsetheAddmethodtoaddatagtoanobject.Thefollowingexampleaddsatagwiththename"Region"andwiththevalue"East"toslideoneintheactivepresentation.
ActivePresentation.Slides(1).Tags.Add"Region","East"
UseTags(index),whereindexisthenameofatag,toreturnathetagvalue.ThefollowingexampleteststhevalueoftheRegiontagforallslidesintheactivepresentationandhidesanyslidesthatdon'tpertaintotheEastCoast(denotedbythevalue"East").
ForEachsInActivePresentation.Slides
Ifs.Tags("region")<>"east"Then
s.SlideShowTransition.Hidden=True
EndIf
Next
![Page 331: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/331.jpg)
TextEffectFormatObjectMultipleobjects TextEffectFormat
ContainspropertiesandmethodsthatapplytoWordArtobjects.
![Page 332: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/332.jpg)
UsingtheTextEffectFormatObject
UsetheTextEffectpropertytoreturnaTextEffectFormatobject.ThefollowingexamplesetsthefontnameandformattingforshapeoneonmyDocument.Forthisexampletowork,shapeonemustbeaWordArtobject.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).TextEffect
.FontName="CourierNew"
.FontBold=True
.FontItalic=True
EndWith
![Page 333: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/333.jpg)
ShowAll
![Page 334: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/334.jpg)
TextFrameObjectMultipleobjects TextFrame
Multipleobjects
RepresentsthetextframeinaShapeobject.Containsthetextinthetextframeaswellasthepropertiesandmethodsthatcontrolthealignmentandanchoringofthetextframe.
![Page 335: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/335.jpg)
UsingtheTextFrameObject
UsetheTextFramepropertytoreturnaTextFrameobject.ThefollowingexampleaddsarectangletomyDocument,addstexttotherectangle,andthensetsthemarginsforthetextframe.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes_
.AddShape(msoShapeRectangle,0,0,250,140).TextFrame
.TextRange.Text="Hereissometesttext"
.MarginBottom=10
.MarginLeft=10
.MarginRight=10
.MarginTop=10
EndWith
UsetheHasTextFramepropertytodeterminewhetherashapehasatextframe,andusetheHasTextpropertytodeterminewhetherthetextframecontainstext,asshowninthefollowingexample.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Ifs.HasTextFrameThen
Withs.TextFrame
If.HasTextThenMsgBox.TextRange.Text
EndWith
EndIf
Next
![Page 336: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/336.jpg)
TextRangeObjectMultipleobjects TextRange
Multipleobjects
Containsthetextthat'sattachedtoashape,aswellaspropertiesandmethodsformanipulatingthetext.
![Page 337: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/337.jpg)
UsingtheTextRangeObject
Thissectiondescribeshowto:
Returnthetextrangeinanyshapeyouspecify.Returnatextrangefromtheselection.Returnparticularcharacters,words,lines,sentences,orparagraphsfromatextrange.Findandreplacetextinatextrange.Inserttext,thedateandtime,ortheslidenumberintoatextrange.Positiontheinsertionpointwhereveryouwantinatextrange.
![Page 338: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/338.jpg)
ReturningaTextRangefromAnyShapeYouSpecify
UsetheTextRangepropertyoftheTextFrameobjecttoreturnaTextRangeobjectforanyshapeyouspecify.UsetheTextpropertytoreturnthestringoftextintheTextRangeobject.ThefollowingexampleaddsarectangletomyDocumentandsetsthetextitcontains.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddShape(msoShapeRectangle,0,0,250,140)_
.TextFrame.TextRange.Text="Hereissometesttext"
BecausetheTextpropertyisthedefaultpropertyoftheTextRangeobject,thefollowingtwostatementsareequivalent.
ActivePresentation.Slides(1).Shapes(1).TextFrame_
.TextRange.Text="Hereissometesttext"
ActivePresentation.Slides(1).Shapes(1).TextFrame_
.TextRange="Hereissometesttext"
UsetheHasTextFramepropertytodeterminewhetherashapehasatextframe,andusetheHasTextpropertytodeterminewhetherthetextframecontainstext.
![Page 339: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/339.jpg)
ReturningaTextRangefromtheSelection
UsetheTextRangepropertyoftheSelectionobjecttoreturnthecurrentlyselectedtext.ThefollowingexamplecopiestheselectiontotheClipboard.
ActiveWindow.Selection.TextRange.Copy
![Page 340: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/340.jpg)
ReturningParticularCharacters,Words,Lines,Sentences,orParagraphsfromaTextRange
UseoneofthefollowingmethodstoreturnaportionofthetextofaTextRangeobject:Characters,Lines,Paragraphs,Runs,Sentences,orWords.
![Page 341: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/341.jpg)
FindingandReplacingTextinaTextRange
UsetheFindandReplacemethodstofindandreplacetextinatextrange.
![Page 342: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/342.jpg)
InsertingText,theDateandTime,ortheSlideNumberintoaTextRange
UseoneofthefollowingmethodstoinsertcharactersintoaTextRangeobject:InsertAfter,InsertBefore,InsertDateTime,InsertSlideNumber,orInsertSymbol.
![Page 343: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/343.jpg)
TextStyleObjectTextStyles TextStyle
Multipleobjects
Representsoneofthreetextstyles:titletext,bodytext,ordefaulttext.EachtextstylecontainsaTextFrameobjectthatdescribeshowtextisplacedwithinthetextboundingbox,aRulerobjectthatcontainstabstopsandoutlineindentformattinginformation,andaTextStyleLevelscollectionthatcontainsoutlinetextformattinginformation.TheTextStyleobjectisamemberoftheTextStylescollection.
![Page 344: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/344.jpg)
UsingtheTextStyleObject
UseTextStyles(index),whereindexiseitherppBodyStyle,ppDefaultStyle,orppTitleStyle,toreturnasingleTextStyleobject.Thefollowingexamplesetsthefontnameandfontsizeforlevel-onebodytextonalltheslidesintheactivepresentation.
WithActivePresentation.SlideMaster_
.TextStyles(ppBodyStyle).Levels(1)
With.Font
.Name="Arial"
.Size=36
EndWith
EndWith
![Page 345: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/345.jpg)
TextStyleLevelObjectTextStyleLevels TextStyleLevel
Multipleobjects
Containscharacterandparagraphformattinginformationforanoutlinelevel.TheTextStyleLevelobjectisamemberoftheTextStyleLevelscollection.TheTextStyleLevelscollectioncontainsoneTextStyleLevelobjectforeachofthefiveoutlinelevels
![Page 346: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/346.jpg)
UsingtheTextStyleLevelObject
UseLevels(index),whereindexisanumberfrom1through5thatcorrespondstotheoutlinelevel,toreturnasingleTextStyleLevelobject.Thefollowingexamplesetsthefontnameandfontsize,thespacebeforeparagraphs,andtheparagraphalignmentforlevel-onebodytextonalltheslidesintheactivepresentation.
WithActivePresentation.SlideMaster_
.TextStyles(ppBodyStyle).Levels(1)
With.Font
.Name="Arial"
.Size=36
EndWith
With.ParagraphFormat
.LineRuleBefore=False
.SpaceBefore=14
.Alignment=ppAlignJustify
EndWith
EndWith
![Page 347: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/347.jpg)
ThreeDFormatObjectMultipleobjects ThreeDFormat
ColorFormat
Representsashape'sthree-dimensionalformatting.
![Page 348: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/348.jpg)
UsingTheThreeDFormatObject
UsetheThreeDpropertytoreturnaThreeDFormatobject.ThefollowingexampleaddsanovaltomyDocumentandthenspecifiesthattheovalbeextrudedtoadepthof50pointsandthattheextrusionbepurple.
SetmyDocument=ActivePresentation.Slides(1)
SetmyShape=myDocument.Shapes_
.AddShape(msoShapeOval,90,90,90,40)
WithmyShape.ThreeD
.Visible=True
.Depth=50
'RGBvalueforpurple
.ExtrusionColor.RGB=RGB(255,100,255)
EndWith
![Page 349: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/349.jpg)
Remarks
Youcannotapplythree-dimensionalformattingtosomekindsofshapes,suchasbeveledshapesormultiple-disjointpaths.MostofthepropertiesandmethodsoftheThreeDFormatobjectforsuchashapewillfail.
![Page 350: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/350.jpg)
TimeLineObjectMultipleobjects TimeLine
Multipleobjects
StoresanimationinformationforaMaster,SlideorSlideRangeobject.
![Page 351: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/351.jpg)
UsingtheTimeLineobject
UsetheTimeLinepropertyoftheMaster,Slide,orSlideRangeobjecttoreturnaTimeLineobject.
TheTimeLineobject'sMainSequencepropertygainsaccesstothemainanimationsequence,whiletheInteractiveSequencespropertygainsaccesstothecollectionofinteractiveanimationsequencesofaslideorsliderange.Toreferenceatimelineobject,usesyntaxsimilartothesecodeexamples:
ActivePresentation.Slides(1).TimeLine.MainSequence
ActivePresentation.SlideMaster.TimeLine.InteractiveSequences
ActiveWindow.Selection.SlideRange.TimeLine.InteractiveSequences
![Page 352: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/352.jpg)
TimingObject
Multipleobjects TimingShape
Representstimingpropertiesforananimationeffect.
![Page 353: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/353.jpg)
UsingtheTimingobject
ToreturnaTimingobject,usetheTimingpropertyoftheAnimationBehaviororEffectobject.Thefollowingexamplesetstimingdurationinformationforthemainanimation.
ActiveWindow.Selection.SlideRange(1).TimeLine_
.MainSequence(1).Timing.Duration=5
Usethefollowingread/writepropertiesoftheTimingobjecttomanipulateanimationtimingeffects.
Usethis... Tochangethis...
Accelerate Percentageofthedurationoverwhichaccelerationshouldtakeplace
AutoReverse Whetheraneffectshouldplayforwardandthenreverse,therebydoublingtheduration
Decelerate Percentageofthedurationoverwhichaccelerationshouldtakeplace
Duration Lengthofanimation(inseconds)RepeatCount NumberoftimestorepeattheanimationRepeatDuration Howlongshouldtherepeatslast(inseconds)Restart Restartbehaviorofananimationnode
RewindAtEnd Whetheranobjectsreturntoitsbeginningpositionafteraneffecthasended
SmoothStart WhetheraneffectaccelerateswhenitstartsSmoothEnd WhetheraneffectdecelerateswhenitendsTriggerDelayTimeDelaytimefromwhenthetriggerisenabled(inseconds)TriggerShape WhichshapeisassociatedwiththetimingeffectTriggerType Howthetimingeffectistriggered
![Page 354: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/354.jpg)
![Page 355: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/355.jpg)
ShowAll
![Page 356: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/356.jpg)
ViewObjectDocumentWindow View
PrintOptions
Representsthecurrenteditingviewinthespecifieddocumentwindow.
![Page 357: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/357.jpg)
UsingtheViewObject
UsetheViewpropertyoftheDocumentWindowobjecttoreturntheViewobject.Thefollowingexamplesetsthesizeofwindowoneandthensetsthezoomtofitthenewwindowsize.
WithWindows(1)
.Height=200
.Width=250
.View.ZoomToFit=True
EndWith
NoteTheViewobjectcanrepresentanyofthedocumentwindowviews:normalview,slideview,outlineview,slidesorterview,notespageview,slidemasterview,handoutmasterview,ornotesmasterview.SomepropertiesandmethodsoftheViewobjectworkonlyincertainviews.Ifyoutrytouseapropertyormethodthat'sinappropriateforaViewobject,anerroroccurs.
![Page 358: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/358.jpg)
WebOptionsObjectPresentation WebOptions
Containspresentation-levelattributesusedbyMicrosoftPowerPointwhenyousaveorpublishacompleteorpartialpresentationasaWebpageoropenaWebpage.Youcanreturnorsetattributeseitherattheapplication(global)leveloratthepresentationlevel.(Notethatattributevaluescanbedifferentfromonepresentationtoanother,dependingontheattributevalueatthetimethepresentationwassaved.)Presentation-levelattributesettingsoverrideapplication-levelattributesettings.Application-levelattributesarecontainedintheDefaultWebOptionsobject.
![Page 359: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/359.jpg)
UsingtheWebOptionsObject
UsetheWebOptionspropertytoreturntheWebOptionsobject.ThefollowingexamplecheckstoseewhetherPortableNetworkGraphics(PNG)isallowedasanimageformatforpresentationone.IfPNGisallowed,itsetsthetextcolorfortheoutlinepanetowhiteandthebackgroundcolorfortheoutlineandslidepanestoblack.
SetobjAppWebOptions=Presentations(1).WebOptions
WithobjAppWebOptions
If.AllowPNG=TrueThen
.FrameColors=ppFrameColorsWhiteTextOnBlack
EndIf
EndWith
![Page 360: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/360.jpg)
ActivateMethodActivatesthespecifiedobject.
expression.Activate
expressionRequired.AnexpressionthatreturnsaDocumentWindow,Pane,OLEFormat,Application,orSlideShowWindowobject.
![Page 361: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/361.jpg)
Example
Thisexampleactivatesthedocumentwindowimmediatelyfollowingtheactivewindowinthedocumentwindoworder.
Windows(2).Activate
![Page 362: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/362.jpg)
ShowAll
![Page 363: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/363.jpg)
AddMethodAddmethodasitappliestotheAddInsobject.
ReturnsanAddInobjectthatrepresentsanadd-infileaddedtothelistofadd-ins.
expression.Add(Filename)
expressionRequired.AnexpressionthatreturnsanAddInsobject.
FilenameRequiredString.Thefullnameofthefile(includingthepathandfilenameextension)thatcontainstheadd-inyouwanttoaddtothelistofadd-ins.
![Page 364: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/364.jpg)
Remarks
Thismethoddoesn'tloadthenewadd-in.YoumustsettheLoadedpropertytoloadtheadd-in.
AddmethodasitappliestotheAnimationBehaviorsobject.
ReturnsanAnimationBehaviorobjectthatrepresentsanewanimationbehavior.
expression.Add(Type,Index)
expressionRequired.AnexpressionthatreturnsanAnimationBehaviorsobject.
TypeRequiredMsoAnimType.Thebehavioroftheanimation.
MsoAnimTypecanbeoneoftheseMsoAnimTypeconstants.msoAnimTypeColormsoAnimTypeMixedmsoAnimTypeMotionmsoAnimTypeNonemsoAnimTypePropertymsoAnimTypeRotationmsoAnimTypeScale
IndexOptionalLong.Theplacementoftheanimationinrelationtootheranimationbehaviors.Thedefaultvalueis-1whichmeansthatiftheIndexargumentisomitted,thenewanimationbehaviorisaddedtotheendofexistinganimationbehaviors.
AddmethodasitappliestotheAnimationPointsandSequencesobjects.
ReturnsanAnimationPointorSequenceobjectthatrepresentsanewanimationpointorsequence.
![Page 365: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/365.jpg)
expression.Add(Index)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
IndexOptionalLong.Thepositionoftheanimationpointorsequenceinrelationtootheranimationpointsorsequences.Thedefaultvalueis-1whichmeansthatiftheIndexargumentisomitted,thenewanimationpointorsequenceisaddedtotheendofexistinganimationpointsorsequence.
AddmethodasitappliestotheColorSchemesobject.
Addsacolorschemetothecollectionofavailableschemes.ReturnsaColorSchemeobjectthatrepresentstheaddedcolorscheme.
expression.Add(Scheme)
expressionRequired.AnexpressionthatreturnsaColorSchemesobject.
SchemeOptionalColorSchemeobject.Thecolorschemetoadd.CanbeaColorSchemeobjectfromanyslideormaster,oranitemintheColorSchemescollectionfromanyopenpresentation.Ifthisargumentisomitted,thefirstColorSchemeobject(thefirststandardcolorscheme)inthespecifiedpresentation'sColorSchemescollectionisused.
![Page 366: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/366.jpg)
Remarks
Thenewcolorschemeisbasedonthecolorsusedonthespecifiedslideormasteroronthecolorsinthespecifiedcolorschemefromanopenpresentation.
TheColorSchemescollectioncancontainupto16colorschemes.IfyouneedtoaddanothercolorschemeandtheColorSchemescollectionisalreadyfull,usetheDeletemethodtoremoveanexistingcolorscheme.
NotethatalthoughMicrosoftPowerPointautomaticallycheckswhetheracolorschemeisaduplicatebeforeaddingitthroughtheuserinterface,itdoesn'tcheckbeforeaddingacolorschemethroughaVisualBasicprocedure.Yourproceduremustdoitsowncheckingtoavoidaddingredundantcolorschemes.
AddmethodasitappliestotheColumnsobject.
Addsanewcolumntoanexistingtable.ReturnsaColumnobjectthatrepresentsthenewtablecolumn.
expression.Add(BeforeColumn)
expressionRequired.AnexpressionthatreturnsaColumnsobject.
BeforeColumnOptionalLong.Theindexnumberspecifyingthetablecolumnbeforewhichthenewcolumnwillbeinserted.ThisargumentmustbeaLongfrom1tothenumberofcolumnsinthetable.Thedefaultvalueis-1whichmeansthatiftheBeforeColumnargumentisomitted,thenthenewcolumnisaddedasthelastcolumninthetable.
AddmethodasitappliestotheCommentsobject.
ReturnsaCommentobjectthatrepresentsanewcommentaddedtoaslide.
expression.Add(Left,Top,Author,AuthorInitials,Text)
expressionRequired.AnexpressionthatreturnsaCommentsobject.
LeftRequiredSingle.Theposition,measuredinpoints,oftheleftedgeofthe
![Page 367: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/367.jpg)
comment,relativetotheleftedgeofthepresentation.
TopRequiredSingle.Theposition,measuredinpoints,ofthetopedgeofthecomment,relativetothetopedgeofthepresentation.
AuthorRequiredString.Theauthorofthecomment.
AuthorInitialsRequiredString.Theauthor'sinitials.
TextRequiredString.Thecomment'stext.
AddmethodasitappliestotheDesignsobject.
ReturnsaDesignobjectthatrepresentsanewslidedesign.
expression.Add(designName,Index)
expressionRequired.AnexpressionthatreturnsaDesignsobject.
designNameRequiredString.Thenameofthedesign.
IndexOptionalInteger.Theindexnumberofthedesign.Thedefaultvalueis-1whichmeansthatiftheIndexargumentisomitted,thenthenewslidedesignisaddedattheendofexistingslidedesigns.
AddmethodasitappliestotheExtraColorsobject.
Addsacolortotheextracolorsavailabletoapresentationifthecolorhasn'talreadybeenadded.
expression.Add(Type)
expressionRequired.AnexpressionthatreturnsanExtraColorsobject.
TypeRequiredMsoRGBType.Thered-green-blue(RGB)valueofthecolortobeadded.
AddmethodasitappliestotheNamedSlideShowsobject.
Createsanewnamedslideshowandaddsittothecollectionofnamedslide
![Page 368: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/368.jpg)
showsinthespecifiedpresentation.ReturnsaNamedSlideShowobjectthatrepresentsthenewnamedslideshow.
expression.Add(Name,SafeArrayOfSlideIDs)
expressionRequired.AnexpressionthatreturnsaNamedSlideShowsobject.
NameRequiredString.Thenameoftheslideshow.
SafeArrayOfSlideIDsRequiredVariant.ContainstheuniqueslideIDsoftheslidestobedisplayedinaslideshow.
![Page 369: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/369.jpg)
Remarks
ThenameyouspecifywhenyouaddanamedslideshowisthenameyouuseasanargumenttotheRunmethodtorunthenamedslideshow.
AddmethodasitappliestothePresentationsobject.
Createsapresentation.ReturnsaPresentationobjectthatrepresentsthenewpresentation.
expression.Add(WithWindow)
expressionRequired.AnexpressionthatreturnsaPresentationscollection.
WithWindowOptionalMsoTriState.MsoTruecreatesthepresentationinavisiblewindow.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThenewpresentationisn'tvisible.msoTriStateMixedmsoTriStateTogglemsoTrueDefault.Createsthepresentationinavisiblewindow.
AddmethodasitappliestothePrintRangesobject.
ReturnsaPrintRangeobjectthatrepresentsaconsecutiverunofslidestobeprinted.
expression.Add(Start,End)
expressionRequired.AnexpressionthatreturnsaPrintRangesobject.
StartRequiredLong.Thefirstslideintherangeofslidestobeprinted.MustbelessthanorequaltothevalueoftheEndargument.
EndRequiredLong.Thelastslideintherangeofslidestobeprinted.Mustbe
![Page 370: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/370.jpg)
greaterthanorequaltothevalueoftheStartargument.
![Page 371: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/371.jpg)
Remarks
TheRangeTypepropertyofthePrintOptionsobjectmustbesettoppPrintSlideRangefortherangesinthePrintRangescollectiontobeapplied.
Ifyoudon'twanttoprintanentirepresentation,addprintrangestospecifywhichslidesyouwanttoprint.Youmustaddoneprintrangeforeachconsecutiverunofslidestobeprinted.Forexample,ifyouwanttoprintslide1,slides3through5,andslides8and9,youmustaddthreeprintrangeobjects.Formoreinformation,seetheexampleforthismethod.
UsetheClearAllmethodtoclearpreviously-definedprintranges.
AddmethodasitappliestotheRowsobject.
ReturnsaRowobjectthatrepresentsanewrowaddedtoanexistingtable.
expression.Add(BeforeRow)
expressionRequired.AnexpressionthatreturnsaRowsobject.
BeforeRowOptionalLong.Theindexnumberspecifyingthetablerowbeforewhichthenewrowwillbeinserted.Thisargumentmustbeanintegervaluefrom1tothenumberofrowsinthetable.Thedefaultvalueis-1whichmeansthatiftheBeforeRowargumentisomitted,thenthenewrowisaddedasthelastrowinthetable.
AddmethodasitappliestotheSlidesobject.
Createsanewslideandaddsittothecollectionofslidesinthespecifiedpresentation.ReturnsaSlideobjectthatrepresentsthenewslide.
expression.Add(Index,Layout)
expressionRequired.AnexpressionthatreturnsaSlidescollection.
IndexRequiredLong.TheindexnumberthenewslidewillhavewithintheSlidescollection.Thisvaluecannotexceedthenumberofexistingslides+1.If
![Page 372: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/372.jpg)
setto1,thenewslidebecomesthefirstslideinthepresentation.
LayoutRequiredPpSlideLayout.Thetypeofslidetocreate.
PpSlideLayoutcanbeoneofthesePpSlideLayoutconstants.ppLayoutBlankppLayoutChartppLayoutChartAndTextppLayoutClipartAndTextppLayoutClipArtAndVerticalTextppLayoutFourObjectsppLayoutLargeObjectppLayoutMediaClipAndTextppLayoutMixedppLayoutObjectppLayoutObjectAndTextppLayoutObjectOverTextppLayoutOrgchartppLayoutTableppLayoutTextppLayoutTextAndChartppLayoutTextAndClipartppLayoutTextAndMediaClipppLayoutTextAndObjectppLayoutTextAndTwoObjectsppLayoutTextOverObjectppLayoutTitleppLayoutTitleOnlyppLayoutTwoColumnTextppLayoutTwoObjectsAndTextppLayoutTwoObjectsOverTextppLayoutVerticalTextppLayoutVerticalTitleAndTextppLayoutVerticalTitleAndTextOverChart
![Page 373: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/373.jpg)
Remarks
Toalterthelayoutofanexistingslide,usetheLayoutproperty.
AddmethodasitappliestotheTabStopsobject.
Addsatabstoptotherulerforthespecifiedtext.ReturnsaTabStopobjectthatrepresentsthenewtabstop.
expression.Add(Type,Position)
expressionRequired.AnexpressionthatreturnsaTabStopscollection.
TypeRequiredPpTabStopType.Specifiesthewaytextwillbealignedwiththenewtabstop.
PpTabStopTypecanbeoneofthesePpTabStopTypeconstants.ppTabStopCenterppTabStopDecimalppTabStopLeftppTabStopMixedppTabStopRight
PositionRequiredSingle.Thepositionofthenewtabstop,inpoints.
AddmethodasitappliestotheTagsobject.
Createsatagforthespecifiedobject.Ifthetagalreadyexists,thismethodreplacestheexistingtagvalue.
expression.Add(Name,Value)
expressionRequired.AnexpressionthatreturnsaTagsobject.
NameRequiredString.Thenewtagname.Use"name"asthestringforthisargumenttosetthevalueofthenametag.
![Page 374: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/374.jpg)
ValueRequiredString.Thenewtagvalue.
![Page 375: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/375.jpg)
Remarks
TheTagsobjectcontainsapairofstrings—thetagnameandthetagvalue—foreachtag.UsetheAddmethodtocreateatag,andusetheNameandValuemethodstoreturnatag'snameandvaluecomponents.
![Page 376: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/376.jpg)
Example
AsitappliestotheAddInsobject.
ThisexampleaddsMyTools.ppatothelistofadd-ins.
SetmyAddIn=Application.AddIns.Add(FileName:="c:\mydocuments\mytools.ppa")
MsgBoxmyAddIn.Name&"hasbeenaddedtothelist"
AsitappliestotheColorSchemesobject.
Thisexampleaddsanewcolorschemetothecollectionofstandardcolorschemesfortheactivepresentation.Thenewcolorschemeisbasedonthecolorsusedinslidetwointheactivepresentation.
WithActivePresentation
SetnewClrScheme=.Slides(2).ColorScheme
.ColorSchemes.AddScheme:=newClrScheme
EndWith
AsitappliestotheColumnsobject.
Thisexamplecreatesanewcolumnbeforecolumnoneinthetablerepresentedbyshapefiveonslidetwo.Itthensetsthewidthofthenewcolumnto72points(oneinch).
WithActivePresentation.Slides(2).Shapes(5).Table
.Columns.Add(1).Width=72
EndWith
AsitappliestotheNamedSlideShowsobject.
ThisexampleaddstotheactivepresentationanamedslideshowQuickShowthatcontainsslides2,7,and9.Theexamplethenrunsthisslideshow.
DimqSlides(1To3)AsLong
WithActivePresentation
![Page 377: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/377.jpg)
With.Slides
qSlides(1)=.Item(2).SlideID
qSlides(2)=.Item(7).SlideID
qSlides(3)=.Item(9).SlideID
EndWith
With.SlideShowSettings
.NamedSlideShows.AddName:="QuickShow",SafeArrayOfSlideIDs:=qSlides
.RangeType=ppShowNamedSlideShow
.SlideShowName="QuickShow"
.Run
EndWith
EndWith
AsitappliestothePresentationsobject.
Thisexamplecreatesapresentation,addsaslidetoit,andthensavesthepresentation.
WithPresentations.Add
.Slides.AddIndex:=1,Layout:=ppLayoutTitle
.SaveAs"Sample"
EndWith
AsitappliestothePrintRangesobject.
Thisexampleclearsanypreviouslydefinedprintrangesandthenprintsslide1,slides3through5,andslides8and9intheactivepresentation.
WithActivePresentation.PrintOptions
.RangeType=ppPrintSlideRange
With.Ranges
.ClearAll
.AddStart:=1,End:=1
.AddStart:=3,End:=5
.AddStart:=8,End:=9
EndWith
EndWith
ActivePresentation.PrintOut
AsitappliestotheRowsobject.
Thisexamplecreatesarowattheendofanexistingtableandsetstheheightof
![Page 378: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/378.jpg)
thenewrowto54points(.75inches).
WithActivePresentation.Slides(2).Shapes(5).Table
.Rows.Add.Height=54
EndWith
AsitappliestotheSlidesobject.
Thisexampleaddsaslidethatcontainsatitleplaceholderatthebeginningoftheactivepresentation.
ActivePresentation.Slides.AddIndex:=1,Layout:=ppLayoutTitleOnly
Thisexampleaddsablankslideattheendoftheactivepresentation.
WithActivePresentation.Slides
.AddIndex:=.Count+1,Layout:=ppLayoutBlank
EndWith
AsitappliestotheTabStopsobject.
Thisexamplesetsaleft-alignedtabstopat2inches(144points)forthetextinshapetwoonslideoneintheactivepresentation.
Application.ActivePresentation.Slides(1).Shapes(2).TextFrame_
.Ruler.TabStops.AddType:=ppTabStopLeft,Position:=144
AsitappliestotheTagsobject.
ThisexampleaddsatagnamedPriorityandsetsthevalueofthenametagforslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Tags
'Setsvaluefornametag
.AddName:="Name",Value:="NewFigures"
'Adds"Priority"tagwithvalue"Low"
.AddName:="Priority",Value:="Low"
EndWith
![Page 379: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/379.jpg)
AsitappliestotheExtraColorsobject.
Thisexampleaddsanextracolortotheactivepresentation(ifthecolorhasn'talreadybeenadded).
ActivePresentation.ExtraColors.AddRGB(Red:=69,Green:=32,Blue:=155)
![Page 380: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/380.jpg)
AddBaselineMethodAddsabaselinetoapresentationtoallowtrackingofchangesforalatermerge.
expression.AddBaseline(FileName)
expressionRequired.AnexpressionthatreturnsaPresentationobject.
FileNameOptionalString.Thefullpathofafiletouseasthebaselineforthispresentation.IfFileNameisnotspecified,thenthepresentationrepresentedbyexpressionisusedasitsownbaseline.
![Page 381: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/381.jpg)
Remarks
Thismethodgeneratesanerrorifthepresentationalreadyhasabaseline,orisamergedauthordocument.
![Page 382: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/382.jpg)
Example
Thefollowinglineofcodeaddsabaselinetotheactivepresentation.
SubSetBaseline()
ActivePresentation.AddBaseline
EndSub
![Page 383: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/383.jpg)
ShowAll
![Page 384: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/384.jpg)
AddCalloutMethodCreatesaborderlesslinecallout.ReturnsaShapeobjectthatrepresentsthenewcallout.
expression.AddCallout(Type,Left,Top,Width,Height)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
TypeRequiredMsoCalloutType.Thetypeofcalloutline.
MsoCalloutTypecanbeoneoftheseMsoCalloutTypeconstants.msoCalloutOneAsingle-segmentcalloutlinethatcanbeeitherhorizontalorvertical.msoCalloutTwoAsingle-segmentcalloutlinethatrotatesfreely.msoCalloutThreeAtwo-segmentline.msoCalloutFourAthree-segmentline.
LeftRequiredSingle.Theposition,measuredinpoints,oftheleftedgeofthecallout'sboundingboxrelativetotheleftedgeoftheslide.
TopRequiredSingle.Theposition,measuredinpoints,ofthetopedgeofthecallout'sboundingboxrelativetothetopedgeoftheslide.
WidthRequiredSingle.Thewidthofthecallout'sboundingbox,measuredinpoints.
HeightRequiredSingle.Theheightofthecallout'sboundingbox,measuredinpoints.
![Page 385: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/385.jpg)
Remarks
YoucaninsertagreatervarietyofcalloutsbyusingtheAddShapemethod.
![Page 386: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/386.jpg)
Example
Thisexampleaddsaborderlesscalloutwithafreely-rotatingone-segmentcalloutlinetomyDocumentandthensetsthecalloutangleto30degrees.
SubNewCallout()
DimsldOneAsSlide
SetsldOne=ActivePresentation.Slides(1)
sldOne.Shapes.AddCallout(Type:=msoCalloutTwo,Left:=50,Top:=50,_
Width:=200,Height:=100).Callout.Angle=msoCalloutAngle30
EndSub
![Page 387: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/387.jpg)
AddCommentMethodAddsacomment.ReturnsaShapeobjectthatrepresentsthenewcomment.
expression.AddComment(Left,Top,Width,Height)
expressionRequired.AnexpressionthatreturnsaShapesobject.
Left,TopOptionalSingle.Theposition(inpoints)oftheupper-leftcornerofthecommentboundingboxrelativetotheupper-leftcornerofthedocument.Bydefault,thecommentisplacedintheupper-leftcornerofthedocument.
Width,HeightOptionalSingle.Thewidthandheightofthecomment,inpoints.Bydefault,thecommentis100pointshighand100pointswide.
![Page 388: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/388.jpg)
Example
Thisexampleaddsacommentthatcontainsthetext"TestComment"tomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddComment(100,100,150,150)
.TextFrame.TextRange.Text=.TextFrame_
.TextRange.Text+"TestComment"
EndWith
![Page 389: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/389.jpg)
ShowAll
![Page 390: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/390.jpg)
AddConnectorMethodCreatesaconnector.ReturnsaShapeobjectthatrepresentsthenewconnector.Whenaconnectorisadded,it'snotconnectedtoanything.UsetheBeginConnectandEndConnectmethodstoattachthebeginningandendofaconnectortoothershapesinthedocument.
expression.AddConnector(Type,BeginX,BeginY,EndX,EndY)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
TypeRequiredMsoConnectorType.Thetypeofconnector.
MsoConnectorTypecanbeoneoftheseMsoConnectorTypeconstants.msoConnectorCurvemsoConnectorElbowmsoConnectorStraightmsoConnectorTypeMixed
BeginXRequiredSingle.Thehorizontalposition,measuredinpoints,oftheconnector'sstartingpointrelativetotheleftedgeoftheslide.
BeginYRequiredSingle.Theverticalposition,measuredinpoints,oftheconnector'sstartingpointrelativetothetopedgeoftheslide.
EndXRequiredSingle.Thehorizontalposition,measuredinpoints,oftheconnector'sendingpointrelativetotheleftedgeoftheslide.
EndYRequiredSingle.Theverticalposition,measuredinpoints,oftheconnector'sendingpointrelativetothetopedgeoftheslide.
![Page 391: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/391.jpg)
Remarks
Whenyouattachaconnectortoashape,thesizeandpositionoftheconnectorareautomaticallyadjusted,ifnecessary.Therefore,ifyou'regoingtoattachaconnectortoothershapes,thepositionanddimensionsyouspecifywhenaddingtheconnectorareirrelevant.
![Page 392: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/392.jpg)
Example
ThisexampleaddstworectanglestomyDocumentandconnectsthemwithacurvedconnector.Notethatwhenyouattachtheconnectortotherectangles,thesizeandpositionoftheconnectorareautomaticallyadjusted;therefore,thepositionanddimensionsyouspecifywhenaddingthecalloutareirrelevant(dimensionsmustbenonzero).
SubNewConnector()
DimshpShapesAsShapes
DimshpFirstAsShape
DimshpSecondAsShape
SetshpShapes=ActivePresentation.Slides(1).Shapes
SetshpFirst=shpShapes.AddShape(Type:=msoShapeRectangle,_
Left:=100,Top:=50,Width:=200,Height:=100)
SetshpSecond=shpShapes.AddShape(Type:=msoShapeRectangle,_
Left:=300,Top:=300,Width:=200,Height:=100)
WithshpShapes.AddConnector(Type:=msoConnectorCurve,BeginX:=0,_
BeginY:=0,EndX:=100,EndY:=100).ConnectorFormat
.BeginConnectConnectedShape:=shpFirst,ConnectionSite:=1
.EndConnectConnectedShape:=shpSecond,ConnectionSite:=1
.Parent.RerouteConnections
EndWith
EndSub
![Page 393: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/393.jpg)
ShowAll
![Page 394: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/394.jpg)
AddCurveMethodCreatesaBéziercurve.ReturnsaShapeobjectthatrepresentsthenewcurve.
expression.AddCurve(SafeArrayOfPoints)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
SafeArrayOfPointsRequiredVariant.Anarrayofcoordinatepairsthatspecifiestheverticesandcontrolpointsofthecurve.Thefirstpointyouspecifyisthestartingvertex,andthenexttwopointsarecontrolpointsforthefirstBéziersegment.Then,foreachadditionalsegmentofthecurve,youspecifyavertexandtwocontrolpoints.Thelastpointyouspecifyistheendingvertexforthecurve.Notethatyoumustalwaysspecify3n+1points,wherenisthenumberofsegmentsinthecurve.
![Page 395: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/395.jpg)
Example
Thefollowingexampleaddsatwo-segmentBéziercurvetomyDocument.
Dimpts(1To7,1To2)AsSingle
pts(1,1)=0
pts(1,2)=0
pts(2,1)=72
pts(2,2)=72
pts(3,1)=100
pts(3,2)=40
pts(4,1)=20
pts(4,2)=50
pts(5,1)=90
pts(5,2)=120
pts(6,1)=60
pts(6,2)=30
pts(7,1)=150
pts(7,2)=90
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddCurveSafeArrayOfPoints:=pts
![Page 396: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/396.jpg)
ShowAll
![Page 397: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/397.jpg)
AddDiagramMethodReturnsaShapeobjectthatrepresentsadiagramaddedtoaslide,slidemaster,orsliderange.
expression.AddDiagram(Type,Left,Top,Width,Height)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
TypeRequiredMsoDiagramType.Thetypeofdiagram.
MsoDiagramTypecanbeoneoftheseMsoDiagramTypeconstants.msoDiagramCycleShowsaprocesswithacontinuouscycle.msoDiagramMixedNotusedwiththismethod.msoDiagramOrgChartShowshierarchicalrelationships.msoDiagramPyramidShowfoundation-basedrelationships.msoDiagramRadialShowsrelationshipsofacoreelement.msoDiagramTargetShowsstepstowardagoal.msoDiagramVennShowsareasofoverlapbetweenelements.
LeftRequiredSingle.Theposition,measuredinpoints,oftheleftedgeofthediagramcanvas'sboundingbox,relativetotheleftedgeofthepage.
TopRequiredSingle.Theposition,measuredinpoints,ofthetopedgeofthediagramcanvas'sboundingbox,relativetothetopedgeofthepage.
WidthRequiredSingle.Thewidth,measuredinpoints,ofthediagramcanvas'sboundingbox.
HeightRequiredSingle.Theheight,measuredinpoints,ofthediagramcanvas'sboundingbox.
![Page 398: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/398.jpg)
Example
Thefollowingexampleaddsapyramiddiagramwithfournodestothefirstslideintheactivepresentation.
SubCreatePyramidDiagram()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
'Addspyramiddiagramandfirstchildnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramPyramid,Left:=10,_
Top:=15,Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addsthreemorechildnodestopyramiddiagram
ForintNodes=1To3
dgnNode.AddNode
NextintNodes
EndSub
![Page 399: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/399.jpg)
ShowAll
![Page 400: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/400.jpg)
AddEffectMethodReturnsanEffectobjectthatrepresentsanewanimationeffectaddedtoasequenceofanimationeffects.
expression.AddEffect(Shape,effectId,Level,trigger,Index)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
ShapeRequiredShapeobject.Theshapetowhichtheanimationeffectisadded.
effectIdRequiredMsoAnimEffect.Theanimationeffecttobeapplied.
MsoAnimEffectcanbeoneoftheseMsoAnimEffectconstants.msoAnimEffectAppearmsoAnimEffectArcUpmsoAnimEffectAscendmsoAnimEffectBlastmsoAnimEffectBlindsmsoAnimEffectBoldFlashmsoAnimEffectBoldRevealmsoAnimEffectBoomerangmsoAnimEffectBouncemsoAnimEffectBoxmsoAnimEffectBrushOnColormsoAnimEffectBrushOnUnderlinemsoAnimEffectCenterRevolvemsoAnimEffectChangeFillColormsoAnimEffectChangeFontmsoAnimEffectChangeFontColormsoAnimEffectChangeFontSizemsoAnimEffectChangeFontStyle
![Page 401: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/401.jpg)
msoAnimEffectChangeLineColormsoAnimEffectCheckerboardmsoAnimEffectCirclemsoAnimEffectColorBlendmsoAnimEffectColorRevealmsoAnimEffectColorWavemsoAnimEffectComplementaryColormsoAnimEffectComplementaryColor2msoAnimEffectContrastingColormsoAnimEffectCrawlmsoAnimEffectCreditsmsoAnimEffectCustommsoAnimEffectDarkenmsoAnimEffectDesaturatemsoAnimEffectDescendmsoAnimEffectDiamondmsoAnimEffectDissolvemsoAnimEffectEaseInmsoAnimEffectExpandmsoAnimEffectFademsoAnimEffectFadedAscendmsoAnimEffectFadedSwivelmsoAnimEffectFadedZoommsoAnimEffectFlashBulbmsoAnimEffectFlashOncemsoAnimEffectFlickermsoAnimEffectFlipmsoAnimEffectFloatmsoAnimEffectFlymsoAnimEffectFoldmsoAnimEffectGlidemsoAnimEffectGrowAndTurnmsoAnimEffectGrowShrink
![Page 402: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/402.jpg)
msoAnimEffectGrowWithColormsoAnimEffectLightenmsoAnimEffectLightSpeedmsoAnimEffectMediaPausemsoAnimEffectMediaPlaymsoAnimEffectMediaStopmsoAnimEffectPath4PointStarmsoAnimEffectPath5PointStarmsoAnimEffectPath6PointStarmsoAnimEffectPath8PointStarmsoAnimEffectPathArcDownmsoAnimEffectPathArcLeftmsoAnimEffectPathArcRightmsoAnimEffectPathArcUpmsoAnimEffectPathBeanmsoAnimEffectPathBounceLeftmsoAnimEffectPathBounceRightmsoAnimEffectPathBuzzsawmsoAnimEffectPathCirclemsoAnimEffectPathCrescentMoonmsoAnimEffectPathCurvedSquaremsoAnimEffectPathCurvedXmsoAnimEffectPathCurvyLeftmsoAnimEffectPathCurvyRightmsoAnimEffectPathCurvyStarmsoAnimEffectPathDecayingWavemsoAnimEffectPathDiagonalDownRightmsoAnimEffectPathDiagonalUpRightmsoAnimEffectPathDiamondmsoAnimEffectPathDownmsoAnimEffectPathEqualTrianglemsoAnimEffectPathFigure8FourmsoAnimEffectPathFootball
![Page 403: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/403.jpg)
msoAnimEffectPathFunnelmsoAnimEffectPathHeartmsoAnimEffectPathHeartbeatmsoAnimEffectPathHexagonmsoAnimEffectPathHorizontalFigure8msoAnimEffectPathInvertedSquaremsoAnimEffectPathInvertedTrianglemsoAnimEffectPathLeftmsoAnimEffectPathLoopdeLoopmsoAnimEffectPathNeutronmsoAnimEffectPathOctagonmsoAnimEffectPathParallelogrammsoAnimEffectPathPeanutmsoAnimEffectPathPentagonmsoAnimEffectPathPlusmsoAnimEffectPathPointyStarmsoAnimEffectPathRightTrianglemsoAnimEffectPathSCurve1msoAnimEffectPathSCurve2msoAnimEffectPathSineWavemsoAnimEffectPathSpiralLeftmsoAnimEffectPathSpiralRightmsoAnimEffectPathSpringmsoAnimEffectPathSquaremsoAnimEffectPathStairsDownmsoAnimEffectPathSwooshmsoAnimEffectPathTeardropmsoAnimEffectPathTrapezoidmsoAnimEffectPathTurnDownmsoAnimEffectPathTurnRightmsoAnimEffectPathTurnUpmsoAnimEffectPathTurnUpRightmsoAnimEffectPathVerticalFigure8
![Page 404: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/404.jpg)
msoAnimEffectPathWavemsoAnimEffectPathZigzagmsoAnimEffectPeekmsoAnimEffectPinwheelmsoAnimEffectPlusmsoAnimEffectRandomBarsmsoAnimEffectRandomEffectsmsoAnimEffectRiseUpmsoAnimEffectShimmermsoAnimEffectSlingmsoAnimEffectSpinmsoAnimEffectSpinnermsoAnimEffectSpiralmsoAnimEffectSplitmsoAnimEffectStretchmsoAnimEffectStretchymsoAnimEffectStripsmsoAnimEffectStyleEmphasismsoAnimEffectSwishmsoAnimEffectSwivelmsoAnimEffectTeetermsoAnimEffectThinLinemsoAnimEffectTransparencymsoAnimEffectUnfoldmsoAnimEffectVerticalGrowmsoAnimEffectWavemsoAnimEffectWedgemsoAnimEffectWheelmsoAnimEffectWhipmsoAnimEffectWipemsoAnimEffectZipmsoAnimEffectZoom
![Page 405: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/405.jpg)
LevelOptionalMsoAnimateByLevel.Forcharts,diagrams,ortext,theleveltowhichtheanimationeffectwillbeapplied.ThedefaultvalueismsoAnimationLevelNone.
MsoAnimateByLevelcanbeoneoftheseMsoAnimateByLevelconstants.msoAnimateChartAllAtOncemsoAnimateChartByCategorymsoAnimateChartByCategoryElementsmsoAnimateChartBySeriesmsoAnimateChartBySeriesElementsmsoAnimateDiagramAllAtOncemsoAnimateDiagramBreadthByLevelmsoAnimateDiagramBreadthByNodemsoAnimateDiagramClockwisemsoAnimateDiagramClockwiseInmsoAnimateDiagramClockwiseOutmsoAnimateDiagramCounterClockwisemsoAnimateDiagramCounterClockwiseInmsoAnimateDiagramCounterClockwiseOutmsoAnimateDiagramDepthByBranchmsoAnimateDiagramDepthByNodemsoAnimateDiagramDownmsoAnimateDiagramInByRingmsoAnimateDiagramOutByRingmsoAnimateDiagramUpmsoAnimateLevelMixedmsoAnimateTextByAllLevelsmsoAnimateTextByFifthLevelmsoAnimateTextByFirstLevelmsoAnimateTextByFourthLevelmsoAnimateTextBySecondLevelmsoAnimateTextByThirdLevelmsoAnimationLevelNone
![Page 406: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/406.jpg)
triggerOptionalMsoAnimTriggerType.Theactionthattriggerstheanimationeffect.ThedefaultvalueismsoAnimTriggerOnPageClick.
MsoAnimTriggerTypecanbeoneoftheseMsoAnimTriggerTypeconstants.msoAnimTriggerAfterPreviousmsoAnimTriggerMixedmsoAnimTriggerNonemsoAnimTriggerOnPageClickmsoAnimTriggerOnShapeClickmsoAnimTriggerWithPrevious
IndexOptionalLong.Thepositionatwhichtheeffectwillbeplacedinthecollectionofanimationeffects.Thedefaultvalueis-1(addedtotheend).
![Page 407: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/407.jpg)
Example
Thefollowingexampleaddsabouncinganimationtothefirstshaperangeonthefirstslide.Thisexampleassumesashaperangecontainingoneormoreshapesisselectedonthefirstslide.
SubAddBouncingAnimation()
DimsldActiveAsSlide
DimshpSelectedAsShape
SetsldActive=ActiveWindow.Selection.SlideRange(1)
SetshpSelected=ActiveWindow.Selection.ShapeRange(1)
'Addabouncinganimation.
sldActive.TimeLine.MainSequence.AddEffect_
Shape:=shpSelected,effectId:=msoAnimEffectBounce
EndSub
![Page 408: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/408.jpg)
ShowAll
![Page 409: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/409.jpg)
AddLabelMethodCreatesalabel.ReturnsaShapeobjectthatrepresentsthenewlabel.
expression.AddLabel(Orientation,Left,Top,Width,Height)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
OrientationRequiredMsoTextOrientation.Thetextorientation.Someoftheseconstantsmaynotbeavailabletoyou,dependingonthelanguagesupport(U.S.English,forexample)thatyou’veselectedorinstalled.
MsoTextOrientationcanbeoneoftheseMsoTextOrientationconstants.msoTextOrientationDownwardmsoTextOrientationHorizontalmsoTextOrientationHorizontalRotatedFarEastmsoTextOrientationMixedmsoTextOrientationUpwardmsoTextOrientationVerticalmsoTextOrientationVerticalFarEast
LeftRequiredSingle.Theposition,measuredinpoints,oftheleftedgeofthelabelrelativetotheleftedgeoftheslide.
TopRequiredSingle.Theposition,measuredinpoints,ofthetopedgeofthelabelrelativetothetopedgeoftheslide.
WidthRequiredSingle.Thewidthofthelabel,measuredinpoints.
HeightRequiredSingle.Theheightofthelabel,measuredinpoints.
![Page 410: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/410.jpg)
Example
Thisexampleaddsaverticallabelthatcontainsthetext"TestLabel"tomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddLabel(Orientation:=msoTextOrientationVerticalFarEast,_
Left:=100,Top:=100,Width:=60,Height:=150).TextFrame_
.TextRange.Text="TestLabel"
![Page 411: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/411.jpg)
AddLineMethodCreatesaline.ReturnsaShapeobjectthatrepresentsthenewline.
expression.AddLine(BeginX,BeginY,EndX,EndY)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
BeginXRequiredSingle.Thehorizontalposition,measuredinpoints,oftheline'sstartingpointrelativetotheleftedgeoftheslide.
BeginYRequiredSingle.Theverticalposition,measuredinpoints,oftheline'sstartingpointrelativetothetopedgeoftheslide.
EndXRequiredSingle.Thehorizontalposition,measuredinpoints,oftheline'sendingpointrelativetotheleftedgeoftheslide.
EndYRequiredSingle.Theverticalposition,measuredinpoints,oftheline'sendingpointrelativetothetopedgeoftheslide.
![Page 412: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/412.jpg)
Example
ThisexampleaddsabluedashedlinetomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(BeginX:=10,BeginY:=10,_
EndX:=250,EndY:=250).Line
.DashStyle=msoLineDashDotDot
.ForeColor.RGB=RGB(50,0,128)
EndWith
![Page 413: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/413.jpg)
AddMediaObjectMethodCreatesamediaobject.ReturnsaShapeobjectthatrepresentsthenewmediaobject.
expression.AddMediaObject(FileName,Left,Top,Width,Height)
expressionRequired.AnexpressionthatreturnsaShapesobject.
FileNameRequiredString.Thefilefromwhichthemediaobjectistobecreated.Ifthepathisn'tspecified,thecurrentworkingfolderisused.
Left,TopOptionalSingle.Theposition(inpoints)oftheupper-leftcornerofthemediaobject'sboundingboxrelativetotheupper-leftcornerofthedocument.
Width,HeightOptionalSingle.Thewidthandheightofthemediaobject'sboundingbox,inpoints.
![Page 414: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/414.jpg)
Example
Thisexampleaddsthemovienamed"Clock.avi"tomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddMediaObjectFileName:="C:\WINNT\clock.avi",_
Left:=5,Top:=5,Width:=100,Height:=100
![Page 415: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/415.jpg)
ShowAll
![Page 416: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/416.jpg)
AddNodeMethodAddNodemethodasitappliestotheDiagramNodeChildrenobject.
AddsaDiagramNodeobjecttoacollectionofchilddiagramnodes.
expression.AddNode(Index)
expressionRequired.AnexpressionthatreturnsaDiagramNodeChildrenobject.
IndexOptionalVariant.Theindexlocationofwheretoaddthenewdiagramnode;0addsbeforeallnodes;-1addsafterallnodes;anyotherIndexwilladdafterthatnodeinthecollection.
AddNodemethodasitappliestotheDiagramNodeobject.
ReturnsaDiagramNodeobjectthatrepresentsanodeaddedtoadiagram.
expression.AddNode(Pos)
expressionRequired.AnexpressionthatreturnsaDiagramNodeobject.
PosOptionalMsoRelativeNodePosition.Specifieswherethenodewillbeadded,relativetothecallingnode.
MsoRelativeNodePositioncanbeoneoftheseMsoRelativeNodePositionconstants.msoAfterLastSiblingmsoAfterNodedefaultmsoBeforeFirstSiblingmsoBeforeNode
![Page 417: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/417.jpg)
Example
Thefollowingexampleaddsnodestoanewly-createddiagram.
SubCreatePyramidDiagram()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
'Addsthepyramiddiagramandfirstnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramPyramid,Left:=10,_
Top:=15,Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addsthreemorenodestopyramiddiagram
ForintNodes=1To3
dgnNode.AddNode
NextintNodes
EndSub
![Page 418: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/418.jpg)
ShowAll
![Page 419: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/419.jpg)
AddNodesMethodInsertsanewsegmentattheendofthefreeformthat'sbeingcreated,andaddsthenodesthatdefinethesegment.Youcanusethismethodasmanytimesasyouwanttoaddnodestothefreeformyou'recreating.Whenyoufinishaddingnodes,usetheConvertToShapemethodtocreatethefreeformyou'vejustdefined.Toaddnodestoafreeformafterit'sbeencreated,usetheInsertmethodoftheShapeNodescollection.
expression.AddNodes(SegmentType,EditingType,X1,Y1,X2,Y2,X3,Y3)
expressionRequired.AnexpressionthatreturnsaFreeformBuilderobject.
SegmentTypeRequiredMsoSegmentType.Thetypeofsegmenttobeadded.
MsoSegmentTypecanbeoneoftheseMsoSegmentTypeconstants.msoSegmentCurvemsoSegmentLine
EditingTypeRequiredMsoEditingType.Theeditingpropertyofthevertex.IfSegmentTypeismsoSegmentLine,EditingTypemustbemsoEditingAuto.
MsoEditingTypecanbeoneoftheseMsoEditingTypeconstants(cannotbemsoEditingSmoothormsoEditingSymmetric).msoEditingAutomsoEditingCorner
X1RequiredSingle.IftheEditingTypeofthenewsegmentismsoEditingAuto,thisargumentspecifiesthehorizontaldistance(inpoints)fromtheupper-leftcornerofthedocumenttotheendpointofthenewsegment.IftheEditingTypeofthenewnodeismsoEditingCorner,thisargumentspecifiesthehorizontaldistance(inpoints)fromtheupper-leftcornerofthedocumenttothefirstcontrolpointforthenewsegment.
Y1RequiredSingle.IftheEditingTypeofthenewsegmentismsoEditingAuto,thisargumentspecifiestheverticaldistance(inpoints)from
![Page 420: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/420.jpg)
theupper-leftcornerofthedocumenttotheendpointofthenewsegment.IftheEditingTypeofthenewnodeismsoEditingCorner,thisargumentspecifiestheverticaldistance(inpoints)fromtheupper-leftcornerofthedocumenttothefirstcontrolpointforthenewsegment.
X2OptionalSingle.IftheEditingTypeofthenewsegmentismsoEditingCorner,thisargumentspecifiesthehorizontaldistance(inpoints)fromtheupper-leftcornerofthedocumenttothesecondcontrolpointforthenewsegment.IftheEditingTypeofthenewsegmentismsoEditingAuto,don'tspecifyavalueforthisargument.
Y2OptionalSingle.IftheEditingTypeofthenewsegmentismsoEditingCorner,thisargumentspecifiestheverticaldistance(inpoints)fromtheupper-leftcornerofthedocumenttothesecondcontrolpointforthenewsegment.IftheEditingTypeofthenewsegmentismsoEditingAuto,don'tspecifyavalueforthisargument.
X3OptionalSingle.IftheEditingTypeofthenewsegmentismsoEditingCorner,thisargumentspecifiesthehorizontaldistance(inpoints)fromtheupper-leftcornerofthedocumenttotheendpointofthenewsegment.IftheEditingTypeofthenewsegmentismsoEditingAuto,don'tspecifyavalueforthisargument.
Y3OptionalSingle.IftheEditingTypeofthenewsegmentismsoEditingCorner,thisargumentspecifiestheverticaldistance(inpoints)fromtheupper-leftcornerofthedocumenttotheendpointofthenewsegment.IftheEditingTypeofthenewsegmentismsoEditingAuto,don'tspecifyavalueforthisargument.
![Page 421: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/421.jpg)
Example
Thisexampleaddsafreeformwithfiveverticestothefirstslideintheactivepresentation.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.BuildFreeform(msoEditingCorner,360,200)
.AddNodesSegmentType:=msoSegmentCurve,EditingType:=msoEditingCorner,_
X1:=380,Y1:=230,X2:=400,Y2:=250,X3:=450,Y3:=300
.AddNodesSegmentType:=msoSegmentCurve,EditingType:=msoEditingAuto,_
X1:=480,Y1:=200
.AddNodesSegmentType:=msoSegmentLine,EditingType:=msoEditingAuto,_
X1:=480,Y1:=400
.AddNodesSegmentType:=msoSegmentLine,EditingType:=msoEditingAuto,_
X1:=360,Y1:=200
.ConvertToShape
EndWith
![Page 422: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/422.jpg)
AddPeriodsMethodAddsaperiodattheendofeachparagraphinthespecifiedtext.
expression.AddPeriods
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
![Page 423: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/423.jpg)
Remarks
Thismethoddoesn'taddanotherperiodattheendofaparagraphthatalreadyendswithaperiod.
![Page 424: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/424.jpg)
Example
Thisexampleaddsaperiodattheendofeachparagraphinshapetwoonslideoneintheactivepresentation.
Application.ActivePresentation.Slides(1).Shapes(2).TextFrame_
.TextRange.AddPeriods
![Page 425: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/425.jpg)
ShowAll
![Page 426: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/426.jpg)
AddPictureMethodCreatesapicturefromanexistingfile.ReturnsaShapeobjectthatrepresentsthenewpicture.
expression.AddPicture(FileName,LinkToFile,SaveWithDocument,Left,Top,Width,Height)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
FileNameRequiredString.ThefilefromwhichtheOLEobjectistobecreated.
LinkToFileRequiredMsoTriState.Determineswhetherthepicturewillbelinkedtothefilefromwhichitwascreated.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseMakesthepictureanindependentcopyofthefile.msoTriStateMixedmsoTriStateTogglemsoTrueLinksthepicturetothefilefromwhichitwascreated.
SaveWithDocumentRequiredMsoTriState.Determineswhetherthelinkedpicturewillbesavedwiththedocumentintowhichit'sinserted.ThisargumentmustbemsoTrueifLinkToFileismsoFalse.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseStoresonlythelinkinformationinthedocument.msoTriStateMixedmsoTriStateTogglemsoTrueSavesthelinkedpicturewiththedocumentintowhichit'sinserted.
![Page 427: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/427.jpg)
LeftRequiredSingle.Theposition,measuredinpoints,oftheleftedgeofthepicturerelativetotheleftedgeoftheslide.
TopRequiredSingle.Theposition,measuredinpoints,ofthetopedgeofthepicturerelativetothetopedgeoftheslide.
WidthOptionalSingle.Thewidthofthepicture,measuredinpoints.
HeightOptionalSingle.Theheightofthepicture,measuredinpoints.
![Page 428: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/428.jpg)
Example
ThisexampleaddsapicturecreatedfromthefileMusic.bmptomyDocument.TheinsertedpictureislinkedtothefilefromwhichitwascreatedandissavedwithmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddPictureFileName:="c:\microsoftoffice\"&_
"clipart\music.bmp",LinkToFile:=msoTrue,SaveWithDocument:=msoTrue,_
Left:=100,Top:=100,Width:=70,Height:=70
![Page 429: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/429.jpg)
ShowAll
![Page 430: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/430.jpg)
AddPlaceholderMethodRestoresapreviouslydeletedplaceholderonaslide.ReturnsaShapeobjectthatrepresentstherestoredplaceholder.
NoteIfyouhaven'tpreviouslydeletedthespecifiedplaceholder,thismethodcausesanerror.
expression.AddPlaceholder(Type,Left,Top,Width,Height)
expressionRequired.AnexpressionthatreturnsaShapesobject.
TypeRequiredPpPlaceholderType.Thetypeofplaceholder.PlaceholdersoftypeppPlaceholderVerticalBodyorppPlaceholderVerticalTitlearefoundonlyonslidesoflayouttypeppLayoutVerticalText,ppLayoutClipArtAndVerticalText,ppLayoutVerticalTitleAndText,orppLayoutVerticalTitleAndTextOverChart.Youcannotcreateslideswithanyoftheselayoutsfromtheuserinterface;youmustcreatethemprogrammaticallybyusingtheAddmethodorbysettingtheLayoutpropertyofanexistingslide.
PpPlaceholderTypecanbeoneofthesePpPlaceholderTypeconstants.ppPlaceholderBitmapppPlaceholderBodyppPlaceholderCenterTitleppPlaceholderChartppPlaceholderDateppPlaceholderFooterppPlaceholderHeaderppPlaceholderMediaClipppPlaceholderMixedppPlaceholderObjectppPlaceholderOrgChartppPlaceholderSlideNumberppPlaceholderSubtitle
![Page 431: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/431.jpg)
ppPlaceholderTableppPlaceholderTitleppPlaceholderVerticalBodyppPlaceholderVerticalTitle
Left,TopOptionalSingle.Theposition(inpoints)oftheupper-leftcorneroftheplaceholderrelativetotheupper-leftcornerofthedocument.
Width,HeightOptionalSingle.Thewidthandheightoftheplaceholder,inpoints.
![Page 432: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/432.jpg)
Remarks
Ifmorethanoneplaceholderofaspecifiedtypehasbeendeletedfromtheslide,theAddPlaceholdermethodwilladdthembacktotheslide,onebyone,startingwiththeplaceholderthathasthelowestoriginalindexnumber.
![Page 433: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/433.jpg)
Example
Supposethatslidetwointheactivepresentationoriginallyhadatitleatthetopoftheslidethat'sbeendeleted,eithermanuallyorwiththefollowinglineofcode.
ActivePresentation.Slides(2).Shapes.Placeholders(1).Delete
Thisexamplerestoresthedeletedplaceholdertoslidetwo.
Application.ActivePresentation.Slides(2)_
.Shapes.AddPlaceholderppPlaceholderTitle
![Page 434: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/434.jpg)
ShowAll
![Page 435: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/435.jpg)
AddPolylineMethodCreatesanopenpolylineoraclosedpolygondrawing.ReturnsaShapeobjectthatrepresentsthenewpolylineorpolygon.
expression.AddPolyline(SafeArrayOfPoints)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
SafeArrayOfPointsRequiredVariant.Anarrayofcoordinatepairsthatspecifiesthepolylinedrawing'svertices.
![Page 436: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/436.jpg)
Remarks
Toformaclosedpolygon,assignthesamecoordinatestothefirstandlastverticesinthepolylinedrawing.
![Page 437: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/437.jpg)
Example
ThisexampleaddsatriangletomyDocument.Becausethefirstandlastpointshavethesamecoordinates,thepolygonisclosedandfilled.Thecolorofthetriangle'sinteriorwillbethesameasthedefaultshape'sfillcolor.
DimtriArray(1To4,1To2)AsSingle
triArray(1,1)=25
triArray(1,2)=100
triArray(2,1)=100
triArray(2,2)=150
triArray(3,1)=150
triArray(3,2)=50
triArray(4,1)=25'Lastpointhassamecoordinatesasfirst
triArray(4,2)=100
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddPolylineSafeArrayOfPoints:=triArray
![Page 438: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/438.jpg)
ShowAll
![Page 439: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/439.jpg)
AddShapeMethodCreatesanAutoShape.ReturnsaShapeobjectthatrepresentsthenewAutoShape.
expression.AddShape(Type,Left,Top,Width,Height)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
TypeRequiredMsoAutoShapeType.SpecifiesthetypeofAutoShapetocreate.
MsoAutoShapeTypecanbeoneoftheseMsoAutoShapeTypeconstants.msoShapeFlowchartConnectormsoShapeFlowchartDatamsoShapeFlowchartDecisionmsoShapeFlowchartDelaymsoShapeFlowchartDirectAccessStoragemsoShapeFlowchartDisplaymsoShapeFlowchartDocumentmsoShapeFlowchartExtractmsoShapeFlowchartInternalStoragemsoShapeFlowchartMagneticDiskmsoShapeFlowchartManualInputmsoShapeFlowchartManualOperationmsoShapeFlowchartMergemsoShapeFlowchartMultidocumentmsoShapeFlowchartOffpageConnectormsoShapeFlowchartOrmsoShapeFlowchartPredefinedProcessmsoShapeFlowchartPreparationmsoShapeFlowchartProcess
![Page 440: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/440.jpg)
msoShapeFlowchartPunchedTapemsoShapeFlowchartSequentialAccessStoragemsoShapeFlowchartSortmsoShapeFlowchartStoredDatamsoShapeFlowchartSummingJunctionmsoShapeFlowchartTerminatormsoShapeFoldedCornermsoShapeHeartmsoShapeHexagonmsoShapeHorizontalScrollmsoShapeIsoscelesTrianglemsoShapeLeftArrowmsoShapeLeftArrowCalloutmsoShapeLeftBracemsoShapeLeftBracketmsoShapeLeftRightArrowmsoShapeLeftRightArrowCalloutmsoShapeLeftRightUpArrowmsoShapeLeftUpArrowmsoShapeLightningBoltmsoShapeLineCallout1msoShapeLineCallout1AccentBarmsoShapeLineCallout1BorderandAccentBarmsoShapeLineCallout1NoBordermsoShapeLineCallout2msoShapeLineCallout2AccentBarmsoShapeLineCallout2BorderandAccentBarmsoShapeLineCallout2NoBordermsoShapeLineCallout3msoShapeLineCallout3AccentBarmsoShapeLineCallout3BorderandAccentBarmsoShapeLineCallout3NoBordermsoShapeLineCallout4
![Page 441: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/441.jpg)
msoShapeLineCallout4AccentBarmsoShapeLineCallout4BorderandAccentBarmsoShapeLineCallout4NoBordermsoShapeMixedmsoShapeMoonmsoShapeNoSymbolmsoShapeNotchedRightArrowmsoShapeNotPrimitivemsoShapeOctagonmsoShapeOvalmsoShapeOvalCalloutmsoShapeParallelogrammsoShapePentagonmsoShapePlaquemsoShapeQuadArrowmsoShapeQuadArrowCalloutmsoShapeRectanglemsoShapeRectangularCalloutmsoShapeRegularPentagonmsoShapeRightArrowmsoShapeRightArrowCalloutmsoShapeRightBracemsoShapeRightBracketmsoShapeRightTrianglemsoShapeRoundedRectanglemsoShapeRoundedRectangularCalloutmsoShapeSmileyFacemsoShapeStripedRightArrowmsoShapeSunmsoShapeTrapezoidmsoShapeUpArrowmsoShapeUpArrowCalloutmsoShapeUpDownArrow
![Page 442: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/442.jpg)
msoShapeUpDownArrowCalloutmsoShapeUpRibbonmsoShapeUTurnArrowmsoShapeVerticalScrollmsoShapeWavemsoShapeFlowchartCollatemsoShape16pointStarmsoShape24pointStarmsoShape32pointStarmsoShape4pointStarmsoShape5pointStarmsoShape8pointStarmsoShapeActionButtonBackorPreviousmsoShapeActionButtonBeginningmsoShapeActionButtonCustommsoShapeActionButtonDocumentmsoShapeActionButtonEndmsoShapeActionButtonForwardorNextmsoShapeActionButtonHelpmsoShapeActionButtonHomemsoShapeActionButtonInformationmsoShapeActionButtonMoviemsoShapeActionButtonReturnmsoShapeActionButtonSoundmsoShapeArcmsoShapeBalloonmsoShapeBentArrowmsoShapeBentUpArrowmsoShapeBevelmsoShapeBlockArcmsoShapeCanmsoShapeChevronmsoShapeCircularArrow
![Page 443: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/443.jpg)
msoShapeCloudCalloutmsoShapeCrossmsoShapeCubemsoShapeCurvedDownArrowmsoShapeCurvedDownRibbonmsoShapeCurvedLeftArrowmsoShapeCurvedRightArrowmsoShapeCurvedUpArrowmsoShapeCurvedUpRibbonmsoShapeDiamondmsoShapeDonutmsoShapeDoubleBracemsoShapeDoubleBracketmsoShapeDoubleWavemsoShapeDownArrowmsoShapeDownArrowCalloutmsoShapeDownRibbonmsoShapeExplosion1msoShapeExplosion2msoShapeFlowchartAlternateProcessmsoShapeFlowchartCard
LeftRequiredSingle.Theposition,measuredinpoints,oftheleftedgeoftheAutoShaperelativetotheleftedgeoftheslide.
TopRequiredSingle.Theposition,measuredinpoints,ofthetopedgeoftheAutoShaperelativetothetopedgeoftheslide.
WidthRequiredSingle.ThewidthoftheAutoShape,measuredinpoints.
HeightRequiredSingle.TheheightoftheAutoShape,measuredinpoints.
![Page 444: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/444.jpg)
Remarks
TochangethetypeofanAutoShapethatyou'veadded,settheAutoShapeTypeproperty.
![Page 445: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/445.jpg)
Example
ThisexampleaddsarectangletomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddShapeType:=msoShapeRectangle,_
Left:=50,Top:=50,Width:=100,Height:=200
![Page 446: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/446.jpg)
AddTableMethodAddsatableshapetoaslide.
expression.AddTable(NumRows,NumColumns,Left,Top,Width,Height)
expressionRequired.AnexpressionthatreturnsaShapeobject.
NumRowsRequiredLong.Thenumberofrowsinthetable.
NumColumnsRequiredLong.Thenumberofcolumnsinthetable.
LeftOptionalSingle.Thedistance(inpoints)fromtheleftedgeoftheslidetotheleftedgeofthetable.
TopOptionalSingle.Thedistance(inpoints)fromthetopedgeoftheslidetothetopedgeofthetable.
WidthOptionalSingle.Thewidth(inpoints)ofthenewtable.
HeightOptionalSingle.Theheight(inpoints)ofthenewtable.
![Page 447: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/447.jpg)
Example
Thisexamplecreatesanewtableonslidetwooftheactivepresentation.Thetablehasthreerowsandfourcolumns.Itis10pointsfromtheleftedgeoftheslide,and10pointsfromthetopedge.Thewidthofthenewtableis288points,whichmakeseachofthefourcolumnsoneinchwide(thereare72pointsperinch).Theheightissetto216points,whichmakeseachofthethreerowsoneinchtall.
ActivePresentation.Slides(2).Shapes_
.AddTable(3,4,10,10,288,216)
![Page 448: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/448.jpg)
ShowAll
![Page 449: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/449.jpg)
AddTextboxMethodCreatesatextbox.ReturnsaShapeobjectthatrepresentsthenewtextbox.
expression.AddTextbox(Orientation,Left,Top,Width,Height)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
OrientationRequiredMsoTextOrientation.Thetextorientation.Someoftheseconstantsmaynotbeavailabletoyou,dependingonthelanguagesupport(U.S.English,forexample)thatyou’veselectedorinstalled.
MsoTextOrientationcanbeoneoftheseMsoTextOrientationconstants.msoTextOrientationDownwardmsoTextOrientationHorizontalmsoTextOrientationHorizontalRotatedFarEastmsoTextOrientationMixedmsoTextOrientationUpwardmsoTextOrientationVerticalmsoTextOrientationVerticalFarEast
LeftRequiredSingle.Theposition,measuredinpoints,oftheleftedgeofthetextboxrelativetotheleftedgeoftheslide.
TopRequiredSingle.Theposition,measuredinpoints,ofthetopedgeofthetextboxrelativetothetopedgeoftheslide.
WidthRequiredSingle.Thewidthofthetextbox,measuredinpoints.
HeightRequiredSingle.Theheightofthetextbox,measuredinpoints.
![Page 450: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/450.jpg)
Example
Thisexampleaddsatextboxthatcontainsthetext"TestBox"tomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddTextbox(Type:=msoTextOrientationHorizontal,_
Left:=100,Top:=100,Width:=200,Height:=50).TextFrame_
.TextRange.Text="TestBox"
![Page 451: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/451.jpg)
ShowAll
![Page 452: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/452.jpg)
AddTextEffectMethodCreatesaWordArtobject.ReturnsaShapeobjectthatrepresentsthenewWordArtobject.
expression.AddTextEffect(PresetTextEffect,Text,FontName,FontSize,FontBold,FontItalic,Left,Top)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
PresetTextEffectRequiredMsoPresetTextEffect.Thepresettexteffect.
MsoPresetTextEffectcanbeoneoftheseMsoPresetTextEffectconstants.msoTextEffect1msoTextEffect2msoTextEffect3msoTextEffect4msoTextEffect5msoTextEffect6msoTextEffect7msoTextEffect8msoTextEffect9msoTextEffect10msoTextEffect11msoTextEffect12msoTextEffect13msoTextEffect14msoTextEffect15msoTextEffect16msoTextEffect17msoTextEffect18msoTextEffect19
![Page 453: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/453.jpg)
msoTextEffect20msoTextEffect21msoTextEffect22msoTextEffect23msoTextEffect24msoTextEffect25msoTextEffect26msoTextEffect27msoTextEffect28msoTextEffect29msoTextEffect30msoTextEffectMixed
TextRequiredString.ThetextintheWordArt.
FontNameRequiredString.ThenameofthefontusedintheWordArt.
FontSizeRequiredSingle.Thesize(inpoints)ofthefontusedintheWordArt.
FontBoldRequiredMsoTriState.DetermineswhetherthefontusedintheWordArtissettobold.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueSetsthefontusedintheWordArttobold.
FontItalicRequiredMsoTriState.DetermineswhetherthefontusedintheWordArtissettoitalic.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixed
![Page 454: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/454.jpg)
msoTriStateTogglemsoTrueSetsthefontusedintheWordArttoitalic.
LeftRequiredSingle.Theposition,measuredinpoints,oftheleftedgeoftheWordArt'sboundingboxrelativetotheleftedgeoftheslide.
TopRequiredSingle.Theposition,measuredinpoints,ofthetopedgeoftheWordArt'sboundingboxrelativetothetopedgeoftheslide.
![Page 455: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/455.jpg)
Remarks
WhenyouaddWordArttoadocument,theheightandwidthoftheWordArtareautomaticallysetbasedonthesizeandamountoftextyouspecify.
![Page 456: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/456.jpg)
Example
ThisexampleaddsWordArtthatcontainsthetext"Test"tomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
SetnewWordArt=myDocument.Shapes_
.AddTextEffect(PresetTextEffect:=msoTextEffect1,_
Text:="Test",FontName:="ArialBlack",FontSize:=36,_
FontBold:=msoFalse,FontItalic:=msoFalse,Left:=10,Top:=10)
![Page 457: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/457.jpg)
AddTitleMethodRestoresapreviouslydeletedtitleplaceholdertoaslide.ReturnsaShapeobjectthatrepresentstherestoredtitle.
NoteThismethodwillcauseanerrorifyouhaven'tpreviouslydeletedthetitleplaceholderfromthespecifiedslide.UsetheHasTitlepropertytodeterminewhetherthetitleplaceholderhasbeendeleted.
expression.AddTitle
expressionRequired.AnexpressionthatreturnsaShapesobject.
![Page 458: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/458.jpg)
Example
Thisexamplerestoresthetitleplaceholdertoslideoneintheactivepresentationifthisplaceholderhasbeendeleted.Thetextoftherestoredtitleis"Restoredtitle."
WithActivePresentation.Slides(1)
If.Layout<>ppLayoutBlankThen
With.Shapes
IfNot.HasTitleThen
.AddTitle.TextFrame.TextRange_
.Text="Restoredtitle"
EndIf
EndWith
EndIf
EndWith
![Page 459: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/459.jpg)
AddTitleMasterMethodAddsatitlemastertothespecifiedpresentation.ReturnsaMasterobjectthatrepresentsthetitlemaster.Ifthepresentationalreadyhasatitlemaster,anerroroccurs.
expression.AddTitleMaster
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 460: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/460.jpg)
Example
Thisexampleaddsatitlemastertotheactivepresentationifitdoesn'talreadyhaveone.
WithApplication.ActivePresentation
IfNot.HasTitleMasterThen.AddTitleMaster
EndWith
![Page 461: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/461.jpg)
AddToFavoritesMethodAddsashortcuttotheFavoritesfolderintheWindowsprogramfolderrepresentingeitherthecurrentselectioninthespecifiedpresentation(forthePresentationobject)orthespecifiedhyperlink'stargetdocument(fortheHyperlinkobject).
expression.AddToFavorites
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 462: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/462.jpg)
Remarks
Theshortcutnameisthefriendlynameofthedocument,ifthat'savailable;otherwise,theshortcutnameisascalculatedinHLINK.DLL.
![Page 463: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/463.jpg)
Example
ThisexampleaddsahyperlinktotheactivepresentationtotheFavoritesfolderintheWindowsprogramfolder.
Application.ActivePresentation.AddToFavorites
![Page 464: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/464.jpg)
ShowAll
![Page 465: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/465.jpg)
AlignMethodAlignstheshapesinthespecifiedrangeofshapes.
expression.Align(AlignCmd,RelativeTo)
expressionRequired.AnexpressionthatreturnsaShapeRangeobject.
AlignCmdRequiredMsoAlignCmd.Specifiesthewaytheshapesinthespecifiedshaperangearetobealigned.
MsoAlignCmdcanbeoneoftheseMsoAlignCmdconstants.msoAlignBottomsmsoAlignCentersmsoAlignLeftsmsoAlignMiddlesmsoAlignRightsmsoAlignTops
RelativeToRequiredMsoTriState.Determineswhethershapesarealignedrelativetotheedgeoftheslide.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseAlignsshapesrelativetooneanother.msoTriStateMixedmsoTriStateTogglemsoTrueAlignsshapesrelativetotheedgeoftheslide.
![Page 466: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/466.jpg)
Example
ThisexamplealignstheleftedgesofalltheshapesinthespecifiedrangeinmyDocumentwiththeleftedgeoftheleftmostshapeintherange.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.Range.AlignmsoAlignLefts,msoFalse
![Page 467: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/467.jpg)
ApplyMethodAppliestothespecifiedshapeformattingthat'sbeencopiedbyusingthePickUpmethod.
expression.Apply
expressionRequired.AnexpressionthatreturnsaShapeorShapeRangeobject.
![Page 468: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/468.jpg)
Example
ThisexamplecopiestheformattingofshapeoneonmyDocument,andthenappliesthecopiedformattingtoshapetwo.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument
.Shapes(1).PickUp
.Shapes(2).Apply
EndWith
![Page 469: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/469.jpg)
ApplyTemplateMethodAppliesadesigntemplatetothespecifiedpresentation.
expression.ApplyTemplate(FileName)
expressionRequired.AnexpressionthatreturnsaPresentationobject.
FileNameRequiredString.Specifiesthenameofthedesigntemplate.
NoteIfyourefertoanuninstalledpresentationdesigntemplateinastring,arun-timeerrorisgenerated.ThetemplateisnotinstalledautomaticallyregardlessofyourFeatureInstallpropertysetting.TousetheApplyTemplatemethodforatemplatethatisnotcurrentlyinstalled,youfirstmustinstalltheadditionaldesigntemplates.Todoso,installtheAdditionalDesignTemplatesforPowerPointbyrunningtheMicrosoftOfficeinstallationprogram(availablethroughtheAdd/RemoveProgramsiconinWindowsControlPanel).
![Page 470: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/470.jpg)
Example
Thisexampleappliesthe"Professional"designtemplatetotheactivepresentation.
Application.ActivePresentation.ApplyTemplate_
"c:\programfiles\microsoftoffice\templates"&_
"\presentationdesigns\professional.pot"
![Page 471: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/471.jpg)
ShowAll
![Page 472: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/472.jpg)
ArrangeMethodArrangesallopendocumentwindowsintheworkspace.
expression.Arrange(arrangeStyle)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
arrangeStyleOptionalPpArrangeStyle.Specifieswhethertocascadeortilethewindows.
PpArrangeStylecanbeoneofthesePpArrangeStyleconstants.ppArrangeCascadeppArrangeTileddefault
![Page 473: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/473.jpg)
Example
Thisexamplecreatesanewwindowandthenarrangesallopendocumentwindows.
Application.ActiveWindow.NewWindow
Windows.ArrangeppArrangeCascade
![Page 474: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/474.jpg)
AutomaticLengthMethodSpecifiesthatthefirstsegmentofthecalloutline(thesegmentattachedtothetextcalloutbox)bescaledautomaticallywhenthecalloutismoved.UsetheCustomLengthmethodtospecifythatthefirstsegmentofthecalloutlineretainthefixedlengthreturnedbytheLengthpropertywheneverthecalloutismoved.Appliesonlytocalloutswhoselinesconsistofmorethanonesegment(typesmsoCalloutThreeandmsoCalloutFour).
expression.AutomaticLength
expressionRequired.AnexpressionthatreturnsaCalloutFormatobject.
![Page 475: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/475.jpg)
Remarks
ApplyingthismethodsetstheAutoLengthpropertytoTrue.
![Page 476: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/476.jpg)
Example
ThisexampletogglesbetweenanautomaticallyscalingfirstsegmentandonewithafixedlengthforthecalloutlineforshapeoneonmyDocument.Fortheexampletowork,shapeonemustbeacallout.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).Callout
If.AutoLengthThen
.CustomLength50
Else
.AutomaticLength
EndIf
EndWith
![Page 477: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/477.jpg)
BackgroundMethodSpecifiesthattheshape'sfillshouldmatchtheslidebackground.Ifyouchangetheslidebackgroundafterapplyingthismethodtoafill,thefillwillalsochange.
![Page 478: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/478.jpg)
Remarks
NotethatapplyingtheBackgroundmethodtoashape'sfillisn'tthesameassettingatransparentfillfortheshape,norisitalwaysthesameasapplyingthesamefilltotheshapeasyouapplytothebackground.Thesecondexampledemonstratesthis.
![Page 479: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/479.jpg)
Example
Thisexamplesetsthefillofshapeoneonslideoneintheactivepresentationtomatchtheslidebackground.
ActivePresentation.Slides(1).Shapes(1).Fill.Background
Thisexamplesetsthebackgroundforslideoneintheactivepresentationtoapresetgradient,addsarectangletotheslide,andthenplacesthreeovalsinfrontoftherectangle.Thefirstovalhasafillthatmatchestheslidebackground,thesecondhasatransparentfill,andthethirdhasthesamefillappliedtoitaswasappliedtothebackground.Noticethedifferenceintheappearancesofthesethreeovals.
WithActivePresentation.Slides(1)
.FollowMasterBackground=False
.Background.Fill.PresetGradient_
msoGradientHorizontal,1,msoGradientDaybreak
With.Shapes
.AddShapemsoShapeRectangle,50,200,600,100
.AddShape(msoShapeOval,75,150,150,100)_
.Fill.Background
.AddShape(msoShapeOval,275,150,150,100).Fill_
.Transparency=1
.AddShape(msoShapeOval,475,150,150,100)_
.Fill.PresetGradient_
msoGradientHorizontal,1,msoGradientDaybreak
EndWith
EndWith
![Page 480: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/480.jpg)
BeginConnectMethodAttachesthebeginningofthespecifiedconnectortoaspecifiedshape.Ifthere'salreadyaconnectionbetweenthebeginningoftheconnectorandanothershape,thatconnectionisbroken.Ifthebeginningoftheconnectorisn'talreadypositionedatthespecifiedconnectingsite,thismethodmovesthebeginningoftheconnectortotheconnectingsiteandadjuststhesizeandpositionoftheconnector.UsetheEndConnectmethodtoattachtheendoftheconnectortoashape.
expression.BeginConnect(ConnectedShape,ConnectionSite)
expressionRequired.AnexpressionthatreturnsaConnectorFormatobject.
ConnectedShapeRequiredShapeobject.Theshapetoattachthebeginningoftheconnectorto.ThespecifiedShapeobjectmustbeinthesameShapescollectionastheconnector.
ConnectionSiteRequiredLong.AconnectionsiteontheshapespecifiedbyConnectedShape.Mustbeanintegerbetween1andtheintegerreturnedbytheConnectionSiteCountpropertyofthespecifiedshape.Ifyouwanttheconnectortoautomaticallyfindtheshortestpathbetweenthetwoshapesitconnects,specifyanyvalidintegerforthisargumentandthenusetheRerouteConnectionsmethodaftertheconnectorisattachedtoshapesatbothends.
![Page 481: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/481.jpg)
Remarks
Whenyouattachaconnectortoanobject,thesizeandpositionoftheconnectorareautomaticallyadjusted,ifnecessary.
![Page 482: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/482.jpg)
Example
Thisexampleaddstworectanglestothefirstslideintheactivepresentationandconnectsthemwithacurvedconnector.NoticethattheRerouteConnectionsmethodmakesitirrelevantwhatvaluesyousupplyfortheConnectionSiteargumentsusedwiththeBeginConnectandEndConnectmethods.
SetmyDocument=ActivePresentation.Slides(1)
Sets=myDocument.Shapes
SetfirstRect=s.AddShape(msoShapeRectangle,100,50,200,100)
SetsecondRect=s.AddShape(msoShapeRectangle,300,300,200,100)
Withs.AddConnector(msoConnectorCurve,0,0,100,100)_
.ConnectorFormat
.BeginConnectConnectedShape:=firstRect,ConnectionSite:=1
.EndConnectConnectedShape:=secondRect,ConnectionSite:=1
.Parent.RerouteConnections
EndWith
![Page 483: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/483.jpg)
BeginDisconnectMethodDetachesthebeginningofthespecifiedconnectorfromtheshapeit'sattachedto.Thismethoddoesn'talterthesizeorpositionoftheconnector:thebeginningoftheconnectorremainspositionedataconnectionsitebutisnolongerconnected.UsetheEndDisconnectmethodtodetachtheendoftheconnectorfromashape.
expression.BeginDisconnect
expressionRequired.AnexpressionthatreturnsaConnectorFormatobject.
![Page 484: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/484.jpg)
Example
Thisexampleaddstworectanglestothefirstslideintheactivepresentation,attachesthemwithaconnector,automaticallyreroutestheconnectoralongtheshortestpath,andthendetachestheconnectorfromtherectangles.
SetmyDocument=ActivePresentation.Slides(1)
Sets=myDocument.Shapes
SetfirstRect=s.AddShape(msoShapeRectangle,100,50,200,100)
SetsecondRect=s.AddShape(msoShapeRectangle,300,300,200,100)
Withs.AddConnector(msoConnectorCurve,0,0,0,0).ConnectorFormat
.BeginConnectfirstRect,1
.EndConnectsecondRect,1
.Parent.RerouteConnections
.BeginDisconnect
.EndDisconnect
EndWith
![Page 485: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/485.jpg)
ShowAll
![Page 486: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/486.jpg)
BuildFreeformMethodBuildsafreeformobject.ReturnsaFreeformBuilderobjectthatrepresentsthefreeformasitisbeingbuilt.UsetheAddNodesmethodtoaddsegmentstothefreeform.Afteryouhaveaddedatleastonesegmenttothefreeform,youcanusetheConvertToShapemethodtoconverttheFreeformBuilderobjectintoaShapeobjectthathasthegeometricdescriptionyou'vedefinedintheFreeformBuilderobject.
expression.BuildFreeform(EditingType,X1,Y1)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
EditingTypeRequiredMsoEditingType.Theeditingpropertyofthefirstnode.
MsoEditingTypecanbeoneofthefollowingMsoEditingTypeconstants(cannotbemsoEditingSmoothormsoEditingSymmetric).msoEditingAutomsoEditingCorner
X1RequiredSingle.Thehorizontalposition,measuredinpoints,ofthefirstnodeinthefreeformdrawingrelativetotheleftedgeoftheslide.
Y1RequiredSingle.Theverticalposition,measuredinpoints,ofthefirstnodeinthefreeformdrawingrelativetothetopedgeoftheslide.
![Page 487: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/487.jpg)
Example
ThisexampleaddsafreeformwithfoursegmentstomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.BuildFreeform(EditingType:=msoEditingCorner,_
X1=360,Y1=200)
.AddNodesSegmentType:=msoSegmentCurve,EditingType:=msoEditingCorner,_
X1:=380,Y1:=230,X2:=400,Y2:=250,X3:=450,Y3:=300
.AddNodesSegmentType:=msoSegmentCurve,EditingType:=msoEditingAuto,_
X1:=480,Y1:=200
.AddNodesSegmentType:=msoSegmentLine,EditingType:=msoEditingAuto,_
X1:=480,Y1:=400
.AddNodesSegmentType:=msoSegmentLine,EditingType:=msoEditingAuto,_
X1:=360,Y1:=200
.ConvertToShape
EndWith
![Page 488: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/488.jpg)
CanCheckInMethodTrueifMicrosoftPowerPointcancheckinaspecifiedpresentationtoaserver.Read/writeBoolean.
expression.CanCheckIn
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 489: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/489.jpg)
Remarks
TotakeadvantageofthecollaborationfeaturesbuiltintoPowerPoint,presentationsmustbestoredonaMicrosoftSharePointPortalServer.
![Page 490: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/490.jpg)
Example
Thisexamplecheckstheservertoseeifthespecifiedpresentationcanbecheckedinand,ifitcanbe,closesthepresentationandchecksitbackintoserver.
SubCheckInPresentation(strPresentationAsString)
IfPresentations(strPresentation).CanCheckIn=TrueThen
Presentations(strPresentation).CheckIn
MsgBoxstrPresentation&"hasbeencheckedin."
Else
MsgBoxstrPresentation&"cannotbecheckedin"&_
"atthistime.Pleasetryagainlater."
EndIf
EndSub
Tocallthesubroutineabove,usethefollowingsubroutineandreplacethe"http://servername/workspace/report.ppt"filenamewithanactualfilelocatedonaservermentionedintheRemarkssectionabove.
SubCheckPPTIn()
CallCheckInPresentation(strPresentation:=_
"http://servername/workspace/report.ppt")
EndSub
![Page 491: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/491.jpg)
CanCheckOutMethodTrueifMicrosoftPowerPointcancheckoutaspecifiedpresentationfromaserver.Read/writeBoolean.
expression.CanCheckOut(FileName)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
FileNameRequiredString.Theserverpathandnameofthepresentation.
![Page 492: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/492.jpg)
Remarks
TotakeadvantageofthecollaborationfeaturesbuiltintoPowerPoint,presentationsmustbestoredonaMicrosoftSharePointPortalServer.
![Page 493: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/493.jpg)
Example
Thisexampleverifiesthatapresentationisnotcheckedoutbyanotheruserandthatitcanbecheckedout.Ifthepresentationcanbecheckedout,itcopiesthepresentationtothelocalcomputerforediting.
SubCheckOutPresentation(strPresentationAsString)
IfPresentations.CanCheckOut(strPresentation)=TrueThen
Presentations.CheckOutFileName:=strPresentation
Else
MsgBox"Youareunabletocheckoutthis"&_
"presentationatthistime."
EndIf
EndSub
Tocallthesubroutineabove,usethefollowingsubroutineandreplacethe"http://servername/workspace/report.ppt"filenamewithanactualfilelocatedonaservermentionedintheRemarkssectionabove.
SubCheckPPTOut()
CallCheckOutPresentation(strPresentation:=_
"http://servername/workspace/report.doc")
EndSub
![Page 494: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/494.jpg)
CellMethodReturnsaCellobjectthatrepresentsacellinatable.
expression.Cell(Row,Column)
expressionRequired.AnexpressionthatreturnsaTableobject.
RowRequiredLong.Thenumberoftherowinthetabletoreturn.Canbeanintegerbetween1andthenumberofrowsinthetable.
ColumnRequiredLong.Thenumberofthecolumninthetabletoreturn.Canbeanintegerbetween1andthenumberofcolumnsinthetable.
![Page 495: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/495.jpg)
Example
Thisexamplecreatesa3x3tableonanewslideinanewpresentationandinsertstextintothefirstcellofthetable.
WithPresentations.Add
With.Slides.Add(1,ppLayoutBlank)
.Shapes.AddTable(3,3).Select
.Shapes(1).Table.Cell(1,1).Shape.TextFrame_
.TextRange.Text="Cell1"
EndWith
EndWith
Thisexamplesetsthethicknessofthebottomborderofthecellinrow2,column1totwopoints.
ActivePresentation.Slides(2).Shapes(5).Table_
.Cell(2,1).Borders(ppBorderBottom).Weight=2
![Page 496: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/496.jpg)
ShowAll
![Page 497: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/497.jpg)
ChangeCaseMethodChangesthecaseofthespecifiedtext.
expression.ChangeCase(Type)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
TypeRequiredPpChangeCase.Specifiesthewaythecasewillbechanged.
PpChangeCasecanbeoneofthesePpChangeCaseconstants.ppCaseLowerppCaseSentenceppCaseTitleppCaseToggleppCaseUpper
![Page 498: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/498.jpg)
Example
Thisexamplesetstitlecasecapitalizationforthetitleonslideoneinthetheactivepresentation.
Application.ActivePresentation.Slides(1).Shapes.Title.TextFrame_
.TextRange.ChangeCaseppCaseTitle
![Page 499: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/499.jpg)
CharactersMethodReturnsaTextRangeobjectthatrepresentsthespecifiedsubsetoftextcharacters.Forinformationaboutcountingorloopingthroughthecharactersinatextrange,seetheTextRangeobject.
expression.Characters(Start,Length)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
StartOptionalLong.Thefirstcharacterinthereturnedrange.
LengthOptionalLong.Thenumberofcharacterstobereturned.
![Page 500: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/500.jpg)
Remarks
IfbothStartandLengthareomitted,thereturnedrangestartswiththefirstcharacterandendswiththelastparagraphinthespecifiedrange.
IfStartisspecifiedbutLengthisomitted,thereturnedrangecontainsonecharacter.
IfLengthisspecifiedbutStartisomitted,thereturnedrangestartswiththefirstcharacterinthespecifiedrange.
IfStartisgreaterthanthenumberofcharactersinthespecifiedtext,thereturnedrangestartswiththelastcharacterinthespecifiedrange.
IfLengthisgreaterthanthenumberofcharactersfromthespecifiedstartingcharactertotheendofthetext,thereturnedrangecontainsallthosecharacters.
![Page 501: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/501.jpg)
Example
Thisexamplesetsthetextforshapetwoonslideoneintheactivepresentationandthenmakesthesecondcharacterasubscriptcharacterwitha20-percentoffset.
DimcharRangeAsTextRange
WithApplication.ActivePresentation.Slides(1).Shapes(2)
SetcharRange=.TextFrame.TextRange.InsertBefore("H2O")
charRange.Characters(2).Font.BaselineOffset=-0.2
EndWith
Thisexampleformatseverysubscriptcharacterinshapetwoonslideoneasbold.
WithApplication.ActivePresentation.Slides(1).Shapes(2)_
.TextFrame.TextRange
Fori=1To.Characters.Count
With.Characters(i).Font
If.SubscriptThen.Bold=True
EndWith
Next
EndWith
![Page 502: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/502.jpg)
CheckInMethodReturnsapresentationfromalocalcomputertoaserver,andsetsthelocalfiletoread-onlysothatitcannotbeeditedlocally.
expression.CheckIn(SaveChanges,Comments,MakePublic)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
SaveChangesOptionalBoolean.Truesavesthepresentationtotheserverlocation.ThedefaultvalueisFalse.
CommentsOptionalVariant.Commentsfortherevisionofthepresentationbeingcheckedin(onlyappliesifSaveChangesequalsTrue).
MakePublicOptionalVariant.Trueallowstheusertoperformapublishonthepresentationafterbeingcheckedin.Thissubmitsthedocumentfortheapprovalprocess,whichcaneventuallyresultinaversionofthepresentationbeingpublishedtouserswithread-onlyrightstothepresentation(onlyappliesifSaveChangesequalsTrue).
![Page 503: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/503.jpg)
Remarks
TotakeadvantageofthecollaborationfeaturesbuiltintoMicrosoftPowerPoint,presentationsmustbestoredonaMicrosoftSharePointPortalServer.
![Page 504: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/504.jpg)
Example
Thisexamplecheckstheservertoseeifthespecifiedpresentationcanbecheckedinand,ifso,closesthepresentationandchecksitbackintoserver.
SubCheckInPresentation(strPresentationAsString)
IfPresentations(strPresentation).CanCheckIn=TrueThen
Presentations(strPresentation).CheckIn
MsgBoxstrPresentation&"hasbeencheckedin."
Else
MsgBoxstrPresentation&"cannotbecheckedin"&_
"atthistime.Pleasetryagainlater."
EndIf
EndSub
Tocallthesubroutineabove,usethefollowingsubroutineandreplacethe"http://servername/workspace/report.ppt"filenamewithanactualfilelocatedonaservermentionedintheRemarkssectionabove.
SubCheckInPresentation()
CallCheckInPresentation(strPresentation:=_
"http://servername/workspace/report.ppt")
EndSub
![Page 505: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/505.jpg)
CheckOutMethodCopiesaspecifiedpresentationfromaservertoalocalcomputerforediting.ReturnsaStringthatrepresentsthelocalpathandfilenameofthepresentationcheckedout.
expression.CheckOut(FileName)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
FileNameRequiredString.Theserverpathandnameofthepresentation.
![Page 506: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/506.jpg)
Remarks
TotakeadvantageofthecollaborationfeaturesbuiltintoMicrosoftPowerPoint,presentationsmustbestoredonaMicrosoftSharePointPortalServer.
![Page 507: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/507.jpg)
Example
Thisexampleverifiesthatapresentationisnotcheckedoutbyanotheruserandthatitcanbecheckedout.Ifthepresentationcanbecheckedout,itcopiesthepresentationtothelocalcomputerforediting.
SubCheckOutPresentation(strPresentationAsString)
DimstrFileNameAsString
WithPresentations
If.CanCheckOut(strPresentation)=TrueThen
.CheckOutFileName:=strPresentation
.OpenFileName:=strFileName
Else
MsgBox"Youareunabletocheckoutthis"&_
"presentationatthistime."
EndIf
EndSub
Tocallthesubroutineabove,usethefollowingsubroutineandreplacethe"http://servername/workspace/report.ppt"filenameforanactualfilelocatedonaservermentionedintheRemarkssectionabove.
SubCheckPPTOut()
CallCheckOutPresentation(strPresentation:=_
"http://servername/workspace/report.doc")
EndSub
![Page 508: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/508.jpg)
ClearMethodClearsthespecifiedtabstopfromtheruleranddeletesitfromtheTabStopscollection.
![Page 509: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/509.jpg)
Example
Thisexampleclearsalltabstopsforthetextinshapetwoonslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Shapes(2).TextFrame_
.Ruler.TabStops
Fori=.CountTo1Step-1
.Item(i).Clear
Next
EndWith
![Page 510: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/510.jpg)
ClearAllMethodClearsalltheprintrangesfromthePrintRangescollection.UsetheAddmethodofthePrintRangescollectiontoaddprintrangestothecollection.
expression.ClearAll
expressionRequired.AnexpressionthatreturnsaPrintRangeobject.
![Page 511: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/511.jpg)
Example
Thisexampleclearsanypreviouslydefinedprintrangesintheactivepresentation;createsnewprintrangesthatcontainslide1,slides3through5,andslides8and9;printsthenewlydefinedslideranges;andthenclearsthenewprintranges.
WithActivePresentation.PrintOptions
.RangeType=ppPrintSlideRange
With.Ranges
.ClearAll
.Add1,1
.Add3,5
.Add8,9
.Parent.Parent.PrintOut
.ClearAll
EndWith
EndWith
![Page 512: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/512.jpg)
ShowAll
![Page 513: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/513.jpg)
CloneMethodClonemethodasitappliestotheDesignsobject.
CreatesacopyofaDesignobject.
expression.Clone(pOriginal,Index)
expressionRequired.AnexpressionthatreturnsaDesignsobject.
pOriginalRequiredDesignobject.Theoriginaldesign.
IndexOptionalLong.TheindexlocationintheDesignscollectionintowhichthedesignwillbecopied.IfIndexisomitted,thecloneddesignisaddedtotheendoftheDesignscollection.
ClonemethodasitappliestotheSequenceobject.
CreatesacopyofanEffectobject,andaddsittotheSequencescollectionatthespecifiedindex.
expression.Clone(Effect,Index)
expressionRequired.AnexpressionthatreturnsaSequenceobject.
EffectRequiredEffectobject.Theanimationeffecttobecloned.
IndexOptionalLong.ThepositionatwhichtheclonedanimationeffectwillbeaddedtotheSequencescollection.Thedefaultvalueis-1(addedtotheend).
![Page 514: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/514.jpg)
Example
AsitappliestotheDesignsobject.
Thisexamplecreatesadesignandclonesthenewlycreateddesign.
SubCloneDesign()
DimdsnDesign1AsDesign
DimdsnDesign2
SetdsnDesign1=ActivePresentation.Designs_
.Add(designName:="Design1")
SetdsnDesign2=ActivePresentation.Designs_
.Clone(pOriginal:=dsnDesign1,Index:=1)
EndSub
AsitappliestotheSequenceobject.
Thisexamplecopiesananimationeffect.Thisexampleassumesananimationeffectnamed"effDiamond"exists.
SubCloneEffect()
ActivePresentation.Slides(1).TimeLine.MainSequence_
.CloneEffect:=effDiamond,Index:=-1
EndSub
![Page 515: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/515.jpg)
ShowAll
![Page 516: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/516.jpg)
CloneNodeMethodClonesadiagramnode.
expression.CloneNode(CopyChildren,TargetNode,Pos)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
CopyChildrenRequiredBoolean.Truetoincludethediagramnode'schildren.
TargetNodeRequiredDiagramNodeobject.AnexpressionthatreturnsaDiagramNodethatwillbethesourceforthecloneddiagramnode.
PosOptionalMsoRelativeNodePosition.IfTargetNodeisspecified,wherethenodewillbeadded,relativetoTargetNode.
MsoRelativeNodePositioncanbeoneoftheseMsoRelativeNodePositionconstants.msoAfterLastSiblingmsoAfterNodedefaultmsoBeforeFirstSiblingmsoBeforeNode
![Page 517: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/517.jpg)
Example
Thefollowingexamplecreatesadiagramandclonesthenewest-creatednode.
SubCloneANode()
DimdgnNodeAsDiagramNode
DimTdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
'Addscyclediagramandfirstchildnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes.AddDiagram_
(Type:=msoDiagramCycle,Left:=10,Top:=15,_
Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
SetTdgnNode=newDiagramNode
'Addsthreeadditionalnodestodiagram
ForintNodes=1To3
dgnNode.AddNode
NextintNodes
'Automaticallyformatsthediagram
dgnNode.Diagram.AutoFormat=msoTrue
'Clonesthefirstchildnodewithoutcloningassociatedchildnodes
dgnNode.CloneNodeCopyChildren:=False,TdgnNode
EndSub
![Page 518: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/518.jpg)
CloseMethodClosesthespecifieddocumentwindow,presentation,oropenfreeformdrawing.
CautionWhenyouusethismethod,PowerPointwillcloseanopenpresentationwithoutpromptingtheusertosavetheirwork.Topreventthelossofwork,usetheSavemethodortheSaveAsmethodbeforeyouusetheClosemethod.
expression.Close
expressionRequired.AnexpressionthatreturnsaDocumentWindoworPresentationobject.
![Page 519: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/519.jpg)
Example
Thisexampleclosesallwindowsexcepttheactivewindow.
WithApplication.Windows
Fori=2To.Count
.Item(i).Close
Next
EndWith
ThisexampleclosesPres1.pptwithoutsavingchanges.
WithApplication.Presentations("pres1.ppt")
.Saved=True
.Close
EndWith
Thisexampleclosesallopenpresentations.
WithApplication.Presentations
Fori=.CountTo1Step-1
.Item(i).Close
Next
EndWith
![Page 520: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/520.jpg)
ShowAll
![Page 521: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/521.jpg)
ColorsMethodReturnsanRGBColorobjectthatrepresentsasinglecolorinacolorscheme.
expression.Colors(SchemeColor)
expressionRequired.AnexpressionthatreturnsaColorSchemeobject.
SchemeColorRequiredPpColorSchemeIndex.Theindividualcolorinthespecifiedcolorscheme.
PpColorSchemeIndexcanbeoneofthesePpColorSchemeIndexconstants.ppAccent1ppAccent2ppAccent3ppBackgroundppFillppForegroundppNotSchemeColorppSchemeColorMixedppShadowppTitle
![Page 522: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/522.jpg)
Example
Thisexamplesetsthetitlecolorforslidesoneandthreeintheactivepresentation.
SetmySlides=ActivePresentation.Slides.Range(Array(1,3))
mySlides.ColorScheme.Colors(ppTitle).RGB=RGB(0,255,0)
![Page 523: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/523.jpg)
ShowAll
![Page 524: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/524.jpg)
ConvertMethodConvertsadiagramtoadifferentdiagramtype.
expression.Convert(Type)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
TypeRequiredMsoDiagramType.Thetypeofdiagramtoconvertto.
MsoDiagramTypecanbeoneoftheseMsoDiagramTypeconstants.msoDiagramCyclemsoDiagramMixedmsoDiagramOrgChartmsoDiagramPyramidmsoDiagramRadialmsoDiagramTargetmsoDiagramVenn
![Page 525: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/525.jpg)
Remarks
Thismethodgeneratesanerrorifthevalueofthetargetdiagram'sTypepropertyisanorganizationchart(msoDiagramTypeOrgChart).
![Page 526: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/526.jpg)
Example
Thefollowingexampleaddsapyramiddiagramtoaslideandconvertsittoaradialdiagram.
SubConvertPyramidDiagram()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
'Addspryamiddiagraandfirstchildnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes.AddDiagram_
(Type:=msoDiagramPyramid,Left:=10,Top:=15,_
Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addsthreeadditionalchildnodes
ForintNodes=1To3
dgnNode.AddNode
NextintNodes
'Automaticallyformatsthediagramandconvertsittoaradialdiagram
WithdgnNode.Diagram
.AutoFormat=msoTrue
.ConvertType:=msoDiagramRadial
EndWith
EndSub
![Page 527: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/527.jpg)
ShowAll
![Page 528: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/528.jpg)
ConvertToAfterEffectMethodSpecifieswhataneffectshoulddoafteritisfinished.ReturnsanEffectobjectthatrepresentsanaftereffect.
expression.ConvertToAfterEffect(Effect,After,DimColor,DimSchemeColor)
expressionRequired.AnexpressionthatreturnsaSequenceobject.
EffectRequiredEffectobject.Theeffecttowhichtheaftereffectwillbeadded.
AfterRequiredMsoAnimAfterEffect.Thebehavioroftheaftereffect.
MsoAnimAfterEffectcanbeoneoftheseMsoAnimAfterEffectconstants.msoAnimAfterEffectDimmsoAnimAfterEffectHidemsoAnimAfterEffectHideOnNextClickmsoAnimAfterEffectMixedmsoAnimAfterEffectNone
DimColorOptionalMsoRGBType.Asinglecolortoapplytheaftereffect.
DimSchemeColorOptionalPpColorSchemeIndex.Apredefinedcolorschemetoapplytotheaftereffect.
PpColorSchemeIndexcanbeoneofthesePpColorSchemeIndexconstants.ppAccent1ppAccent2ppAccent3ppBackgroundppFillppForegroundppNotSchemeColordefaultppSchemeColorMixed
![Page 529: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/529.jpg)
ppShadowppTitle
![Page 530: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/530.jpg)
Remarks
DonotuseboththeDimColorandDimSchemeColorargumentsinthesamecalltothismethod.Anaftereffectmayhaveonecolor,oruseapredefinedcolorscheme,butnotboth.
![Page 531: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/531.jpg)
Example
Thefollowingexamplesetsadimcolorforanaftereffectonthefirstshapeonthefirstslideintheactivepresentation.Thisexampleassumethereisashapeonthefirstslide.
SubConvertToDim()
DimshpSelectedAsShape
DimsldActiveAsSlide
DimeffConvertAsEffect
SetsldActive=ActivePresentation.Slides(1)
SetshpSelected=sldActive.Shapes(1)
'Addananimationeffect.
SeteffConvert=sldActive.TimeLine.MainSequence.AddEffect_
(Shape:=shpSelected,effectId:=msoAnimEffectBounce)
'Addadimaftereffect.
SeteffConvert=sldActive.TimeLine.MainSequence.ConvertToAfterEffect
(Effect:=effConvert,After:=msoAnimAfterEffectDim,_
DimColor:=RGB(Red:=255,Green:=255,Blue:=255))
EndSub
![Page 532: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/532.jpg)
ShowAll
![Page 533: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/533.jpg)
ConvertToAnimateBackgroundMethodDetermineswhetherthebackgroundwillanimateseparatelyfrom,orinadditionto,itsaccompanyingtext.ReturnsanEffectobjectrepresentingthenewly-modifiedanimationeffect.
expression.ConvertToAnimateBackground(Effect,AnimateBackground)
expressionRequired.AnexpressionthatreturnsaSequenceobject.
EffectRequiredEffectobject.Theanimationeffecttobeappliedtothebackground.
AnimateBackgroundRequiredMsoTriState.Determineswhetherthetextwillanimateseparatelyfromthebackground.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseAnimatestextseparatelyfromthebackground.msoTriStateMixedmsoTriStateTogglemsoTrueAnimatestextalongwiththebackground.
![Page 534: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/534.jpg)
Example
Thisexamplecreatesatexteffectforthefirstshapeonthefirstslideintheactivepresentation,andanimatesthetextintheshapeseparatelyfromthebackground.Thisexampleassumesthereisashapeonthefirstslide,andthattheshapehastextinsideofit.
SubAnimateText()
DimtimeMainAsTimeLine
DimshpActiveAsShape
SetshpActive=ActivePresentation.Slides(1).Shapes(1)
SettimeMain=ActivePresentation.Slides(1).TimeLine
'Addablasteffecttothetext,andanimatethetextseparately
'fromthebackground.
timeMain.MainSequence.ConvertToAnimateBackground_
Effect:=timeMain.MainSequence.AddEffect(Shape:=shpActive,_
effectid:=msoAnimEffectBlast),_
AnimateBackGround:=msoFalse
EndSub
![Page 535: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/535.jpg)
ShowAll
![Page 536: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/536.jpg)
ConvertToAnimateInReverseMethodDetermineswhethertextwillbeanimatedinreverseorder.ReturnsanEffectobjectrepresentingthetextanimation.
expression.ConvertToAnimateInReverse(Effect,animateInReverse)
expressionRequired.AnexpressionthatreturnsaSequenceobject.
EffectRequiredEffectobject.Theanimationeffecttowhichthereversalwillapply.
animateInReverseRequiredMsoTriState.Determinesthetextanimationorder.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThetextanimatesinnormalorder.msoTriStateMixedmsoTriStateTogglemsoTrueThetextanimatesinreverseorder.
![Page 537: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/537.jpg)
Example
Thisexamplecreatesashapewithtextonaslideandaddsarandomanimationtotheshape,ensuringtheshape'stextanimatesinreverse.
SubAnimateInReverse()
DimsldActiveAsSlide
DimtimeMainAsTimeLine
DimshpRectAsShape
'Createaslide,addarectangularshapetotheslide,and
'accesstheslide'sanimationtimeline.
WithActivePresentation
SetsldActive=.Slides.Add(Index:=1,Layout:=ppLayoutBlank)
SetshpRect=sldActive.Shapes.AddShape(Type:=msoShapeRectangle,_
Left:=100,Top:=100,Width:=300,Height:=150)
SettimeMain=sldActive.TimeLine
EndWith
shpRect.TextFrame.TextRange.Text="Thisisarectangle."
'Addarandomanimationeffecttotherectangle,
'andanimatethetextinreverse.
WithtimeMain.MainSequence
.ConvertToAnimateInReverse_
Effect:=.AddEffect(Shape:=shpRect,effectId:=msoAnimEffectRandom),_
AnimateInReverse:=msoTrue
EndWith
EndSub
![Page 538: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/538.jpg)
ShowAll
![Page 539: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/539.jpg)
ConvertToBuildLevelMethodChangesthebuildlevelinformationforaspecifiedanimationeffect.ReturnsanEffectobjectthatrepresentsthebuildlevelinformation.
expression.ConvertToBuildLevel(Effect,Level)
expressionRequired.AnexpressionthatreturnsaSequenceobject.
EffectRequiredEffectobject.Thespecifiedanimationeffect.
LevelRequiredMsoAnimateByLevel.Theanimationbuildlevel.
MsoAnimateByLevelcanbeoneoftheseMsoAnimateByLevelconstants.msoAnimateChartAllAtOncemsoAnimateChartByCategorymsoAnimateChartByCategoryElementsmsoAnimateChartBySeriesmsoAnimateChartBySeriesElementsmsoAnimateDiagramAllAtOncemsoAnimateDiagramBreadthByLevelmsoAnimateDiagramBreadthByNodemsoAnimateDiagramClockwisemsoAnimateDiagramClockwiseInmsoAnimateDiagramClockwiseOutmsoAnimateDiagramCounterClockwisemsoAnimateDiagramCounterClockwiseInmsoAnimateDiagramCounterClockwiseOutmsoAnimateDiagramDepthByBranchmsoAnimateDiagramDepthByNodemsoAnimateDiagramDownmsoAnimateDiagramInByRingmsoAnimateDiagramOutByRing
![Page 540: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/540.jpg)
msoAnimateDiagramUpmsoAnimateLevelMixedmsoAnimateTextByAllLevelsmsoAnimateTextByFifthLevelmsoAnimateTextByFirstLevelmsoAnimateTextByFourthLevelmsoAnimateTextBySecondLevelmsoAnimateTextByThirdLevelmsoAnimationLevelNone
![Page 541: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/541.jpg)
Remarks
Changingbuildlevelinformationforaneffectinvalidatesanyexistingeffects.
![Page 542: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/542.jpg)
Example
Thefollowingexamplechangesthebuildlevelinformationforananimationeffect,makingtheoriginaleffectinvalid.
SubConvertBuildLevel()
DimsldFirstAsSlide
DimshpFirstAsShape
DimeffFirstAsEffect
DimeffConvertAsEffect
SetsldFirst=ActiveWindow.Selection.SlideRange(1)
SetshpFirst=sldFirst.Shapes(1)
SeteffFirst=sldFirst.TimeLine.MainSequence_
.AddEffect(Shape:=shpFirst,EffectID:=msoAnimEffectAscend)
SeteffConvert=sldFirst.TimeLine.MainSequence_
.ConvertToBuildLevel(Effect:=effFirst,_
Level:=msoAnimateTextByFirstLevel)
EndSub
![Page 543: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/543.jpg)
ConvertToShapeMethodCreatesashapethathasthegeometriccharacteristicsofthespecifiedFreeformBuilderobject.ReturnsaShapeobjectthatrepresentsthenewshape.
NoteYoumustapplytheAddNodesmethodtoaFreeformBuilderobjectatleastoncebeforeyouusetheConvertToShapemethod.
expression.ConvertToShape
expressionRequired.AnexpressionthatreturnsaFreeformBuilderobject.
![Page 544: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/544.jpg)
Example
Thisexampleaddsafreeformwithfiveverticestothefirstslideintheactivepresentation.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.BuildFreeform(msoEditingCorner,360,200)
.AddNodesmsoSegmentCurve,_
msoEditingCorner,380,230,400,250,450,300
.AddNodesmsoSegmentCurve,msoEditingAuto,480,200
.AddNodesmsoSegmentLine,msoEditingAuto,480,400
.AddNodesmsoSegmentLine,msoEditingAuto,360,200
.ConvertToShape
EndWith
![Page 545: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/545.jpg)
ShowAll
![Page 546: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/546.jpg)
ConvertToTextUnitEffectMethodReturnsanEffectobjectthatrepresentshowtextshouldanimate.
expression.ConvertToTextUnitEffect(Effect,unitEffect)
expressionRequired.AnexpressionthatreturnsaSequenceobject.
EffectRequiredEffectobject.Theanimationeffecttowhichthetextuniteffectapplies.
unitEffectRequiredMsoAnimTextUnitEffect.Howthetextshouldanimate.
MsoAnimTextUnitEffectcanbeoneoftheseMsoAnimTextUnitEffectconstants.msoAnimTextUnitEffectByCharactermsoAnimTextUnitEffectByParagraphmsoAnimTextUnitEffectByWordmsoAnimTextUnitEffectMixed
![Page 547: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/547.jpg)
Example
Thisexampleaddsananimationtoagivenshapeandanimatesitsaccompanyingtextbycharacter.
SubNewTextUnitEffect()
DimshpFirstAsShape
DimtmlMainAsTimeLine
SetshpFirst=ActivePresentation.Slides(1).Shapes(1)
SettmlMain=ActivePresentation.Slides(1).TimeLine
tmlMain.MainSequence.ConvertToTextUnitEffect_
Effect:=tmlMain.MainSequence.AddEffect(Shape:=shpFirst,_
EffectID:=msoAnimEffectRandomEffects),_
unitEffect:=msoAnimTextUnitEffectByCharacter
EndSub
![Page 548: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/548.jpg)
CopyMethodCopiesthespecifiedobjecttotheClipboard.
expression.Copy
expressionRequired.AnexpressionthatreturnsaSelection,Shape,ShapeRange,Slide,SlideRange,orTextRangeobject.
![Page 549: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/549.jpg)
Remarks
UsethePastemethodtopastethecontentsoftheClipboard.
![Page 550: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/550.jpg)
Example
ThisexamplecopiestheselectioninwindowonetotheClipboardandthenpastesitintotheviewinwindowtwo.IftheClipboardcontentscannotbepastedintotheviewinwindowtwo—forexample,ifyoutrytopasteashapeintoslidesorterview—thisexamplefails.
Windows(1).Selection.Copy
Windows(2).View.Paste
ThisexamplecopiesshapesoneandtwoonslideoneintheactivepresentationtotheClipboardandthenpastesthecopiesontoslidetwo.
WithActivePresentation
.Slides(1).Shapes.Range(Array(1,2)).Copy
.Slides(2).Shapes.Paste
EndWith
ThisexamplecopiesslideoneintheactivepresentationtotheClipboard.
ActivePresentation.Slides(1).Copy
ThisexamplecopiesthetextinshapeoneonslideoneintheactivepresentationtotheClipboard.
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Copy
![Page 551: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/551.jpg)
ShowAll
![Page 552: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/552.jpg)
CreateNewDocumentMethodCreatesanewWebpresentationassociatedwiththespecifiedhyperlink.
expression.CreateNewDocument(FileName,EditNow,Overwrite)
expressionRequired.AnexpressionthatreturnsaHyperlinkobject.
FileNameRequiredString.Thepathandfilenameofthedocument.
EditNowRequiredMsoTriState.Determineswhetherthedocumentisopenedimmediatelyinitsassociatededitor.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDonotopenthedocumentimmediately.msoTriStateMixedmsoTriStateTogglemsoTrueDefault.Openthedocumentimmediatelyinitsassociatededitortomodifyit.
OverwriteRequiredMsoTriState.Determineswhetheranyexistingfileofthesamenameinthesamefolderisoverwritten.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.Preserveanyexistingfileofthesamenameinthesamefolder,requiringanewfilenametobespecifiedintheFileNameargument.msoTriStateMixedmsoTriStateTogglemsoTrueOverwriteanyexistingfileofthesamenameinthesamefolder.
![Page 553: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/553.jpg)
Example
ThisexamplecreatesanewWebpresentationtobeassociatedwithhyperlinkoneonslideone.ThenewpresentationiscalledBrittany.ppt,anditoverwritesanyfileofthesamenameintheHTMLPresfolder.ThenewpresentationdocumentisloadedintoMicrosoftPowerPointimmediatelyforediting.
ActivePresentation.Slides(1).Hyperlinks(1).CreateNewDocument_
FileName:="C:\HTMLPres\Brittany.ppt",_
EditNow:=msoTrue,_
Overwrite:=msoTrue
![Page 554: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/554.jpg)
CustomDropMethodSetstheverticaldistance(inpoints)fromtheedgeofthetextboundingboxtotheplacewherethecalloutlineattachestothetextbox.ThisdistanceismeasuredfromthetopofthetextboxunlesstheAutoAttachpropertyissettoTrueandthetextboxistotheleftoftheoriginofthecalloutline(theplacethatthecalloutpointsto).Inthiscasethedropdistanceismeasuredfromthebottomofthetextbox.
expression.CustomDrop(Drop)
expressionRequired.AnexpressionthatreturnsaCalloutFormatobject.
DropRequiredSingle.Thedropdistance,inpoints.
![Page 555: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/555.jpg)
Example
Thisexamplesetsthecustomdropdistanceto14points,andspecifiesthatthedropdistancealwaysbemeasuredfromthetop.Fortheexampletowork,shapethreemustbeacallout.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Callout
.CustomDrop14
.AutoAttach=False
EndWith
![Page 556: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/556.jpg)
CustomLengthMethodSpecifiesthatthefirstsegmentofthecalloutline(thesegmentattachedtothetextcalloutbox)retainafixedlengthwheneverthecalloutismoved.UsetheAutomaticLengthmethodtospecifythatthefirstsegmentofthecalloutlinebescaledautomaticallywheneverthecalloutismoved.Appliesonlytocalloutswhoselinesconsistofmorethanonesegment(typesmsoCalloutThreeandmsoCalloutFour).
expression.CustomLength(Length)
expressionRequired.AnexpressionthatreturnsaCalloutFormatobject.
LengthRequiredSingle.Thelengthofthefirstsegmentofthecallout,inpoints.
![Page 557: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/557.jpg)
Remarks
ApplyingthismethodsetstheAutoLengthpropertytoFalseandsetstheLengthpropertytothevaluespecifiedfortheLengthargument.
![Page 558: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/558.jpg)
Example
ThisexampletogglesbetweenanautomaticallyscalingfirstsegmentandonewithafixedlengthforthecalloutlineforshapeoneonmyDocument.Fortheexampletowork,shapeonemustbeacallout.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).Callout
If.AutoLengthThen
.CustomLength50
Else
.AutomaticLength
EndIf
EndWith
![Page 559: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/559.jpg)
CutMethodDeletesthespecifiedobjectandplacesitontheClipboard.
expression.Cut
expressionRequired.AnexpressionthatreturnsaSelection,Shape,ShapeRange,Slide,SlideRange,orTextRangeobject.
![Page 560: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/560.jpg)
Example
ThisexampledeletestheselectioninwindowoneandplacesacopyofitontheClipboard.
Windows(1).Selection.Cut
Thisexampledeletesshapesoneandtwofromslideoneintheactivepresentation,placescopiesofthemontheClipboard,andthenpastesthecopiesontoslidetwo.
WithActivePresentation
.Slides(1).Shapes.Range(Array(1,2)).Cut
.Slides(2).Shapes.Paste
EndWith
ThisexampledeletesslideonefromtheactivepresentationandplacesacopyofitontheClipboard.
ActivePresentation.Slides(1).Cut
ThisexampledeletesthetextinshapeoneonslideoneintheactivepresentationandplacesacopyofitontheClipboard.
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange.Cut
![Page 561: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/561.jpg)
ShowAll
![Page 562: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/562.jpg)
DeleteMethodDeletemethodasitappliestotheShapeNodesobject.
Deletesashapenode.
expression.Delete(Index)
expressionRequired.AnexpressionthatreturnsaShapeNodesobject.
IndexRequiredLong.Specifiesthenodetobedeleted.Thesegmentfollowingthatnodewillalsobedeleted.Ifthenodeisacontrolpointofacurve,thecurveandallofitsnodeswillbedeleted.
DeletemethodasitappliestotheTagsobject.
Deletesatag.
expression.Delete(Name)
expressionRequired.AnexpressionthatreturnsaTagsobject.
NameRequiredString.Specifiesthenameofthetagtobedeleted.
DeletemethodasitappliestotheallotherobjectsintheAppliesTolist.
Deletesthespecifiedobject.
expression.Delete
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolistexceptfortheShapeNodesandTagsobjects.
![Page 563: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/563.jpg)
Remarks
Attemptingtodeletetheonlyexistingroworcolumninatablewillresultinarun-timeerror.
![Page 564: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/564.jpg)
Example
AsitappliestotheShapeobject.
Thisexampledeletesallfreeformshapesfromslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Shapes
ForintShape=.CountTo1Step-1
With.Item(intShape)
If.Type=msoFreeformThen.Delete
EndWith
Next
EndWith
![Page 565: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/565.jpg)
DeleteTextMethodDeletesthetextassociatedwiththespecifiedshape.
expression.DeleteText
expressionRequired.AnexpressionthatreturnsaTextFrameobject.
![Page 566: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/566.jpg)
Example
IfshapetwoonmyDocumentcontainstext,thisexampledeletesthetext.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(2).TextFrame.DeleteText
![Page 567: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/567.jpg)
ShowAll
![Page 568: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/568.jpg)
DistributeMethodEvenlydistributestheshapesinthespecifiedrangeofshapes.Youcanspecifywhetheryouwanttodistributetheshapeshorizontallyorverticallyandwhetheryouwanttodistributethemovertheentireslideorjustoverthespacetheyoriginallyoccupy.
expression.Distribute(DistributeCmd,RelativeTo)
expressionRequired.AnexpressionthatreturnsaShapeRangeobject.
DistributeCmdRequiredMsoDistributeCmd.Specifieswhethershapesintherangearetobedistributedhorizontallyorvertically.
MsoDistributeCmdcanbeoneoftheseMsoDistributeCmdconstants.msoDistributeHorizontallymsoDistributeVertically
RelativeToRequiredMsoTriState.Determineswhethershapesaredistributedevenlyovertheentirehorizontalorverticalspaceontheslide.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDistributestheshapeswithinthehorizontalorverticalspacethattherangeofshapesoriginallyoccupies.msoTriStateMixedmsoTriStateTogglemsoTrueDistributestheshapesevenlyovertheentirehorizontalorverticalspaceontheslide.
![Page 569: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/569.jpg)
Example
ThisexampledefinesashaperangethatcontainsalltheAutoShapesonthemyDocumentandthenhorizontallydistributestheshapesinthisrange.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
numShapes=.Count
IfnumShapes>1Then
numAutoShapes=0
ReDimautoShpArray(1TonumShapes)
Fori=1TonumShapes
If.Item(i).Type=msoAutoShapeThen
numAutoShapes=numAutoShapes+1
autoShpArray(numAutoShapes)=.Item(i).Name
EndIf
Next
IfnumAutoShapes>1Then
ReDimPreserveautoShpArray(1TonumAutoShapes)
SetasRange=.Range(autoShpArray)
asRange.DistributemsoDistributeHorizontally,msoFalse
EndIf
EndIf
EndWith
![Page 570: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/570.jpg)
ShowAll
![Page 571: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/571.jpg)
DoVerbMethodRequeststhatanOLEobjectperformoneofitsverbs.UsetheObjectVerbspropertytodeterminetheavailableverbsforanOLEobject.
expression.DoVerb(Index)
expressionRequired.AnexpressionthatreturnsanOLEFormatobject.
IndexOptionalInteger.Theverbtoperform.Ifthisargumentisomitted,thedefaultverbisperformed.
![Page 572: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/572.jpg)
Example
ThisexampleperformsthedefaultverbforshapethreeonslideoneintheactivepresentationifshapethreeisalinkedorembeddedOLEobject.
WithActivePresentation.Slides(1).Shapes(3)
If.Type=msoEmbeddedOLEObjectOr_
.Type=msoLinkedOLEObjectThen
.OLEFormat.DoVerb
EndIf
EndWith
Thisexampleperformstheverb"Open"forshapethreeonslideoneintheactivepresentationifshapethreeisanOLEobjectthatsupportstheverb"Open."
WithActivePresentation.Slides(1).Shapes(3)
If.Type=msoEmbeddedOLEObjectOr_
.Type=msoLinkedOLEObjectThen
ForEachsVerbIn.OLEFormat.ObjectVerbs
nCount=nCount+1
IfsVerb="Open"Then
.OLEFormat.DoVerbnCount
ExitFor
EndIf
Next
EndIf
EndWith
![Page 573: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/573.jpg)
DrawLineMethodDrawsalineinthespecifiedslideshowview.
expression.DrawLine(BeginX,BeginY,EndX,Height)
expressionRequired.AnexpressionthatreturnsaSlideShowViewobject.
BeginX,BeginYRequiredSingle.Theposition(inpoints)oftheline'sstartingpointrelativetotheupper-leftcorneroftheslide.
EndX,EndYRequiredSingle.Theposition(inpoints)oftheline'sendingpointrelativetotheupper-leftcorneroftheslide.
![Page 574: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/574.jpg)
Example
Thisexampledrawsalineinslideshowwindowone.
SlideShowWindows(1).View.DrawLine5,5,250,250
![Page 575: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/575.jpg)
ShowAll
![Page 576: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/576.jpg)
DuplicateMethodDuplicatemethodasitappliestotheShapeandShapeRangeobjects.
CreatesaduplicateofthespecifiedShapeorShapeRangeobject,addsthenewshapeorrangeofshapestotheShapescollectionimmediatelyaftertheshapeorrangeofshapesspecifiedoriginally,andthenreturnsthenewShapeorShapeRangeobject.
expression.Duplicate
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
DuplicatemethodasitappliestotheSlideandSlideRangeobjects.
CreatesaduplicateofthespecifiedSlideorSlideRangeobject,addsthenewslideorrangeofslidestotheSlidescollectionimmediatelyaftertheslideorsliderangespecifiedoriginally,andthenreturnsaSlideorSlideRangeobjectthatrepresentstheduplicateslideorslides.
expression.Duplicate
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 577: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/577.jpg)
Example
AsitappliestotheShapeandShapeRangeobjects.
Thisexampleaddsanew,blankslideattheendoftheactivepresentation,addsadiamondshapetothenewslide,duplicatesthediamond,andthensetspropertiesfortheduplicate.Thefirstdiamondwillhavethedefaultfillcolorfortheactivecolorscheme;theseconddiamondwillbeoffsetfromthefirstoneandwillhavethedefaultshadowcolor.
SetmySlides=ActivePresentation.Slides
SetnewSlide=mySlides.Add(mySlides.Count+1,ppLayoutBlank)
SetfirstObj=newSlide.Shapes_
.AddShape(msoShapeDiamond,10,10,250,350)
WithfirstObj.Duplicate
.Left=150
.Fill.ForeColor.SchemeColor=ppShadow
EndWith
AsitappliestotheSlideandSlideRangeobjects.
Thisexamplecreatesaduplicateofslideoneintheactivepresentationandthensetsthebackgroundshadingandthetitletextofthenewslide.Thenewslidewillbeslidetwointhepresentation.
SetnewSlide=ActivePresentation.Slides(1).Duplicate
WithnewSlide
.Background.Fill.PresetGradientmsoGradientVertical,_
1,msoGradientGold
.Shapes.Title.TextFrame.TextRange_
.Text="SecondQuarterEarnings"
EndWith
![Page 578: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/578.jpg)
EndConnectMethodAttachestheendofthespecifiedconnectortoaspecifiedshape.Ifthere'salreadyaconnectionbetweentheendoftheconnectorandanothershape,thatconnectionisbroken.Iftheendoftheconnectorisn'talreadypositionedatthespecifiedconnectingsite,thismethodmovestheendoftheconnectortotheconnectingsiteandadjuststhesizeandpositionoftheconnector.UsetheBeginConnectmethodtoattachthebeginningoftheconnectortoashape.
expression.EndConnect(ConnectedShape,ConnectionSite)
expressionRequired.AnexpressionthatreturnsaConnectorFormatobject.
ConnectedShapeRequiredShapeobject.Theshapetoattachtheendoftheconnectorto.ThespecifiedShapeobjectmustbeinthesameShapescollectionastheconnector.
ConnectionSiteRequiredLong.AconnectionsiteontheshapespecifiedbyConnectedShape.Mustbeanintegerbetween1andtheintegerreturnedbytheConnectionSiteCountpropertyofthespecifiedshape.Ifyouwanttheconnectortoautomaticallyfindtheshortestpathbetweenthetwoshapesitconnects,specifyanyvalidintegerforthisargumentandthenusetheRerouteConnectionsmethodaftertheconnectorisattachedtoshapesatbothends.
![Page 579: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/579.jpg)
Remarks
Whenyouattachaconnectortoanobject,thesizeandpositionoftheconnectorareautomaticallyadjusted,ifnecessary.
![Page 580: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/580.jpg)
Example
Thisexampleaddstworectanglestothefirstslideintheactivepresentationandconnectsthemwithacurvedconnector.NoticethattheRerouteConnectionsmethodmakesitirrelevantwhatvaluesyousupplyfortheConnectionSiteargumentsusedwiththeBeginConnectandEndConnectmethods.
SetmyDocument=ActivePresentation.Slides(1)
Sets=myDocument.Shapes
SetfirstRect=s.AddShape(msoShapeRectangle,100,50,200,100)
SetsecondRect=s.AddShape(msoShapeRectangle,300,300,200,100)
Withs.AddConnector(msoConnectorCurve,0,0,100,100)_
.ConnectorFormat
.BeginConnectConnectedShape:=firstRect,ConnectionSite:=1
.EndConnectConnectedShape:=secondRect,ConnectionSite:=1
.Parent.RerouteConnections
EndWith
![Page 581: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/581.jpg)
EndDisconnectMethodDetachestheendofthespecifiedconnectorfromtheshapeit'sattachedto.Thismethoddoesn'talterthesizeorpositionoftheconnector:theendoftheconnectorremainspositionedataconnectionsitebutisnolongerconnected.UsetheBeginDisconnectmethodtodetachthebeginningoftheconnectorfromashape.
expression.EndDisconnect
expressionRequired.AnexpressionthatreturnsaConnectorFormatobject.
![Page 582: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/582.jpg)
Example
Thisexampleaddstworectanglestothefirstslideintheactivepresentation,attachesthemwithaconnector,automaticallyreroutestheconnectoralongtheshortestpath,andthendetachestheconnectorfromtherectangles.
SetmyDocument=ActivePresentation.Slides(1)
Sets=myDocument.Shapes
SetfirstRect=s.AddShape(msoShapeRectangle,100,50,200,100)
SetsecondRect=s.AddShape(msoShapeRectangle,300,300,200,100)
Withs.AddConnector(msoConnectorCurve,0,0,0,0).ConnectorFormat
.BeginConnectfirstRect,1
.EndConnectsecondRect,1
.Parent.RerouteConnections
.BeginDisconnect
.EndDisconnect
EndWith
![Page 583: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/583.jpg)
EndNamedShowMethodSwitchesfromrunningacustom,ornamed,slideshowtorunningtheentirepresentationofwhichthecustomshowisasubset.Whentheslideshowadvancesfromthecurrentslide,thenextslidedisplayedwillbethenextoneintheentirepresentation,notthenextoneinthecustomslideshow.
expression.EndNamedShow
expressionRequired.AnexpressionthatreturnsaSlideShowViewobject.
![Page 584: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/584.jpg)
Example
Ifacustomslideshowiscurrentlyrunninginslideshowwindowone,thisexampleredefinestheslideshowtoincludealltheslidesinthepresentationfromwhichtheslidesinthecustomshowwereselected.
SlideShowWindows(1).View.EndNamedShow
![Page 585: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/585.jpg)
EndReviewMethodTerminatesareviewofafilethathasbeensentforreviewusingtheSendForReviewmethodorthathasbeenautomaticallyplacedinareviewcycle.
expression.EndReview
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 586: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/586.jpg)
Example
Thisexampleterminatesthereviewoftheactivepresentation.Whenexecuted,thisproceduredisplaysamessageaskingifyouwanttoendthereview.Thisexampleassumestheactivepresentationisinareviewcycle.
SubEndPPTRev()
ActivePresentation.EndReview
EndSub
![Page 587: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/587.jpg)
EraseDrawingMethodRemoveslinesdrawnduringaslideshowusingeithertheDrawLinemethodorthepentool.
expression.EraseDrawing
expressionRequired.AnexpressionthatreturnsaSlideShowViewobject.
![Page 588: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/588.jpg)
Example
ThisexampleerasesanylinesthathavebeendrawninslideshowwindowoneusingeithertheDrawLinemethodorthepentool.
SlideShowWindows(1).View.EraseDrawing
![Page 589: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/589.jpg)
ExitMethodEndsthespecifiedslideshow.
expression.Exit
expressionRequired.AnexpressionthatreturnsaSlideShowViewobject.
![Page 590: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/590.jpg)
Example
Thisexampleendstheslideshowthat'srunninginslideshowwindowone.
SlideShowWindows(1).View.Exit
![Page 591: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/591.jpg)
ShowAll
![Page 592: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/592.jpg)
ExportMethodExportmethodasitappliestotheSlideandSlideRangeobjects.
Exportsaslideorrangeofslidesusingthespecifiedgraphicsfilter,andsavestheexportedfileunderthespecifiedfilename.
expression.Export(FileName,FilterName,ScaleWidth,ScaleHeight)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
FileNameRequiredString.Thenameofthefiletobeexportedandsavedtodisk.Youcanincludeafullpath;ifyoudon't,MicrosoftPowerPointcreatesafileinthecurrentfolder.
FilterNameRequiredString.Thegraphicsformatinwhichyouwanttoexportslides.ThespecifiedgraphicsformatmusthaveanexportfilterregisteredintheWindowsregistry.Youcanspecifyeithertheregisteredextensionortheregisteredfiltername.PowerPointwillfirstsearchforamatchingextensionintheregistry.Ifnoextensionthatmatchesthespecifiedstringisfound,PowerPointwilllookforafilternamethatmatches.
ScaleWidthOptionalLong.Thewidthinpixelsofanexportedslide.
ScaleHeightOptionalLong.Theheightinpixelsofanexportedslide.
![Page 593: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/593.jpg)
Remarks
Exportingapresentationdoesn'tsettheSavedpropertyofapresentationtoTrue.
PowerPointusesthespecifiedgraphicsfiltertosaveeachindividualslide.ThenamesoftheslidesexportedandsavedtodiskaredeterminedbyPowerPoint.They'retypicallysavedasSlide1.wmf,Slide2.wmf,andsoon.ThepathofthesavedfilesisspecifiedintheFileNameargument.
ExportmethodasitappliestothePresentationobject.
Exportseachslideinthepresentation,usingthespecifiedgraphicsfilter,andsavestheexportedfilesinthespecifiedfolder.
expression.Export(Path,FilterName,ScaleWidth,ScaleHeight)
expressionRequired.AnexpressionthatreturnsaPresentationobject.
PathRequiredString.Thepathofthefolderwhereyouwanttosavetheexportedslides.Youcanincludeafullpath;ifyoudon'tdothis,MicrosoftPowerPointcreatesasubfolderinthecurrentfolderfortheexportedslides.
FilterNameRequiredString.Thegraphicsformatinwhichyouwanttoexportslides.ThespecifiedgraphicsformatmusthaveanexportfilterregisteredintheWindowsregistry.Youcanspecifyeithertheregisteredextensionortheregisteredfiltername.PowerPointwillfirstsearchforamatchingextensionintheregistry.Ifnoextensionthatmatchesthespecifiedstringisfound,PowerPointwilllookforafilternamethatmatches.
ScaleWidthOptionalLong.Thewidthinpixelsofanexportedslide.
ScaleHeightOptionalLong.Theheightinpixelsofanexportedslide.
![Page 594: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/594.jpg)
Remarks
Exportingapresentationdoesn'tsettheSavedpropertyofapresentationtoTrue.
PowerPointusesthespecifiedgraphicsfiltertosaveeachindividualslideinthepresentation.ThenamesoftheslidesexportedandsavedtodiskaredeterminedbyPowerPoint.They'retypicallysavedasSlide1.wmf,Slide2.wmf,andsoon.ThepathofthesavedfilesisspecifiedinthePathargument.
![Page 595: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/595.jpg)
Example
AsitappliestothePresentationobject.
ThisexamplesavestheactivepresentationasaMicrosoftPowerPointpresentationandthenexportseachslideinthepresentationasaPortableNetworkGraphics(PNG)filethatwillbesavedintheCurrentWorkfolder.Theexamplealsoexportseachslidewithaheightof100pixelsandawidthof100pixels.
WithActivePresentation
.SaveAsFileName:="c:\CurrentWork\AnnualSales",_
FileFormat:=ppSaveAsPresentation
.ExportPath:="c:\CurrentWork",FilterName:="png",_
ScaleWidth:=100,ScaleHeight:=100
EndWith
AsitappliestotheSlideobject.
ThisexampleexportsslidethreeintheactivepresentationtodiskintheJPEGgraphicformat.TheslideissavedasSlide3ofAnnualSales.jpg.
WithApplication.ActivePresentation.Slides(3)
.Export"c:\mydocuments\GraphicFormat\"&_
"Slide3ofAnnualSales","JPG"
EndWith
![Page 596: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/596.jpg)
ShowAll
![Page 597: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/597.jpg)
FindMethodFindsthespecifiedtextinatextrange,andreturnsaTextRangeobjectthatrepresentsthefirsttextrangewherethetextisfound.ReturnsNothingifnomatchisfound.
expression.Find(FindWhat,After,MatchCase,WholeWords)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
FindWhatRequiredString.Thetexttosearchfor.
AfterOptionalLong.Thepositionofthecharacter(inthespecifiedtextrange)afterwhichyouwanttosearchforthenextoccurrenceofFindWhat.Forexample,ifyouwanttosearchfromthefifthcharacterofthetextrange,specify4forAfter.Ifthisargumentisomitted,thefirstcharacterofthetextrangeisusedasthestartingpointforthesearch.
MatchCaseOptionalMsoTriState.MsoTrueforthesearchtodistinguishbetweenuppercaseandlowercasecharacters.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.msoTriStateMixedmsoTriStateTogglemsoTrueSearchmatchesthecaseofthelettersintheFindWhatargument.
WholeWordsOptionalMsoTriState.MsoTrueforthesearchtofindonlywholewordsandnotpartsoflargerwordsaswell.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.msoTriStateMixed
![Page 598: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/598.jpg)
msoTriStateTogglemsoTrueSearchfindsonlywholewords,notpartsoflargerwords.
![Page 599: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/599.jpg)
Example
Thisexamplefindseveryoccurrenceof"CompanyX"intheactivepresentationandformatsitasbold.
ForEachsldInApplication.ActivePresentation.Slides
ForEachshpInsld.Shapes
Ifshp.HasTextFrameThen
SettxtRng=shp.TextFrame.TextRange
SetfoundText=txtRng.Find(FindWhat:="CompanyX")
DoWhileNot(foundTextIsNothing)
WithfoundText
.Font.Bold=True
SetfoundText=_
txtRng.Find(FindWhat:="CompanyX",_
After:=.Start+.Length-1)
EndWith
Loop
EndIf
Next
Next
![Page 600: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/600.jpg)
FindBySlideIDMethodReturnsaSlideobjectthatrepresentstheslidewiththespecifiedslideIDnumber.EachslideisautomaticallyassignedauniqueslideIDnumberwhenit'screated.UsetheSlideIDpropertytoreturnaslide'sIDnumber.
expression.FindBySlideID(SlideID)
expressionRequired.AnexpressionthatreturnsaSlidescollection.
SlideIDRequiredLong.SpecifiestheIDnumberoftheslideyouwanttoreturn.PowerPointassignsthisnumberwhentheslideiscreated.
![Page 601: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/601.jpg)
Remarks
UnliketheSlideIndexproperty,theSlideIDpropertyofaSlideobjectwon'tchangewhenyouaddslidestothepresentationorrearrangetheslidesinthepresentation.Therefore,usingtheFindBySlideIDmethodwiththeslideIDnumbercanbeamorereliablewaytoreturnaspecificSlideobjectfromaSlidescollectionthanusingtheItemmethodwiththeslide'sindexnumber.
![Page 602: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/602.jpg)
Example
ThisexampledemonstrateshowtoretrievetheuniqueIDnumberforaSlideobjectandthenusethisnumbertoreturnthatSlideobjectfromtheSlidescollection.
Setgslides=ActivePresentation.Slides
'GetslideID
graphSlideID=gslides.Add(2,ppLayoutChart).SlideID
gslides.FindBySlideID(graphSlideID)_
.SlideShowTransition.EntryEffect=_
ppEffectCoverLeft'UseIDtoreturnspecificslide
![Page 603: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/603.jpg)
FindFirstAnimationForMethodReturnsanEffectobjectthatrepresentsthefirstanimationforagivenshape.
expression.FindFirstAnimationFor(Shape)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
ShapeRequiredShapeobject.Theshapeforwhichtofindthefirstanimation.
![Page 604: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/604.jpg)
Example
Thefollowingexamplefindsanddeletesthefirstanimationforathefirstshapeonthefirstslide.Thisexampleassumesthatatleastoneanimationeffectexistsforthespecifiedshape.
SubFindFirstAnimation()
DimsldFirstAsSlide
DimshpFirstAsShape
DimeffFirstAsEffect
SetsldFirst=ActivePresentation.Slides(1)
SetshpFirst=sldFirst.Shapes(1)
SeteffFirst=sldFirst.TimeLine.MainSequence_
.FindFirstAnimationFor(Shape:=shpFirst)
effFirst.Delete
EndSub
![Page 605: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/605.jpg)
FindFirstAnimationForClickMethodReturnsanEffectobjectthatrepresentsthefirstanimationstartedbythespecifiedclicknumber.
expression.FindFirstAnimationForClick(Click)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
ClickRequiredLong.Thespecifiedclicknumber.
![Page 606: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/606.jpg)
Example
Thefollowingexamplefindsthefirstanimationforthefirstclickonthefirstslideandchangestheeffecttoabounce.
SubFindFirstAnimationClick()
DimsldFirstAsSlide
DimeffClickAsEffect
SetsldFirst=ActivePresentation.Slides(1)
SeteffClick=sldFirst.TimeLine.MainSequence_
.FindFirstAnimationForClick(Click:=1)
effClick.EffectType=msoAnimEffectBounce
EndSub
![Page 607: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/607.jpg)
FirstMethodSetsthespecifiedslideshowviewtodisplaythefirstslideinthepresentation.
expression.First
expressionRequired.AnexpressionthatreturnsaSlideShowViewobject.
![Page 608: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/608.jpg)
Remarks
IfyouusetheFirstmethodtoswitchfromoneslidetoanotherduringaslideshow,whenyoureturntotheoriginalslide,itsanimationpicksupwhereitleftoff.
![Page 609: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/609.jpg)
Example
Thisexamplesetsslideshowwindowonetodisplaythefirstslideinthepresentation.
SlideShowWindows(1).View.First
![Page 610: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/610.jpg)
FitToPageMethodAdjuststhesizeofthespecifieddocumentwindowtoaccommodatetheinformationthat'scurrentlydisplayed.
expression.FitToPage
expressionRequired.AnexpressionthatreturnsaDocumentWindowobject.
![Page 611: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/611.jpg)
Example
Thisexampleexitsthecurrentslideshow,setstheviewintheactivewindowtoslideview,setsthezoomto25percent,andadjuststhesizeofthewindowtofittheslidedisplayedthere.
Application.SlideShowWindows(1).View.Exit
WithApplication.ActiveWindow
.ViewType=ppViewSlide
.View.Zoom=25
.FitToPage
EndWith
![Page 612: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/612.jpg)
ShowAll
![Page 613: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/613.jpg)
FlipMethodFlipsthespecifiedshapearoundit'shorizontalorverticalaxis.
expression.Flip(FlipCmd)
expressionRequired.AnexpressionthatreturnsaShapeorShapeRangeobject.
FlipCmdRequiredMsoFlipCmd.Specifieswhethertheshapeistobeflippedhorizontallyorvertically.
MsoFlipCmdcanbeoneoftheseMsoFlipCmdconstants.msoFlipHorizontalmsoFlipVertical
![Page 614: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/614.jpg)
Example
ThisexampleaddsatriangletomyDocument,duplicatesthetriangle,andthenflipstheduplicatetriangleverticallyandmakesitred.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes_
.AddShape(msoShapeRightTriangle,10,10,50,50).Duplicate
.Fill.ForeColor.RGB=RGB(255,0,0)
.FlipmsoFlipVertical
EndWith
![Page 615: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/615.jpg)
FollowMethodDisplaystheHTMLdocumentassociatedwiththespecifiedhyperlinkinanewWebbrowserwindow.
expression.Follow
expressionRequired.AnexpressionthatreturnsaHyperlinkobject.
![Page 616: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/616.jpg)
Example
ThisexampleloadsthedocumentassociatedwiththefirsthyperlinkonslideoneinanewinstanceoftheWebbrowser.
ActivePresentation.Slides(1).Hyperlinks(1).Follow
![Page 617: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/617.jpg)
ShowAll
![Page 618: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/618.jpg)
FollowHyperlinkMethodDisplaysacacheddocument,ifithasalreadybeendownloaded.Otherwise,thismethodresolvesthehyperlink,downloadsthetargetdocumentanddisplaysitintheappropriateapplication.
expression.FollowHyperlink(Address,SubAddress,NewWindow,AddHistory,ExtraInfo,Method,HeaderInfo)
expressionRequired.AnexpressionthatreturnsaPresentationobject.
AddressRequiredString.Theaddressofthetargetdocument.
SubAddressOptionalString.Thelocationinthetargetdocument.Bydefault,thisargumentisanemptystring.
NewWindowOptionalBoolean.Truetohavethetargetapplicationopenedinanewwindow.ThedefaultvalueisFalse.
AddHistoryOptionalBoolean.Truetoaddthelinktothecurrentday'shistoryfolder.
ExtraInfoOptionalString.StringorbytearraythatspecifiesinformationforHTTP.Thisargumentcanbeused,forexample,tospecifythecoordinatesofanimagemaporthecontentsofaform.ItcanalsoindicateaFATfilename.TheMethodargumentdetermineshowthisextrainformationishandled.
MethodOptionalMsoExtraInfoMethod.SpecifieshowExtraInfoispostedorappended.
MsoExtraInfoMethodcanbeoneoftheseMsoExtraInfoMethodconstants.msoMethodGetDefault.ExtraInfoisaStringthatisappendedtotheaddress.msoMethodPostExtraInfoispostedasaStringorbytearray.
HeaderInfoOptionalString.AstringthatspecifiesheaderinformationfortheHTTPrequest.Thedefaultvalueisanemptystring.Youcancombineseveralheaderlinesintoasinglestringbyusingthefollowingsyntax:"string1"&vbCr
![Page 619: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/619.jpg)
&"string2".ThespecifiedstringisautomaticallyconvertedintoANSIcharacters.NotethattheHeaderInfoargumentmayoverwritedefaultHTTPheaderfields.
![Page 620: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/620.jpg)
Example
Thisexampleloadsthedocumentatexample.microsoft.cominanewwindowandaddsittothehistoryfolder.
ActivePresentation.FollowHyperlink_
Address:="http://example.microsoft.com",_
NewWindow:=True,AddHistory:=True
![Page 621: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/621.jpg)
GotoNamedShowMethodSwitchestothespecifiedcustom,ornamed,slideshowduringanotherslideshow.Whentheslideshowadvancesfromthecurrentslide,thenextslidedisplayedwillbethenextoneinthespecifiedcustomslideshow,notthenextoneincurrentslideshow.
expression.GotoNamedShow(SlideShowName)
expressionRequired.AnexpressionthatreturnsaSlideShowViewobject.
SlideShowNameRequiredString.Thenameofthecustomslideshowtobeswitchedto.
![Page 622: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/622.jpg)
Example
Thisexampleredefinestheslideshowrunninginslideshowwindowonetoincludeonlytheslidesinthecustomslideshownamed"QuickShow."
SlideShowWindows(1).View.GotoNamedShow"QuickShow"
![Page 623: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/623.jpg)
ShowAll
![Page 624: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/624.jpg)
GotoSlideMethodGotoSlidemethodasitappliestotheViewobject.
Switchestothespecifiedslide.
expression.GotoSlide(Index)
expressionRequired.AnexpressionthatreturnsaViewobject.
IndexRequiredInteger.Thenumberoftheslidetoswitchto.
GotoSlidemethodasitappliestotheSlideShowViewobject.
Switchestothespecifiedslideduringaslideshow.Youcanspecifywhetheryouwanttheanimationeffectstobererun.
expression.GotoSlide(Index,ResetSlide)
expressionRequired.AnexpressionthatreturnsaSlideShowViewobject.
IndexRequiredInteger.Thenumberoftheslidetoswitchto.
ResetSlideOptionalMsoTriState.IfyouswitchfromoneslidetoanotherduringaslideshowwithResetSlidesettomsoFalse,whenyoureturntothefirstslide,itsanimationpicksupwhereitleftoff.IfyouswitchfromoneslidetoanotherwithResetSlidesettomsoTrue,whenyoureturntothefirstslide,itsentireanimationstartsover.ThedefaultvalueismsoTrue.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueDefault.
![Page 625: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/625.jpg)
Example
Thisexampleswitchesfromthecurrentslidetotheslidethreeinslideshowwindowone.Ifyouswitchbacktothecurrentslideduringtheslideshow,itsentireanimationwillstartover.
WithSlideShowWindows(1).View
.GotoSlide3
EndWith
Thisexampleswitchesfromthecurrentslidetotheslidethreeinslideshowwindowone.Ifyouswitchbacktothecurrentslideduringtheslideshow,itsanimationwillpickupwhereitleftoff.
WithSlideShowWindows(1).View
.GotoSlide3,msoFalse
EndWith
![Page 626: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/626.jpg)
GroupMethodGroupstheshapesinthespecifiedrange.ReturnsthegroupedshapesasasingleShapeobject.
expression.Group
expressionRequired.AnexpressionthatreturnsaShapeRangeobject.
![Page 627: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/627.jpg)
Remarks
Becauseagroupofshapesistreatedasasingleshape,groupingandungroupingshapeschangesthenumberofitemsintheShapescollectionandchangestheindexnumbersofitemsthatcomeaftertheaffecteditemsinthecollection.
![Page 628: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/628.jpg)
Example
ThisexampleaddstwoshapestomyDocument,groupsthetwonewshapes,setsthefillforthegroup,rotatesthegroup,andsendsthegrouptothebackofthedrawinglayer.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
.AddShape(msoShapeCan,50,10,100,200).Name="shpOne"
.AddShape(msoShapeCube,150,250,100,200).Name="shpTwo"
With.Range(Array("shpOne","shpTwo")).Group
.Fill.PresetTexturedmsoTextureBlueTissuePaper
.Rotation=45
.ZOrdermsoSendToBack
EndWith
EndWith
![Page 629: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/629.jpg)
HelpMethodDisplaysaHelptopic.
expression.Help(HelpFile,ContextID)
expressionRequired.AnexpressionthatreturnsanApplicationobject.
HelpFileOptionalString.ThenameoftheHelpfileyouwanttodisplay.Canbeeithera.chmoran.hlpfile.Ifthisargumentisn'tspecified,MicrosoftPowerPointHelpisused.
ContextIDOptionalLong.ThecontextIDnumberfortheHelptopic.Ifthisargumentisn'tspecifiedorifitspecifiesacontextIDnumberthatisnotassociatedwithaHelptopic,theHelpTopicsdialogboxisdisplayed.
![Page 630: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/630.jpg)
Example
Thisexampledisplaystopicnumber65527intheHelpfileMyHelpFile.chm.
Application.Help"MyHelpFile.chm",65527
![Page 631: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/631.jpg)
ImportFromFileMethodSpecifiesthesoundthatwillbeplayedwheneverthespecifiedshapeisclickedoranimatedorwheneverthespecifiedslidetransitionoccurs.
expression.ImportFromFile(FullName)
expressionRequired.AnexpressionthatreturnsaSoundEffectobject.
FullNameRequiredString.Thenameofthespecifiedsoundfile.
![Page 632: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/632.jpg)
Example
ThisexamplespecifiesthatthefileDudududu.wavwillstarttoplayatthetransitiontoslidetwointheactivepresentationandwillcontinuetoplayuntilthenextsoundstarts.
WithActivePresentation.Slides(2).SlideShowTransition
.SoundEffect.ImportFromFile"c:\sndsys\dudududu.wav"
.LoopSoundUntilNext=True
EndWith
![Page 633: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/633.jpg)
IncrementBrightnessMethodChangesthebrightnessofthepicturebythespecifiedamount.UsetheBrightnesspropertytosettheabsolutebrightnessofthepicture.
expression.IncrementBrightness(Increment)
expressionRequired.AnexpressionthatreturnsaPictureFormatobject.
IncrementRequiredSingle.SpecifieshowmuchtochangethevalueoftheBrightnesspropertyforthepicture.Apositivevaluemakesthepicturebrighter;anegativevaluemakesthepicturedarker.
![Page 634: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/634.jpg)
Remarks
YoucannotadjustthebrightnessofapicturepasttheupperorlowerlimitfortheBrightnessproperty.Forexample,iftheBrightnesspropertyisinitiallysetto0.9andyouspecify0.3fortheIncrementargument,theresultingbrightnesslevelwillbe1.0,whichistheupperlimitfortheBrightnessproperty,insteadof1.2.
![Page 635: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/635.jpg)
Example
ThisexamplecreatesaduplicateofshapeoneonmyDocumentandthenmovesanddarkenstheduplicate.Fortheexampletowork,shapeonemustbeeitherapictureoranOLEobject.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).Duplicate
.PictureFormat.IncrementBrightness-0.2
.IncrementLeft50
.IncrementTop50
EndWith
![Page 636: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/636.jpg)
IncrementContrastMethodChangesthecontrastofthepicturebythespecifiedamount.UsetheContrastpropertytosettheabsolutecontrastforthepicture.
expression.IncrementContrast(Increment)
expressionRequired.AnexpressionthatreturnsaPictureFormatobject.
IncrementRequiredSingle.SpecifieshowmuchtochangethevalueoftheContrastpropertyforthepicture.Apositivevalueincreasesthecontrast;anegativevaluedecreasesthecontrast.
![Page 637: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/637.jpg)
Remarks
YoucannotadjustthecontrastofapicturepasttheupperorlowerlimitfortheContrastproperty.Forexample,iftheContrastpropertyisinitiallysetto0.9andyouspecify0.3fortheIncrementargument,theresultingcontrastlevelwillbe1.0,whichistheupperlimitfortheContrastproperty,insteadof1.2.
![Page 638: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/638.jpg)
Example
ThisexampleincreasesthecontrastforallpicturesonmyDocumentthataren'talreadysettomaximumcontrast.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Ifs.Type=msoPictureThen
s.PictureFormat.IncrementContrast0.1
EndIf
Next
![Page 639: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/639.jpg)
IncrementLeftMethodMovesthespecifiedshapehorizontallybythespecifiednumberofpoints.
expression.IncrementLeft(Increment)
expressionRequired.AnexpressionthatreturnsaShapeobject.
IncrementRequiredSingle.Specifieshowfartheshapeistobemovedhorizontally,inpoints.Apositivevaluemovestheshapetotheright;anegativevaluemovesittotheleft.
![Page 640: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/640.jpg)
Example
ThisexampleduplicatesshapeoneonmyDocument,setsthefillfortheduplicate,movesit70pointstotherightand50pointsup,androtatesit30degreesclockwise.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).Duplicate
.Fill.PresetTexturedmsoTextureGranite
.IncrementLeft70
.IncrementTop-50
.IncrementRotation30
EndWith
![Page 641: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/641.jpg)
IncrementOffsetXMethodChangesthehorizontaloffsetoftheshadowbythespecifiednumberofpoints.UsetheOffsetXpropertytosettheabsolutehorizontalshadowoffset.
expression.IncrementOffsetX(Increment)
expressionRequired.AnexpressionthatreturnsaShadowFormatobject.
IncrementRequiredSingle.Specifieshowfartheshadowoffsetistobemovedhorizontally,inpoints.Apositivevaluemovestheshadowtotheright;anegativevaluemovesittotheleft.
![Page 642: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/642.jpg)
Example
ThisexamplemovestheshadowforshapethreeonmyDocumenttotheleftby3points.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(3).Shadow.IncrementOffsetX-3
![Page 643: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/643.jpg)
IncrementOffsetYMethodChangestheverticaloffsetoftheshadowbythespecifiednumberofpoints.UsetheOffsetYpropertytosettheabsoluteverticalshadowoffset.
expression.IncrementOffsetY(Increment)
expressionRequired.AnexpressionthatreturnsaShadowFormatobject.
IncrementRequiredSingle.Specifieshowfartheshadowoffsetistobemovedvertically,inpoints.Apositivevaluemovestheshadowdown;anegativevaluemovesitup.
![Page 644: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/644.jpg)
Example
ThisexamplemovestheshadowforshapethreeonmyDocumentupby3points.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(3).Shadow.IncrementOffsetY-3
![Page 645: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/645.jpg)
ShowAll
![Page 646: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/646.jpg)
IncrementRotationMethodChangestherotationofthespecifiedshapearoundthez-axis.bythespecifiednumberofdegrees.UsetheRotationpropertytosettheabsoluterotationoftheshape.
expression.IncrementRotation(Increment)
expressionRequired.AnexpressionthatreturnsaShapeobject.
IncrementRequiredSingle.Specifieshowfartheshapeistoberotatedhorizontally,indegrees.Apositivevaluerotatestheshapeclockwise;anegativevaluerotatesitcounterclockwise.
![Page 647: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/647.jpg)
Remarks
Torotateathree-dimensionalshapearoundthex-axisorthey-axis,usetheIncrementRotationXmethodortheIncrementRotationYmethod.
![Page 648: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/648.jpg)
Example
ThisexampleduplicatesshapeoneonmyDocument,setsthefillfortheduplicate,movesit70pointstotherightand50pointsup,androtatesit30degreesclockwise.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).Duplicate
.Fill.PresetTexturedmsoTextureGranite
.IncrementLeft70
.IncrementTop-50
.IncrementRotation30
EndWith
![Page 649: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/649.jpg)
ShowAll
![Page 650: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/650.jpg)
IncrementRotationXMethodChangestherotationofthespecifiedshapearoundthex-axisbythespecifiednumberofdegrees.UsetheRotationXpropertytosettheabsoluterotationoftheshapearoundthex-axis.
expression.IncrementRotationX(Increment)
expressionRequired.AnexpressionthatreturnsaThreeDFormatobject.
IncrementRequiredSingle.Specifieshowmuch(indegrees)therotationoftheshapearoundthex-axisistobechanged.Canbeavaluefrom–90through90.Apositivevaluetiltstheshapeup;anegativevaluetiltsitdown.
![Page 651: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/651.jpg)
Remarks
Youcannotadjusttherotationaroundthex-axisofthespecifiedshapepasttheupperorlowerlimitfortheRotationXproperty(90degreesto–90degrees).Forexample,iftheRotationXpropertyisinitiallysetto80andyouspecify40fortheIncrementargument,theresultingrotationwillbe90(theupperlimitfortheRotationXproperty)insteadof120.
Tochangetherotationofashapearoundthey-axis,usetheIncrementRotationYmethod.Tochangetherotationaroundthez-axis,usetheIncrementRotationmethod.
![Page 652: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/652.jpg)
Example
ThisexampletiltsshapeoneonmyDocumentup10degrees.Shapeonemustbeanextrudedshapeforyoutoseetheeffectofthiscode.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(1).ThreeD.IncrementRotationX10
![Page 653: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/653.jpg)
ShowAll
![Page 654: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/654.jpg)
IncrementRotationYMethodChangestherotationofthespecifiedshapearoundthey-axisbythespecifiednumberofdegrees.UsetheRotationYpropertytosettheabsoluterotationoftheshapearoundthey-axis.
expression.IncrementRotationY(Increment)
expressionRequired.AnexpressionthatreturnsaThreeDFormatobject.
IncrementRequiredSingle.Specifieshowmuch(indegrees)therotationoftheshapearoundthey-axisistobechanged.Canbeavaluefrom–90through90.Apositivevaluetiltstheshapetotheleft;anegativevaluetiltsittotheright.
![Page 655: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/655.jpg)
Remarks
Tochangetherotationofashapearoundthex-axis,usetheIncrementRotationXmethod.Tochangetherotationaroundthez-axis,usetheIncrementRotationmethod.
Youcannotadjusttherotationaroundthey-axisofthespecifiedshapepasttheupperorlowerlimitfortheRotationYproperty(90degreesto–90degrees).Forexample,iftheRotationYpropertyisinitiallysetto80andyouspecify40fortheIncrementargument,theresultingrotationwillbe90(theupperlimitfortheRotationYproperty)insteadof120.
![Page 656: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/656.jpg)
Example
ThisexampletiltsshapeoneonmyDocument10degreestotheright.Shapeonemustbeanextrudedshapeforyoutoseetheeffectofthiscode.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(1).ThreeD.IncrementRotationY-10
![Page 657: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/657.jpg)
IncrementTopMethodMovesthespecifiedshapeverticallybythespecifiednumberofpoints.
expression.IncrementTop(Increment)
expressionRequired.AnexpressionthatreturnsaShapeobject.
IncrementRequiredSingle.Specifieshowfartheshapeobjectistobemovedvertically,inpoints.Apositivevaluemovestheshapedown;anegativevaluemovesitup.
![Page 658: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/658.jpg)
Example
ThisexampleduplicatesshapeoneonmyDocument,setsthefillfortheduplicate,movesit70pointstotherightand50pointsup,androtatesit30degreesclockwise.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).Duplicate
.Fill.PresetTexturedmsoTextureGranite
.IncrementLeft70
.IncrementTop-50
.IncrementRotation30
EndWith
![Page 659: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/659.jpg)
ShowAll
![Page 660: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/660.jpg)
InsertMethodInsertsanewsegmentafterthespecifiednodeofthefreeform.
expression.Insert(Index,SegmentType,EditingType,X1,Y1,X2,Y2,X3,Y3)
expressionRequired.AnexpressionthatreturnsaShapeNodesobject.
IndexRequiredLong.Thenodethatthenewnodeistobeinsertedafter.
SegmentTypeRequiredMsoSegmentType.Thetypeofsegmenttobeadded.
MsoSegmentTypecanbeoneoftheseMsoSegmentTypeconstants.msoSegmentCurvemsoSegmentLine
EditingTypeRequiredMsoEditingType.Theeditingpropertyofthevertex.
MsoEditingTypecanbeoneoftheseMsoEditingTypeconstants(cannotbemsoEditingSmoothormsoEditingSymmetric).msoEditingAutomsoEditingCorner
X1RequiredSingle.IftheEditingTypeofthenewsegmentismsoEditingAuto,thisargumentspecifiesthehorizontaldistance(inpoints)fromtheupper-leftcornerofthedocumenttotheendpointofthenewsegment.IftheEditingTypeofthenewnodeismsoEditingCorner,thisargumentspecifiesthehorizontaldistance(inpoints)fromtheupper-leftcornerofthedocumenttothefirstcontrolpointforthenewsegment.
Y1RequiredSingle.IftheEditingTypeofthenewsegmentismsoEditingAuto,thisargumentspecifiestheverticaldistance(inpoints)fromtheupper-leftcornerofthedocumenttotheendpointofthenewsegment.IftheEditingTypeofthenewnodeismsoEditingCorner,thisargumentspecifiestheverticaldistance(inpoints)fromtheupper-leftcornerofthedocumenttothefirstcontrolpointforthenewsegment.
![Page 661: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/661.jpg)
X2OptionalSingle.IftheEditingTypeofthenewsegmentismsoEditingCorner,thisargumentspecifiesthehorizontaldistance(inpoints)fromtheupper-leftcornerofthedocumenttothesecondcontrolpointforthenewsegment.IftheEditingTypeofthenewsegmentismsoEditingAuto,don'tspecifyavalueforthisargument.
Y2OptionalSingle.IftheEditingTypeofthenewsegmentismsoEditingCorner,thisargumentspecifiestheverticaldistance(inpoints)fromtheupper-leftcornerofthedocumenttothesecondcontrolpointforthenewsegment.IftheEditingTypeofthenewsegmentismsoEditingAuto,don'tspecifyavalueforthisargument.
X3OptionalSingle.IftheEditingTypeofthenewsegmentismsoEditingCorner,thisargumentspecifiesthehorizontaldistance(inpoints)fromtheupper-leftcornerofthedocumenttotheendpointofthenewsegment.IftheEditingTypeofthenewsegmentismsoEditingAuto,don'tspecifyavalueforthisargument.
Y3OptionalSingle.IftheEditingTypeofthenewsegmentismsoEditingCorner,thisargumentspecifiestheverticaldistance(inpoints)fromtheupper-leftcornerofthedocumenttotheendpointofthenewsegment.IftheEditingTypeofthenewsegmentismsoEditingAuto,don'tspecifyavalueforthisargument.
![Page 662: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/662.jpg)
Example
ThisexampleaddsasmoothnodewithacurvedsegmentafternodefourinshapethreeonmyDocument.Shapethreemustbeafreeformdrawingwithatleastfournodes.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Nodes
.InsertIndex:=4,SegmentType:=msoSegmentCurve,_
EditingType:=msoEditingSmooth,X1:=210,Y1:=100
EndWith
![Page 663: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/663.jpg)
InsertAfterMethodAppendsastringtotheendofthespecifiedtextrange.ReturnsaTextRangeobjectthatrepresentstheappendedtext.Whenusedwithoutanargument,thismethodreturnsazero-lengthstringattheendofthespecifiedrange.
expression.InsertAfter(NewText)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
NewTextOptionalString.Thetexttobeinserted.Thedefaultvalueisanemptystring.
![Page 664: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/664.jpg)
Example
Thisexampleappendsthestring":Testversion"totheendofthetitleonslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Shapes(1)
.TextFrame.TextRange.InsertAfter":Testversion"
EndWith
ThisexampleappendsthecontentsoftheClipboardtotheendofthetitleonslideone.
Application.ActivePresentation.Slides(1).Shapes(1).TextFrame_
.TextRange.InsertAfter.Paste
![Page 665: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/665.jpg)
InsertBeforeMethodAppendsastringtothebeginningofthespecifiedtextrange.ReturnsaTextRangeobjectthatrepresentstheappendedtext.Whenusedwithoutanargument,thismethodreturnsazero-lengthstringattheendofthespecifiedrange.
expression.InsertBefore(NewText)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
NewTextOptionalString.Thetexttobeappended.Thedefaultvalueisanemptystring.
![Page 666: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/666.jpg)
Example
Thisexampleappendsthestring"Testversion:"tothebeginningofthetitleonslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Shapes(1)
.TextFrame.TextRange.InsertBefore"Testversion:"
EndWith
ThisexampleappendsthecontentsoftheClipboardtothebeginningofthetitleonslideoneintheactivepresentation.
Application.ActivePresentation.Slides(1).Shapes(1).TextFrame_
.TextRange.InsertBefore.Paste
![Page 667: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/667.jpg)
ShowAll
![Page 668: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/668.jpg)
InsertDateTimeMethodInsertsthedateandtimeinthespecifiedtextrange.ReturnsaTextRangeobjectthatrepresentstheinsertedtext.
expression.InsertDateTime(DateTimeFormat,InsertAsField)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
DateTimeFormatRequiredPpDateTimeFormat.Aformatforthedateandtime.
PpDateTimeFormatcanbeoneofthesePpDateTimeFormatconstants.ppDateTimeddddMMMMddyyyyppDateTimedMMMMyyyyppDateTimedMMMyyppDateTimeFormatMixedppDateTimeHmmppDateTimehmmAMPMppDateTimeHmmssppDateTimehmmssAMPMppDateTimeMdyyppDateTimeMMddyyHmmppDateTimeMMddyyhmmAMPMppDateTimeMMMMdyyyyppDateTimeMMMMyyppDateTimeMMyy
InsertAsFieldOptionalMsoTriState.Determineswhethertheinserteddateandtimewillbeupdatedeachtimethepresentationisopened.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.
![Page 669: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/669.jpg)
msoTriStateMixedmsoTriStateTogglemsoTrueUpdatestheinserteddateandtimeeachtimethepresentationisopened.
![Page 670: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/670.jpg)
Example
Thisexampleinsertsthedateandtimeafterthefirstsentenceofthefirstparagraphinshapetwoonslideoneintheactivepresentation.
Setsh=Application.ActivePresentation.Slides(1).Shapes(2)
SetsentOne=sh.TextFrame.TextRange.Paragraphs(1).Sentences(1)
sentOne.InsertAfter.InsertDateTimeppDateTimeMdyy
![Page 671: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/671.jpg)
InsertFromFileMethodInsertsslidesfromafileintoapresentation,atthespecifiedlocation.Returnsanintegerthatrepresentsthenumberofslidesinserted.
expression.InsertFromFile(FileName,Index,SlideStart,SlideEnd)
expressionRequired.AnexpressionthatreturnsaSlidescollection.
FileNameRequiredString.Thenameofthefilethatcontainstheslidesyouwanttoinsert.
IndexRequiredLong.TheindexnumberoftheSlideobjectinthespecifiedSlidescollectionyouwanttoinsertthenewslidesafter.
SlideStartOptionalLong.TheindexnumberofthefirstSlideobjectintheSlidescollectioninthefiledenotedbyFileName.
SlideEndOptionalLong.TheindexnumberofthelastSlideobjectintheSlidescollectioninthefiledenotedbyFileName.
![Page 672: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/672.jpg)
Example
ThisexampleinsertsslidesthreethroughsixfromC:\Ppt\Sales.pptafterslidetwointheactivepresentation.
ActivePresentation.Slides.InsertFromFile_
"c:\ppt\sales.ppt",2,3,6
![Page 673: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/673.jpg)
InsertSlideNumberMethodInsertstheslidenumberofthecurrentslideintothespecifiedtextrange.ReturnsaTextRangeobjectthatrepresentstheslidenumber.
expression.InsertSlideNumber
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
![Page 674: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/674.jpg)
Remarks
Theinsertedslidenumberisautomaticallyupdatedwhentheslidenumberofthecurrentslidechanges.
![Page 675: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/675.jpg)
Example
Thisexampleinsertstheslidenumberofthecurrentslideafterthefirstsentenceofthefirstparagraphinshapetwoonslideoneintheactivepresentation.
Setsh=Application.ActivePresentation.Slides(1).Shapes(2)
SetsentOne=sh.TextFrame.TextRange.Paragraphs(1).Sentences(1)
sentOne.InsertAfter.InsertSlideNumber
![Page 676: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/676.jpg)
ShowAll
![Page 677: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/677.jpg)
InsertSymbolMethodReturnsaTextRangeobjectthatrepresentsasymbolinsertedintothespecifiedtextrange.
expression.InsertSymbol(FontName,CharNumber,UniCode)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
FontNameRequiredString.Thefontname.
CharNumberRequiredLong.TheUnicodeorASCIIcharacternumber.
UnicodeOptionalMsoTriState.SpecifieswhethertheCharNumberargumentrepresentsanASCIIorUnicodecharacter.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothismethod.msoFalseDefault.TheCharNumberargumentrepresentsanASCIIcharacternumber.msoTriStateMixedDoesn'tapplytothismethod.msoTriStateToggleDoesn'tapplytothismethod.msoTrueTheCharNumberargumentrepresentsaUnicodecharacter.
![Page 678: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/678.jpg)
Example
ThisexampleinsertstheRegisteredTrademarksymbolafterthefirstsentenceofthefirstparagraphinanewtextboxonthefirstslideintheactivepresentation.
SubSymbol()
DimtxtBoxAsShape
'Addtextbox
SettxtBox=Application.ActivePresentation.Slides(1)_
.Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal,_
Left:=100,Top:=100,Width:=100,Height:=100)
'Addsymboltotextbox
txtBox.TextFrame.TextRange.InsertSymbol_
FontName:="Symbol",CharNumber:=226
EndSub
![Page 679: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/679.jpg)
ShowAll
![Page 680: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/680.jpg)
ItemMethodItemmethodasitappliestotheActionSettingsobject.
ReturnsasingleactionsettingfromthespecifiedActionSettingscollection.
expression.Item(Index)
expressionRequired.AnexpressionthatreturnsanActionSettingscollection.
IndexRequiredPpMouseActivation.TheactionsettingforaMouseClickorMouseOverevent.
PpMouseActivationcanbeoneofthesePpMouseActivationconstants.ppMouseClickTheactionsettingforwhentheuserclickstheshape.ppMouseOverTheactionsettingforwhenthemousepointerispositionedoverthespecifiedshape.
ItemmethodasitappliestotheAddIns,CanvasShapes,Designs,DiagramNodeChildren,DiagramNodes,Fonts,GroupShapes,NamedSlideShows,Presentations,ShapeNodes,ShapeRange,Shapes,SlideRange,andSlidesobjects.
Returnsasingleobjectfromthespecifiedcollection.
expression.Item(Index)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
IndexRequiredVariant.Thenameorindexnumberofthesingleobjectinthecollectiontobereturned.
ItemmethodasitappliestotheAnimationBehaviors,AnimationPoints,CellRange,ColorSchemes,Columns,Comments,DocumentWindows,ExtraColors,Hyperlinks,ObjectVerbs,Panes,Placeholders,PrintRanges,PublishObjects,Rows,RulerLevels,Sequence,Sequences,
![Page 681: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/681.jpg)
SlideShowWindows,TabStops,andTextStyleLevelsobjects.
Returnsasingleobjectfromthespecifiedcollection.
expression.Item(Index)
expressionRequired.AnexpressionthatreturnsanAnimationBehaviorscollection.
IndexRequiredLong.Theindexnumberofthesingleobjectinthecollectiontobereturned.
ItemmethodasitappliestotheBordersobject.
ReturnsaLineFormatobjectforthespecifiedborder.
expression.Item(BorderType)
expressionRequired.AnexpressionthatreturnsaBorderscollection.
BorderTypeRequiredPpBorderType.Specifieswhichborderofacellorcellrangeistobereturned.
PpBorderTypecanbeoneofthesePpBorderTypeconstants.ppBorderBottomppBorderDiagonalDownppBorderDiagonalUpppBorderLeftppBorderRightppBorderTop
ItemmethodasitappliestotheTagsobject.
ReturnsasingletagfromthespecifiedTagscollection.
expression.Item(Name)
expressionRequired.AnexpressionthatreturnsaTagsobject.
![Page 682: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/682.jpg)
NameRequiredString.Thenameofthesingletaginthecollectiontobereturned.
ItemmethodasitappliestotheTextStylesobject.
ReturnsasingletextstylefromthespecifiedTextStylescollection.
expression.Item(Type)
expressionRequired.AnexpressionthatreturnsaTextStylescollection.
TypeRequiredPpTextStyleType.Thetextstyletype.
PpTextStyleTypecanbeoneofthesePpTextStyleTypeconstants.ppBodyStyleppDefaultStyleppTitleStyle
![Page 683: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/683.jpg)
Remarks
TheItemmethodisthedefaultmemberforacollection.Forexample,thefollowingtwolinesofcodeareequivalent:
ActivePresentation.Slides.Item(1)
ActivePresentation.Slides(1)
Formoreinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 684: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/684.jpg)
Example
AsitappliestotheActionSettingsobject.
ThisexamplesetsshapethreeonslideonetoplaythesoundofapplauseandusestheAnimateActionpropertytospecifythattheshape'scoloristobemomentarilyinvertedwhentheshapeisclickedduringaslideshow.
WithActivePresentation.Slides.Item(1).Shapes_
.Item(3).ActionSettings.Item(ppMouseClick)
.SoundEffect.Name="applause"
.AnimateAction=True
EndWith
AsitappliestotheRulerLevelsobject.
Thisexamplesetsthefirst-lineindentandthehangingindentforoutlineleveloneinbodytextontheslidemasterfortheactivepresentation.
WithActivePresentation.SlideMaster.TextStyles.Item(ppBodyStyle)
With.Ruler.Levels.Item(1)'setsindentsforlevel1
.FirstMargin=9
.LeftMargin=54
EndWith
EndWith
AsitappliestotheShapesobject.
Thisexamplesetstheforegroundcolortoredfortheshapenamed"Rectangle1"onslideoneintheactivepresentation.
ActivePresentation.Slides.Item(1).Shapes.Item("rectangle1").Fill_
.ForeColor.RGB=RGB(128,0,0)
AsitappliestotheTagsobject.
Thisexamplehidesallslidesintheactivepresentationthatdon'thavethevalue"east"forthe"region"tag.
![Page 685: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/685.jpg)
ForEachsInActivePresentation.Slides
Ifs.Tags.Item("region")<>"east"Then
s.SlideShowTransition.Hidden=True
EndIf
Next
![Page 686: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/686.jpg)
LargeScrollMethodScrollsthroughthespecifieddocumentwindowbypages.
expression.LargeScroll(Down,Up,ToRight,ToLeft)
expressionRequired.AnexpressionthatreturnsaDocumentWindowobject.
DownOptionalLong.Specifiesthenumberofpagestoscrolldown.
UpOptionalLong.Specifiesthenumberofpagestoscrollup.
ToRightOptionalLong.Specifiesthenumberofpagestoscrollright.
ToLeftOptionalLong.Specifiesthenumberofpagestoscrollleft.
![Page 687: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/687.jpg)
Remarks
Ifnoargumentsarespecified,thismethodscrollsdownonepage.IfDownandUparebothspecified,theireffectsarecombined.Forexample,ifDownis2andUpis4,thismethodscrollsuptwopages.Similarly,ifRightandLeftarebothspecified,theireffectsarecombined.
Anyoftheargumentscanbeanegativenumber.
![Page 688: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/688.jpg)
Example
Thisexamplescrollstheactivewindowdownthreepages.
Application.ActiveWindow.LargeScrollDown:=3
![Page 689: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/689.jpg)
LastMethodSetsthespecifiedslideshowviewtodisplaythelastslideinthepresentation.
expression.Last
expressionRequired.AnexpressionthatreturnsaSlideShowViewobject.
![Page 690: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/690.jpg)
Remarks
IfyouusetheLastmethodtoswitchfromoneslidetoanotherduringaslideshow,whenyoureturntotheoriginalslide,itsanimationpicksupwhereitleftoff.
![Page 691: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/691.jpg)
Example
Thisexamplesetsslideshowwindowonetodisplaythelastslideinthepresentation.
SlideShowWindows(1).View.Last
![Page 692: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/692.jpg)
LinesMethodReturnsaTextRangeobjectthatrepresentsthespecifiedsubsetoftextlines.Forinformationaboutcountingorloopingthroughthelinesinatextrange,seetheTextRangeobject.
expression.Lines(Start,Length)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
StartOptionalLong.Thefirstlineinthereturnedrange.
LengthOptionalLong.Thenumberoflinestobereturned.
![Page 693: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/693.jpg)
Remarks
IfbothStartandLengthareomitted,thereturnedrangestartswiththefirstlineandendswiththelastparagraphinthespecifiedrange.
IfStartisspecifiedbutLengthisomitted,thereturnedrangecontainsoneline.
IfLengthisspecifiedbutStartisomitted,thereturnedrangestartswiththefirstlineinthespecifiedrange.
IfStartisgreaterthanthenumberoflinesinthespecifiedtext,thereturnedrangestartswiththelastlineinthespecifiedrange.
IfLengthisgreaterthanthenumberoflinesfromthespecifiedstartinglinetotheendofthetext,thereturnedrangecontainsallthoselines.
![Page 694: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/694.jpg)
Example
Thisexampleformatsasitalicthefirsttwolinesofthesecondparagraphinshapetwoonslideoneintheactivepresentation.
Application.ActivePresentation.Slides(1).Shapes(2)_
.TextFrame.TextRange.Paragraphs(2)_
.Lines(1,2).Font.Italic=True
![Page 695: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/695.jpg)
LoadMethodReturnsaDesignobjectthatrepresentsadesignloadedintothemasterlistofthespecifiedpresentation.
expression.Load(TemplateName,Index)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
TemplateNameRequiredString.Thepathtothedesigntemplate.
IndexOptionalLong.Theindexnumberofthedesigntemplateinthecollectionofdesigntemplates.Thedefaultis-1,whichmeansthedesigntemplateisaddedtotheendofthelistofdesignsinthepresentation.
![Page 696: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/696.jpg)
Example
Thisexampleaddadesigntemplatetothebeginningofthecollectionofdesigntemplatesintheactivepresentation.Thisexampleassumesthe"artsy.pot"templateislocatedatthespecifiedpath.
SubLoadDesign()
ActivePresentation.Designs.LoadTemplateName:="C:\ProgramFiles\"&_
"MicrosoftOffice\Templates\PresentationDesigns\Balance.pot",Index:=1
EndSub
![Page 697: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/697.jpg)
LtrRunMethodSetsthedirectionoftextinatextrangetoreadfromlefttoright.
expression.LtrRun
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
![Page 698: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/698.jpg)
Remarks
Thismethodmakesitpossibletousetextfrombothleft-to-rightandright-to-leftlanguagesinthesamepresentation.
![Page 699: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/699.jpg)
Example
Thefollowingexamplefindsalloftheshapesonslideonethatcontaintextandchangesthetexttoreadfromlefttoright.
ActiveWindow.ViewType=ppViewSlide
ForEachshInActivePresentation.Slides(1).Shapes
Ifsh.HasTextFrameThen
sh.TextFrame.TextRange.LtrRun
EndIf
Next
![Page 700: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/700.jpg)
ShowAll
![Page 701: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/701.jpg)
MergeMethodMergemethodasitappliestotheCellobject.
Mergesonetablecellwithanother.Theresultisasingletablecell.
expression.Merge(MergeTo)
expressionRequired.AnexpressionthatreturnsaCellobject.
MergeToRequiredCellobject.Cellobjecttobemergedwith.Usethesyntax.Cell(row,column).
MergemethodasitappliestothePresentationobject.
Mergesonepresentationintoanotherpresentation.
expression.Merge(Path)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
PathRequiredString.Thefullpathofafiletomergewiththispresentation.
![Page 702: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/702.jpg)
Remarks
Thismethodreturnsanerrorifthefilenamecannotbeopened,orthepresentationhasabaseline.
![Page 703: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/703.jpg)
Example
Thisexamplemergesthefirsttwocellsofrowoneinthespecifiedtable.
WithActivePresentation.Slides(2).Shapes(5).Table
.Cell(1,1).MergeMergeTo:=.Cell(1,2)
EndWith
![Page 704: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/704.jpg)
MoveAfterMethodMovesoneanimationeffecttoafteranotheranimationeffect.
expression.MoveAfter(Effect)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
EffectRequiredEffectobject.Theeffectafterwhichtheeffectinexpressionwillbemoved.
![Page 705: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/705.jpg)
Example
Thefollowingexamplemovesoneeffecttoafteranother.
SubMoveEffect()
DimeffOneAsEffect
DimeffTwoAsEffect
DimshpFirstAsShape
SetshpFirst=ActivePresentation.Slides(1).Shapes(1)
SeteffOne=ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect_
(Shape:=shpFirst,effectId:=msoAnimEffectBlinds)
SeteffTwo=ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect_
(Shape:=shpFirst,effectId:=msoAnimEffectBlast)
effOne.MoveAfterEffect:=effTwo
EndSub
![Page 706: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/706.jpg)
MoveBeforeMethodMovesoneanimationeffecttobeforeanotheranimationeffect.
expression.MoveBefore(Effect)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
EffectRequiredEffectobject.Theeffectbeforewhichtheeffectinexpressionwillbemoved.
![Page 707: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/707.jpg)
Example
Thefollowingexamplemovesoneeffectinfrontofanotherone.
SubMoveEffect()
DimeffOneAsEffect
DimeffTwoAsEffect
DimshpFirstAsShape
SetshpFirst=ActivePresentation.Slides(1).Shapes(1)
SeteffOne=ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect_
(Shape:=shpFirst,effectId:=msoAnimEffectBlinds)
SeteffTwo=ActivePresentation.Slides(1).TimeLine.MainSequence.AddEffect_
(Shape:=shpFirst,effectId:=msoAnimEffectBlast)
effTwo.MoveBeforeEffect:=effOne
EndSub
![Page 708: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/708.jpg)
ShowAll
![Page 709: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/709.jpg)
MoveNodeMethodMovesadiagramnode,andanyofitschildnodes,withinadiagram.
expression.MoveNode(TargetNode,Pos)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
TargetNodeRequiredDiagramNodeobject.Thesourcediagramnodeforthemove.
PosRequiredMsoRelativeNodePosition.Specifieswherethenodewillbeadded,relativetoTargetNode.
MsoRelativeNodePositioncanbeoneoftheseMsoRelativeNodePositionconstants.msoAfterLastSiblingmsoAfterNodemsoBeforeFirstSiblingmsoBeforeNode
![Page 710: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/710.jpg)
Example
Thefollowingexamplemovestheseconddiagramnodeofanewly-createddiagramtoafterthefourthnode.
SubMoveDiagramNode()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintCountAsInteger
'Addpyramiddiagramtothecurrentdocument
SetshpDiagram=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramPyramid,Left:=10,_
Top:=15,Width:=400,Height:=475)
'Addfourchildnodestothepyramiddiagram
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
ForintCount=1To3
dgnNode.AddNode
NextintCount
'Movethesecondnodetoafterwherethe
'fourthnodeiscurrentlylocated.
dgnNode.Diagram.Nodes(2).MoveNode_
TargetNode:=dgnNode.Diagram.Nodes(4),_
Pos:=msoAfterLastSibling
EndSub
![Page 711: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/711.jpg)
MoveToMethodMovesthespecifiedobjecttoaspecificlocationwithinthesamecollection,renumberingallotheritemsinthecollectionappropriately.
expression.MoveTo(toPos)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
toPosRequiredLong.Theindextowhichtomovetheanimationeffect.
![Page 712: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/712.jpg)
Example
Thisexamplemovesananimationeffecttothesecondintheanimationeffectscollectionforthespecifiedshape.
SubMoveEffect()
DimsldFirstasSlide
DimshpFirstAsShape
DimeffAddAsEffect
SetsldFirst=ActivePresentation.Slides(1)
SetshpFirst=sldFirst.Shapes(1)
SeteffAdd=sldFirst.TimeLine.MainSequence.AddEffect_
(Shape:=shpFirst,effectId:=msoAnimEffectBlinds)
effAdd.MoveTotoPos:=2
EndSub
Thisexamplemovesthesecondslideintheactivepresentationtothefirstslide.
SubMoveSlideToNewLocation()
ActivePresentation.Slides(2).MoveTotoPos:=1
EndSub
![Page 713: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/713.jpg)
NameMethodReturnsthenameofthespecifiedtagasaString.
expression.Name(Index)
expressionRequired.AnexpressionthatreturnsaTagscollection.
IndexRequiredLong.Thetagnumber.
![Page 714: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/714.jpg)
Example
Thisexampledisplaysthenameandvalueforeachtagassociatedwithslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Tags
Fori=1To.Count
MsgBox"Tag#"&i&":Name="&.Name(i)
MsgBox"Tag#"&i&":Value="&.Value(i)
Next
EndWith
Thisexamplesearchesthroughthetagsforeachslideintheactivepresentation.Ifthere'satagnamed"PRIORITY,"amessageboxdisplaysthetagvalue.Ifthereisn'tatagnamed"PRIORITY,"theexampleaddsthistagwiththevalue"Unknown."
ForEachsInApplication.ActivePresentation.Slides
Withs.Tags
found=False
Fori=1To.Count
If.Name(i)="PRIORITY"Then
found=True
slNum=.Parent.SlideIndex
MsgBox"Slide"&slNum&_
"priority:"&.Value(i)
EndIf
Next
IfNotfoundThen
slNum=.Parent.SlideIndex
.Add"Name","NewFigures"
.Add"Priority","Unknown"
MsgBox"Slide"&slNum&_
"prioritytagadded:Unknown"
EndIf
EndWith
Next
![Page 715: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/715.jpg)
![Page 716: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/716.jpg)
NewWindowMethodPresentationobject:Opensanewwindowthatcontainsthespecifiedpresentation.ReturnsaDocumentWindowobjectthatrepresentsthenewwindow.
DocumentWindowobject:Opensanewwindowthatcontainsthesamedocumentthat'sdisplayedinthespecifiedwindow.ReturnsaDocumentWindowobjectthatrepresentsthenewwindow.
expression.NewWindow
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 717: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/717.jpg)
Example
Thisexamplecreatesanewwindowwiththecontentsoftheactivewindow(thisactivatesthenewwindow)andthenswitchesbacktothefirstwindow.
SetoldW=Application.ActiveWindow
SetnewW=oldW.NewWindow
oldW.Activate
![Page 718: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/718.jpg)
NextMethodDisplaystheslideimmediatelyfollowingtheslidethat'scurrentlydisplayed.Ifthelastslideisdisplayed,theNextmethodclosestheslideshowinspeakermodeandreturnstothefirstslideinkioskmode.UsetheViewpropertyoftheSlideShowWindowobjecttoreturntheSlideShowViewobject.
expression.Next
expressionRequired.AnexpressionthatreturnsoneoftheitemsintheAppliesTolist.
![Page 719: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/719.jpg)
Example
Thisexampleshowstheslideimmediatelyfollowingthecurrentlydisplayedslideonslideshowwindowone.
SlideShowWindows(1).View.Next
![Page 720: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/720.jpg)
NextNodeMethodReturnsaDiagramNodeobjectthatrepresentsthenextdiagramnodeinacollectionofdiagramnodes.
expression.NextNode
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 721: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/721.jpg)
Example
Thefollowingexamplecreatesanorganizationchart,andaddschildnodestothemiddlediagramnode.
SubAddChildrenToMiddle()
DimdgnNodeAsDiagramNode
DimdgnNextAsDiagramNode
DimshpOrgChartAsShape
DimintNodesAsInteger
'Addorganizationchartandfirstchildnode
SetshpOrgChart=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramOrgChart,Left:=10,_
Top:=15,Width:=400,Height:=475)
SetdgnNode=shpOrgChart.DiagramNode.Children.AddNode
'Addthreeadditionalnodestorootnode
ForintNodes=1To3
dgnNode.Children.AddNode
NextintNodes
'SetdgnNodevariabletothemiddlenode
SetdgnNext=dgnNode.Children.Item(1).NextNode
'Addthreechildnodestomiddlenode
ForintNodes=1To3
dgnNext.Children.AddNode
NextintNodes
EndSub
![Page 722: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/722.jpg)
ShowAll
![Page 723: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/723.jpg)
OneColorGradientMethodSetsthespecifiedfilltoaone-colorgradient.
expression.OneColorGradient(Style,Variant,Degree)
expressionRequired.AnexpressionthatreturnsaFillFormatobject.
StyleRequiredMsoGradientStyle.Thegradientstyle.
MsoGradientStylecanbeoneoftheseMsoGradientStyleconstants.msoGradientDiagonalDownmsoGradientDiagonalUpmsoGradientFromCentermsoGradientFromCornermsoGradientFromTitlemsoGradientHorizontalmsoGradientMixedmsoGradientVertical
VariantRequiredLong.Thegradientvariant.Canbeavaluefrom1to4,correspondingtothefourvariantsontheGradienttabintheFillEffectsdialogbox.IfStyleismsoGradientFromTitleormsoGradientFromCenter,thisargumentcanbeeither1or2.
DegreeRequiredSingle.Thegradientdegree.Canbeavaluefrom0.0(dark)to1.0(light).
![Page 724: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/724.jpg)
Example
Thisexampleaddsarectanglewithaone-colorgradientfilltomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes_
.AddShape(msoShapeRectangle,90,90,90,80).Fill
.ForeColor.RGB=RGB(0,128,128)
.OneColorGradientmsoGradientHorizontal,1,1
EndWith
![Page 725: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/725.jpg)
ShowAll
![Page 726: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/726.jpg)
OpenMethodOpensthespecifiedpresentation.ReturnsaPresentationobjectthatrepresentstheopenedpresentation.
expression.Open(FileName,ReadOnly,Untitled,WithWindow,OpenConflictDocument)
expressionRequired.AnexpressionthatreturnsaPresentationscollection.
FileNameRequiredString.Thenameofthefiletoopen.
ReadOnlyOptionalMsoTriState.Specifieswhetherthefileisopenedwithread/writeorread-onlystatus.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.Opensthefilewithread/writestatus.msoTriStateMixedmsoTriStateTogglemsoTrueOpensthefilewithread-onlystatus.
UntitledOptionalMsoTriState.Specifieswhetherthefilehasatitle.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.Thefilenameautomaticallybecomesthetitleoftheopenedpresentation.msoTriStateMixedmsoTriStateTogglemsoTrueOpensthefilewithoutatitle.Thisisequivalenttocreatingacopyofthefile.
WithWindowOptionalMsoTriState.Specifieswhetherthefileisvisible.
![Page 727: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/727.jpg)
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseHidestheopenedpresentation.msoTriStateMixedmsoTriStateTogglemsoTrueDefault.Opensthefileinavisiblewindow.
OpenConflictDocumentOptionalMsoTriState.Specifieswhethertoopentheconflictfileforapresentationwithanofflineconflict.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.Openstheserverfileandignorestheconflictdocument.msoTriStateMixedmsoTriStateTogglemsoTrueOpenstheconflictfileandoverwritestheserverfile.
![Page 728: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/728.jpg)
Remarks
Withtheproperfileconvertersinstalled,MicrosoftPowerPointopensfileswiththefollowingMS-DOSfileextensions:.ch3,.cht,.doc,.htm,.html,.mcw,.pot,.ppa,.pps,.ppt,.pre,.rtf,.sh3,.shw,.txt,.wk1,.wk3,.wk4,.wpd,.wpf,.wps,and.xls.
![Page 729: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/729.jpg)
Example
Thisexampleopensapresentationwithread-onlystatus.
Presentations.OpenFileName:="c:\MyDocuments\pres1.ppt",_
ReadOnly:=msoTrue
![Page 730: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/730.jpg)
ParagraphsMethodReturnsaTextRangeobjectthatrepresentsthespecifiedsubsetoftextparagraphs.Forinformationaboutcountingorloopingthroughtheparagraphsinatextrange,seetheTextRangeobject.
expression.Paragraphs(Start,Length)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
StartOptionalLong.Thefirstparagraphinthereturnedrange.
LengthOptionalLong.Thenumberofparagraphstobereturned.
![Page 731: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/731.jpg)
Remarks
IfbothStartandLengthareomitted,thereturnedrangestartswiththefirstparagraphandendswiththelastparagraphinthespecifiedrange.
IfStartisspecifiedbutLengthisomitted,thereturnedrangecontainsoneparagraph.
IfLengthisspecifiedbutStartisomitted,thereturnedrangestartswiththefirstparagraphinthespecifiedrange.
IfStartisgreaterthanthenumberofparagraphsinthespecifiedtext,thereturnedrangestartswiththelastparagraphinthespecifiedrange.
IfLengthisgreaterthanthenumberofparagraphsfromthespecifiedstartingparagraphtotheendofthetext,thereturnedrangecontainsallthoseparagraphs.
![Page 732: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/732.jpg)
Example
Thisexampleformatsasitalicthefirsttwolinesofthesecondparagraphinshapetwoonslideoneintheactivepresentation.
Application.ActivePresentation.Slides(1).Shapes(2)_
.TextFrame.TextRange.Paragraphs(2)_
.Lines(1,2).Font.Italic=True
![Page 733: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/733.jpg)
ShowAll
![Page 734: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/734.jpg)
PasteMethodPastemethodasitappliestotheShapesobject.
Pastestheshapes,slides,ortextontheClipboardintothespecifiedShapescollection,atthetopofthez-order.EachpastedobjectbecomesamemberofthespecifiedShapescollection.IftheClipboardcontainsentireslides,theslideswillbepastedasshapesthatcontaintheimagesoftheslides.IftheClipboardcontainsatextrange,thetextwillbepastedintoanewlycreatedTextFrameshape.ReturnsaShapeRangeobjectthatrepresentsthepastedobjects.
expression.Paste
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
PastemethodasitappliestotheSlidesobject.
PastestheslidesontheClipboardintotheSlidescollectionforthepresentation.SpecifywhereyouwanttoinserttheslideswiththeIndexargument.ReturnsaSlideRangeobjectthatrepresentsthepastedobjects.EachpastedslidebecomesamemberofthespecifiedSlidescollection.
expression.Paste(Index)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
IndexOptionalInteger.TheindexnumberoftheslidethattheslidesontheClipboardaretobepastedbefore.Ifthisargumentisomitted,theslidesontheClipboardarepastedafterthelastslideinthepresentation.
PastemethodasitappliestotheTextRangeobject.
PastesthetextontheClipboardintothespecifiedtextrange,andreturnsaTextRangeobjectthatrepresentsthepastedtext.
expression.Paste
![Page 735: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/735.jpg)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
PastemethodasitappliestotheViewobject.
PastesthecontentsoftheClipboardintotheactiveview.Attemptingtopasteanobjectintoaviewthatwon'tacceptitcausesanerror.Forinformationaboutviewsandtheobjectsyoucanpasteintothem,seethe"Remarks"section.
expression.Paste
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 736: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/736.jpg)
Remarks
UsetheViewTypepropertytosettheviewforawindowbeforepastingtheClipboardcontentsintoit.Thefollowingtableshowswhatyoucanpasteintoeachview.
Intothisview
YoucanpastethefollowingfromtheClipboard
Slideviewornotespageview
Shapes,text,orentireslides.IfyoupasteaslidefromtheClipboard,animageoftheslidewillbeinsertedontotheslide,master,ornotespageasanembeddedobject.Ifoneshapeisselected,thepastedtextwillbeappendedtotheshape'stext;iftextisselected,thepastedtextwillreplacetheselection;ifanythingelseisselected,thepastedtextwillbeplacedinit'sowntextframe.Pastedshapeswillbeaddedtothetopofthez-orderandwon'treplaceselectedshapes.
Outlineview
Textorentireslides.Youcannotpasteshapesintooutlineview.Apastedslidewillbeinsertedbeforetheslidethatcontainstheinsertionpoint.
Slidesorterview
Entireslides.Youcannotpasteshapesortextintoslidesorterview.Apastedslidewillbeinsertedattheinsertionpointorafterthelastslideselectedinthepresentation.
![Page 737: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/737.jpg)
Example
AsitappliestotheShapesobject.
ThisexamplecopiesshapeoneonslideoneintheactivepresentationtotheClipboardandthenpastesitintoslidetwo.
WithActivePresentation
.Slides(1).Shapes(1).Copy
.Slides(2).Shapes.Paste
EndWith
Thisexamplecutsthetextinshapeoneonslideoneintheactivepresentation,placesitontheClipboard,andthenpastesitafterthefirstwordinshapetwoonthesameslide.
WithActivePresentation.Slides(1)
.Shapes(1).TextFrame.TextRange.Cut
.Shapes(2).TextFrame.TextRange.Words(1).InsertAfter.Paste
EndWith
AsitappliestotheSlidesobject.
ThisexamplecutsslidesthreeandfivefromtheOldSalespresentationandtheninsertsthembeforeslidefourintheactivepresentation.
Presentations("OldSales").Slides.Range(Array(3,5)).Cut
ActivePresentation.Slides.Paste4
AsitappliestotheViewobject.
![Page 738: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/738.jpg)
ThisexamplecopiestheselectioninwindowonetotheClipboardandcopiesitintotheviewinwindowtwo.IftheClipboardcontentscannotbepastedintotheviewinwindowtwo—forexample,ifyoutrytopasteashapeintoslidesorterview—thisexamplefails.
Windows(1).Selection.Copy
Windows(2).View.Paste
ThisexamplecopiestheselectioninwindowonetotheClipboard,makessurethatwindowoneisinslideview,andthencopiestheClipboardcontentsintotheviewinwindowtwo.
Windows(1).Selection.Copy
WithWindows(2)
.ViewType=ppViewSlide
.View.Paste
EndWith
![Page 739: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/739.jpg)
ShowAll
![Page 740: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/740.jpg)
PasteSpecialMethodPastesthecontentsoftheClipboardusingaspecialformat.AlthoughthesyntaxforusingthismethodisthesameforallobjectsintheAppliesTolist,thebehaviorisslightlydifferent,dependingontheobjectcallingthePasteSpecialmethod.
Object Behavior
Shapes
Addstheshapetothecollectionofshapesinthespecifiedformat.Ifthespecifieddatatypeisatextdatatype,thenanewtextboxiscreatedwiththetext.Ifthepastesucceeds,thePasteSpecialmethodreturnsaShapeRangeobjectrepresentingtheshaperangethatwaspasted.
TextRange
ReplacesthetextrangewiththecontentsoftheClipboardintheformatspecified.ValiddatatypesforthisobjectareppPasteText,ppPasteHTML,andppPasteRTF(anyotherformatgeneratesanerror).Ifthepastesucceeds,thismethodreturnsaTextRangeobjectrepresentingthetextrangethatwaspasted.
View
PastesthecurrentcontentsoftheClipboardintotheviewrepresentedbytheViewobject.ValidviewsforthePasteSpecialmethodarethesameasthoseforthePastemethod.Ifthedatatypecan’tbepastedintotheview(forexample,tryingtopasteapictureintoSlideSorterView),thenanerroroccurs.
expression.PasteSpecial(DataType,DisplayAsIcon,IconFileName,IconIndex,IconLabel,Link)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
DataTypeOptionalPpPasteDataType.AformatfortheClipboardcontentswhenthey'reinsertedintothedocument.Thedefaultvaluevaries,dependingonthecontentsintheClipboard.AnerroroccursifthespecifieddatatypeintheDataTypeargumentisnotsupportedbytheclipboardcontents.
PpPasteDataTypecanbeoneofthesePpPasteDataTypeconstants.ppPasteBitmap
![Page 741: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/741.jpg)
ppPasteDefaultdefaultppPasteEnhancedMetafileppPasteGIFppPasteHTMLppPasteJPGppPasteMetafilePictureppPasteOLEObjectppPastePNGppPasteRTFppPasteShapeppPasteText
DisplayAsIconOptionalMsoTriState.MsoTruetodisplaytheembeddedobject(orlink)asanicon.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesnotapplytothismethod.msoFalsedefaultDoesnotdisplaytheembeddedobject(orlink)asanicon.msoTriStateMixedDoesnotapplytothismethod.msoTriStateToggleDoesnotapplytothismethod.msoTrueDisplaystheembeddedobject(orlink)asanicon.
IconFileNameOptionalString.IfDisplayAsIconissettomsoTrue,thisargumentisthepathandfilenameforthefileinwhichtheicontobedisplayedisstored.IfDisplayAsIconissettomsoFalse,thisargumentisignored.
IconIndexOptionalLong.IfDisplayAsIconissettomsoTrue,thisargumentisanumberthatcorrespondstotheiconyouwanttouseintheprogramfilespecifiedbyIconFilename.IconsappearintheChangeIcondialogbox,accessedfromtheStandardtoolbar(Insertmenu,Objectcommand,CreateNewoption):0(zero)correspondstothefirsticon,1correspondstothesecondicon,andsoon.Ifthisargumentisomitted,thefirst(default)iconisused.IfDisplayAsIconissettomsoFalse,thenthisargumentisignored.IfIconIndexisoutsidethevalidrange,thenthedefaulticon(index0)isused.
IconLabelOptionalString.IfDisplayAsIconissettomsoTrue,this
![Page 742: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/742.jpg)
argumentisthetextthatappearsbelowtheicon.Ifthislabelismissing,MicrosoftPowerPointgeneratesaniconlabelbasedontheClipboardcontents.IfDisplayAsIconissettomsoFalse,thenthisargumentisignored.
LinkOptionalMsoTriState.DetermineswhethertocreatealinktothesourcefileoftheClipboardcontents.AnerroroccursiftheClipboardcontentsdonotsupportalink.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesnotapplytothismethod.msoFalsedefaultDoesnotcreatealinktothesourcefileoftheClipboardcontents.msoTriStateMixedDoesnotapplytothismethod.msoTriStateToggleDoesnotapplytothismethod.msoTrueCreatesalinktothesourcefileoftheClipboardcontents.
![Page 743: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/743.jpg)
Remarks
AnerroroccursifthereisnodataontheClipboardwhenthePasteSpecialmethodiscalled.
![Page 744: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/744.jpg)
Example
Thefollowingexamplepastesabitmapimageasaniconintoanotherwindow.Thisexampleassumestherearetwoopenwindows,andabitmapimageinthefirstwindowiscurrentlyselected.
SubPasteOLEObject()
Windows(1).Selection.Copy
Windows(2).View.PasteSpecialDataType:=ppPasteOLEObject,_
DisplayAsIcon:=msoTrue,IconLabel:="NewBitmapImage"
EndSub
![Page 745: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/745.jpg)
ShowAll
![Page 746: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/746.jpg)
PatternedMethodSetsthespecifiedfilltoapattern.
expression.Patterned(Pattern)
expressionRequired.AnexpressionthatreturnsaFillFormatobject.
PatternRequiredMsoPatternType.Thepatterntobeusedforthespecifiedfill.
MsoPatternTypecanbeoneoftheseMsoPatternTypeconstants.msoPattern10PercentmsoPattern20PercentmsoPattern25PercentmsoPattern30PercentmsoPattern40PercentmsoPattern50PercentmsoPattern5PercentmsoPattern60PercentmsoPattern70PercentmsoPattern75PercentmsoPattern80PercentmsoPattern90PercentmsoPatternDarkDownwardDiagonalmsoPatternDarkHorizontalmsoPatternDarkUpwardDiagonalmsoPatternDashedDownwardDiagonalmsoPatternDashedHorizontalmsoPatternDashedUpwardDiagonalmsoPatternDashedVerticalmsoPatternDiagonalBrickmsoPatternDivot
![Page 747: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/747.jpg)
msoPatternDottedDiamondmsoPatternDottedGridmsoPatternHorizontalBrickmsoPatternLargeCheckerBoardmsoPatternLargeConfettimsoPatternLargeGridmsoPatternLightDownwardDiagonalmsoPatternLightHorizontalmsoPatternLightUpwardDiagonalmsoPatternLightVerticalmsoPatternMixedmsoPatternNarrowHorizontalmsoPatternNarrowVerticalmsoPatternOutlinedDiamondmsoPatternPlaidmsoPatternShinglemsoPatternSmallCheckerBoardmsoPatternSmallConfettimsoPatternSmallGridmsoPatternSolidDiamondmsoPatternSpheremsoPatternTrellismsoPatternWavemsoPatternWeavemsoPatternWideDownwardDiagonalmsoPatternWideUpwardDiagonalmsoPatternZigZagmsoPatternDarkVertical
![Page 748: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/748.jpg)
Remarks
UsetheBackColorandForeColorpropertiestosetthecolorsusedinthepattern.
![Page 749: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/749.jpg)
Example
ThisexampleaddsanovalwithapatternedfilltomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(msoShapeOval,60,60,80,40).Fill
.ForeColor.RGB=RGB(128,0,0)
.BackColor.RGB=RGB(0,0,255)
.PatternedmsoPatternDarkVertical
EndWith
![Page 750: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/750.jpg)
PickUpMethodCopiestheformattingofthespecifiedshape.UsetheApplymethodtoapplythecopiedformattingtoanothershape.
expression.PickUp
expressionRequired.AnexpressionthatreturnsaShapeorShapeRangeobject.
![Page 751: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/751.jpg)
Example
ThisexamplecopiestheformattingofshapeoneonmyDocument,andthenappliesthecopiedformattingtoshapetwo.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument
.Shapes(1).PickUp
.Shapes(2).Apply
EndWith
![Page 752: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/752.jpg)
PictureMethodSetsthegraphicsfiletobeusedforbulletsinabulletedlistwhentheTypepropertyoftheBulletFormatobjectissettoppBulletPicture.
expression.Picture(Picture)
expressionRequired.AnexpressionthatreturnsaBulletFormatobjectoftypeppBulletPicture.
PictureRequiredString.Thepathandfilenameofavalidgraphicsfile.
![Page 753: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/753.jpg)
Remarks
Validgraphicsfilesincludefileswiththefollowingextensions:.bmp,.cdr,.cgm,.drw,.dxf,.emf,.eps,.gif,.jpg,.jpeg,.pcd,.pct,.pcx,.pict,.png,.tga,.tiff,.wmf,and.wpg.
![Page 754: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/754.jpg)
Example
Thisexamplesetsthebulletsinthetextboxspecifiedbyshapetwoonslideonetoabitmappictureofabluerivet.
WithActivePresentation.Slides(1).Shapes(2).TextFrame
With.TextRange.ParagraphFormat.Bullet
.Type=ppBulletPicture
.Picture("C:\Windows\BlueRivets.bmp")
EndWith
EndWith
![Page 755: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/755.jpg)
PlayMethodPlaysthespecifiedsoundeffect.
expression.Play
expressionRequired.AnexpressionthatreturnsaSoundEffectobject.
![Page 756: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/756.jpg)
Example
Thisexampleplaysthesoundeffectthat'sbeensetforthetransitiontoslidetwointheactivepresentation.
ActivePresentation.Slides(2).SlideShowTransition.SoundEffect.Play
![Page 757: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/757.jpg)
PointsToScreenPixelsXMethodConvertsahorizontalmeasurementfrompointstopixels.Usedtoreturnahorizontalscreenlocationforatextframeorshape.ReturnstheconvertedmeasurementasaSingle.
expression.PointsToScreenPixelsX(Points)
expressionRequired.AnexpressionthatreturnsaDocumentWindowobject.
PointsRequiredSingle.Thehorizontalmeasurement(inpoints)tobeconvertedtopixels.
![Page 758: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/758.jpg)
Example
Thisexampleconvertsthewidthandheightoftheselectedtextframeboundingboxfrompointstopixels,andreturnsthevaluestomyXparmandmyYparm.
WithActiveWindow
myXparm=.PointsToScreenPixelsX_
(.Selection.TextRange.BoundWidth)
myYparm=.PointsToScreenPixelsY_
(.Selection.TextRange.BoundHeight)
EndWith
![Page 759: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/759.jpg)
PointsToScreenPixelsYMethodConvertsaverticalmeasurementfrompointstopixels.Usedtoreturnaverticalscreenlocationforatextframeorshape.ReturnstheconvertedmeasurementasaSingle.
expression.PointsToScreenPixelsY(Points)
expressionRequired.AnexpressionthatreturnsaDocumentWindowobject.
PointsRequiredSingle.Theverticalmeasurement(inpoints)tobeconvertedtopixels.
![Page 760: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/760.jpg)
Example
Thisexampleconvertsthewidthandheightoftheselectedtextframeboundingboxfrompointstopixels,andreturnsthevaluestomyXparmandmyYparm.
WithActiveWindow
myXparm=.PointsToScreenPixelsX_
(.Selection.TextRange.BoundWidth)
myYparm=.PointsToScreenPixelsY_
(.Selection.TextRange.BoundHeight)
EndWith
![Page 761: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/761.jpg)
ShowAll
![Page 762: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/762.jpg)
PresetDropMethodSpecifieswhetherthecalloutlineattachestothetop,bottom,orcenterofthecallouttextboxorwhetheritattachesatapointthat'saspecifieddistancefromthetoporbottomofthetextbox.
expression.PresetDrop(DropType)
expressionRequired.AnexpressionthatreturnsaCalloutFormatobject.
DropTypeRequiredMsoCalloutDropType.Thestartingpositionofthecalloutlinerelativetothetextboundingbox.
MsoCalloutDropTypecanbeoneoftheseMsoCalloutDropTypeconstants.msoCalloutDropBottommsoCalloutDropCentermsoCalloutDropCustomSpecifyingthisconstantwillcauseyourcodetofail.msoCalloutDropMixedmsoCalloutDropTop
![Page 763: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/763.jpg)
Example
ThisexamplespecifiesthatthecalloutlineattachtothetopofthetextboundingboxforshapeoneonmyDocument.Fortheexampletowork,shapeonemustbeacallout.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(1).Callout.PresetDropmsoCalloutDropTop
ThisexampletogglesbetweentwopresetdropsforshapeoneonmyDocument.Fortheexampletowork,shapeonemustbeacallout.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).Callout
If.DropType=msoCalloutDropTopThen
.PresetDropmsoCalloutDropBottom
ElseIf.DropType=msoCalloutDropBottomThen
.PresetDropmsoCalloutDropTop
EndIf
EndWith
![Page 764: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/764.jpg)
ShowAll
![Page 765: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/765.jpg)
PresetGradientMethodSetsthespecifiedfilltoapresetgradient.
expression.PresetGradient(Style,Variant,PresetGradientType)
expressionRequired.AnexpressionthatreturnsaFillFormatobject.
StyleRequiredMsoGradientStyle.Thegradientstyle.
MsoGradientStylecanbeoneoftheseMsoGradientStyleconstants.msoGradientDiagonalDownmsoGradientDiagonalUpmsoGradientFromCentermsoGradientFromCornermsoGradientFromTitlemsoGradientHorizontalmsoGradientMixedmsoGradientVertical
VariantRequiredInteger.Thegradientvariant.Canbeavaluefrom1to4,correspondingtothefourvariantsontheGradienttabintheFillEffectsdialogbox.IfStyleismsoGradientFromTitleormsoGradientFromCenter,thisargumentcanbeeither1or2.
PresetGradientTypeRequiredMsoPresetGradientType.Thegradienttype.
MsoPresetGradientTypecanbeoneoftheseMsoPresetGradientTypeconstants.msoGradientBrassmsoGradientCalmWatermsoGradientChromemsoGradientChromeIImsoGradientDaybreakmsoGradientDesert
![Page 766: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/766.jpg)
msoGradientEarlySunsetmsoGradientFiremsoGradientFogmsoGradientGoldmsoGradientGoldIImsoGradientHorizonmsoGradientLateSunsetmsoGradientMahoganymsoGradientMossmsoGradientNightfallmsoGradientOceanmsoGradientParchmentmsoGradientPeacockmsoGradientRainbowmsoGradientRainbowIImsoGradientSapphiremsoGradientSilvermsoGradientWheatmsoPresetGradientMixed
![Page 767: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/767.jpg)
Example
ThisexampleaddsarectanglewithapresetgradientfilltomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddShape(msoShapeRectangle,90,90,140,80)_
.Fill.PresetGradientmsoGradientHorizontal,1,msoGradientBrass
![Page 768: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/768.jpg)
ShowAll
![Page 769: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/769.jpg)
PresetTexturedMethodSetsthespecifiedfilltoapresettexture.
expression.PresetTextured(PresetTexture)
expressionRequired.AnexpressionthatreturnsaFillFormatobject.
PresetTextureRequiredMsoPresetTexture.Thepresettexture.
MsoPresetTexturecanbeoneoftheseMsoPresetTextureconstants.msoPresetTextureMixedmsoTextureBlueTissuePapermsoTextureBouquetmsoTextureBrownMarblemsoTextureCanvasmsoTextureCorkmsoTextureDenimmsoTextureFishFossilmsoTextureGranitemsoTextureGreenMarblemsoTextureMediumWoodmsoTextureNewsprintmsoTextureOakmsoTexturePaperBagmsoTexturePapyrusmsoTextureParchmentmsoTexturePinkTissuePapermsoTexturePurpleMeshmsoTextureRecycledPapermsoTextureSandmsoTextureStationerymsoTextureWalnut
![Page 770: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/770.jpg)
msoTextureWaterDropletsmsoTextureWhiteMarblemsoTextureWovenMat
![Page 771: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/771.jpg)
Example
Thisexampleaddsarectanglewithagreen-marbletexturedfilltomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddShape(msoShapeCan,90,90,40,80)_
.Fill.PresetTexturedmsoTextureGreenMarble
![Page 772: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/772.jpg)
PreviousMethodShowtheslideimmediatelyprecedingtheslidethat'scurrentlydisplayed.Ifyouarecurrentlyonthefirstslideinakioskslideshow,thePreviousmethodtakesyoutothelastslideinaslideshow;otherwise,ithasnoeffectifthefirstslideinthepresentationiscurrentlydisplayed.UsetheViewpropertyoftheSlideShowWindowobjecttoreturntheSlideShowViewobject.
expression.Previous
expressionRequired.AnexpressionthatreturnsoneoftheitemsintheAppliesTolist.
![Page 773: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/773.jpg)
Example
Thisexampleshowstheslideimmediatelyprecedingthecurrentlydisplayedslideonslideshowwindowone.
SlideShowWindows(1).View.Previous
![Page 774: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/774.jpg)
PrevNodeMethodReturnsaDiagramNodeobjectthatrepresentsthepreviousdiagramnodeinacollectionofdiagramnodes.
expression.PrevNode
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 775: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/775.jpg)
Example
Thefollowingexampleaddsadditionalchildnodestothefirstchildnode,whichisthenodeprevioustothesecondnode,inanewly-createddiagram.
SubAddNodeToFirstChild()
DimdgnNodeAsDiagramNode
DimdgnPrevAsDiagramNode
DimshpOrgChartAsShape
DimintNodesAsInteger
'Addsorgchartandrootnode
SetshpOrgChart=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramOrgChart,Left:=10,_
Top:=15,Width:=400,Height:=475)
SetdgnNode=shpOrgChart.DiagramNode.Children.AddNode
'Addsthreechildnodestorootnode
ForintNodes=1To3
dgnNode.Children.AddNode
NextintNodes
'SetsdgnPrevequaltofirstchildnode(thenode
'previoustothesecondchildnode)
SetdgnPrev=dgnNode.Children.Item(2).PrevNode
'Addsthreechildnodestofirstchildnode
ForintNodes=1To3
dgnPrev.Children.AddNode
NextintNodes
EndSub
![Page 776: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/776.jpg)
ShowAll
![Page 777: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/777.jpg)
PrintOutMethodPrintsthespecifiedpresentation.
expression.PrintOut(From,To,PrintToFile,Copies,Collate)
expressionRequired.AnexpressionthatreturnsaPresentationobject.
FromOptionalInteger.Thenumberofthefirstpagetobeprinted.Ifthisargumentisomitted,printingstartsatthebeginningofthepresentation.SpecifyingtheToandFromargumentssetsthecontentsofthePrintRangesobjectandsetsthevalueoftheRangeTypepropertyforthepresentation.
ToOptionalInteger.Thenumberofthelastpagetobeprinted.Ifthisargumentisomitted,printingcontinuestotheendofthepresentation.SpecifyingtheToandFromargumentssetsthecontentsofthePrintRangesobjectandsetsthevalueoftheRangeTypepropertyforthepresentation.
PrintToFileOptionalString.Thenameofthefiletoprintto.Ifyouspecifythisargument,thefileisprintedtoafileratherthansenttoaprinter.Ifthisargumentisomitted,thefileissenttoaprinter.
CopiesOptionalInteger.Thenumberofcopiestobeprinted.Ifthisargumentisomitted,onlyonecopyisprinted.SpecifyingthisargumentsetsthevalueoftheNumberOfCopiesproperty.
CollateOptionalMsoTriState.Ifthisargumentisomitted,multiplecopiesarecollated.SpecifyingthisargumentsetsthevalueoftheCollateproperty.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTruePrintsacompletecopyofthepresentationbeforethefirstpageofthenextcopyisprinted.
![Page 778: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/778.jpg)
Example
Thisexampleprintstwouncollatedcopiesofeachslide—whethervisibleorhidden—fromslidetwotoslidefiveintheactivepresentation.
WithApplication.ActivePresentation
.PrintOptions.PrintHiddenSlides=True
.PrintOutFrom:=2,To:=5,Copies:=2,Collate:=msoFalse
EndWith
ThisexampleprintsasinglecopyofallslidesintheactivepresentationtothefileTestprnt.prn.
Application.ActivePresentation.PrintOut_
PrintToFile:="TestPrnt"
![Page 779: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/779.jpg)
PublishMethodCreatesaWebpresentation(HTMLformat)fromanyloadedpresentation.YoucanviewthepublishedpresentationinaWebbrowser.
expression.Publish
expressionRequired.AnexpressionthatreturnsaPublishObjectobject.
![Page 780: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/780.jpg)
Remarks
YoucanspecifythecontentandattributesofthepublishedpresentationbysettingvariouspropertiesofthePublishObjectobject.Forexample,theSourceTypepropertydefinestheportionofaloadedpresentationtobepublished.TheRangeStartpropertyandtheRangeEndpropertyspecifytherangeofslidestopublish,andtheSpeakerNotespropertydesignateswhetherornottopublishthespeaker'snotes.
![Page 781: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/781.jpg)
Example
ThisexamplepublishesslidesthreethroughfiveoftheactivepresentationtoHTML.ItnamesthepublishedpresentationMallard.htm.
WithActivePresentation.PublishObjects(1)
.FileName="C:\Test\Mallard.htm"
.SourceType=ppPublishSlideRange
.RangeStart=3
.RangeEnd=5
.Publish
EndWith
![Page 782: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/782.jpg)
QuitMethodQuitsPowerPoint.ThisisequivalenttoclickingExitontheFilemenu.
expression.Quit
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 783: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/783.jpg)
Remarks
Toavoidbeingpromptedtosavechanges,useeithertheSaveorSaveAsmethodtosaveallopenpresentationsbeforecallingtheQuitmethod.
![Page 784: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/784.jpg)
Example
ThisexamplesavesallopenpresentationsandthenquitsPowerPoint.
WithApplication
ForEachwIn.Presentations
w.Save
Nextw
.Quit
EndWith
![Page 785: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/785.jpg)
ShowAll
![Page 786: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/786.jpg)
RangeMethodRangemethodasitappliestotheShapesobject.
ReturnsaShapeRangeobjectthatrepresentsasubsetoftheshapesinaShapescollection.
expression.Range(Index)
expressionRequired.AnexpressionthatreturnsaShapescollectionobject.
IndexOptionalVariant.Theindividualshapesthataretobeincludedintherange.CanbeanIntegerthatspecifiestheindexnumberoftheshape,aStringthatspecifiesthenameoftheshape,oranarraythatcontainseitherintegersorstrings.Ifthisargumentisomitted,theRangemethodreturnsalltheobjectsinthespecifiedcollection.
RangemethodasitappliestotheGroupShapesobject.
ReturnsaShapeRangeobject.
expression.Range(Index)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
IndexRequiredVariant.Theindividualshapesthataretobeincludedintherange.CanbeanIntegerthatspecifiestheindexnumberoftheshape,aStringthatspecifiesthenameoftheshape,oranarraythatcontainseitherintegersorstrings.Ifthisargumentisomitted,theRangemethodreturnsalltheobjectsinthespecifiedcollection.
RangemethodasitappliestotheSlidesobject.
ReturnsaSlideRangeobjectthatrepresentsasubsetoftheslidesinaSlidescollection.
expression.Range(Index)
![Page 787: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/787.jpg)
expressionRequired.AnexpressionthatreturnsaSlidescollectionobject.
IndexOptionalVariant.Theindividualslidesthataretobeincludedintherange.CanbeanIntegerthatspecifiestheindexnumberoftheslide,aStringthatspecifiesthenameoftheslide,oranarraythatcontainseitherintegersorstrings.Ifthisargumentisomitted,theRangemethodreturnsalltheobjectsinthespecifiedcollection.
![Page 788: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/788.jpg)
Remarks
AlthoughyoucanusetheRangemethodtoreturnanynumberofshapesorslides,it'ssimplertousetheItemmethodifyouonlywanttoreturnasinglememberofthecollection.Forexample,Shapes(1)issimplerthanShapes.Range(1),andSlides(2)issimplerthanSlides.Range(2).
TospecifyanarrayofintegersorstringsforIndex,youcanusetheArrayfunction.Forexample,thefollowinginstructionreturnstwoshapesspecifiedbyname.
DimmyArray()AsVariant,myRangeAsObject
myArray=Array("Oval4","Rectangle5")
SetmyRange=ActivePresentation.Slides(1).Shapes.Range(myArray)
![Page 789: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/789.jpg)
Example
AsitappliestotheShapesobject.
ThisexamplesetsthefillpatternforshapesoneandthreeonmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.Range(Array(1,3)).Fill_
.PatternedmsoPatternHorizontalBrick
ThisexamplesetsthefillpatternfortheshapesnamedOval4andRectangle5onthefirstslide.
DimmyArray()AsVariant,myRangeAsObject
myArray=Array("Oval4","Rectangle5")
SetmyRange=ActivePresentation.Slides(1).Shapes.Range(myArray)
myRange.Fill.PatternedmsoPatternHorizontalBrick
Thisexamplesetsthefillpatternforallshapesonthefirstslide.
ActivePresentation.Slides(1).Shapes.Range.Fill_
.PatternedPattern:=msoPatternHorizontalBrick
Thisexamplesetsthefillpatternforshapeoneonthefirstslide.
SetmyDocument=ActivePresentation.Slides(1)
SetmyRange=myDocument.Shapes.Range(1)
myRange.Fill.PatternedmsoPatternHorizontalBrick
ThisexamplecreatesanarraythatcontainsalltheAutoShapesonthefirstslide,usesthatarraytodefineashaperange,andthendistributesalltheshapesinthatrangehorizontally.
WithmyDocument.Shapes
numShapes=.Count
'Continuesifthereareshapesontheslide
IfnumShapes>1Then
numAutoShapes=0
![Page 790: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/790.jpg)
ReDimautoShpArray(1TonumShapes)
Fori=1TonumShapes
'CountsthenumberofAutoShapesontheSlide
If.Item(i).Type=msoAutoShapeThen
numAutoShapes=numAutoShapes+1
autoShpArray(numAutoShapes)=.Item(i).Name
EndIf
Next
'AddsAutoShapestoShapeRange
IfnumAutoShapes>1Then
ReDimPreserveautoShpArray(1TonumAutoShapes)
SetasRange=.Range(autoShpArray)
asRange.DistributemsoDistributeHorizontally,False
EndIf
EndIf
EndWith
AsitappliestotheSlidesobject.
Thisexamplesetsthetitlecolorforslidesoneandthree.
SetmySlides=ActivePresentation.Slides.Range(Array(1,3))
mySlides.ColorScheme.Colors(ppTitle).RGB=RGB(0,255,0)
ThisexamplesetsthetitlecolorfortheslidesnamedSlide6andSlide8.
SetmySlides=ActivePresentation.Slides_
.Range(Array("Slide6","Slide8"))
mySlides.ColorScheme.Colors(ppTitle).RGB=RGB(0,255,0)
Thisexamplesetsthetitlecolorforalltheslidesintheactivepresentation.
SetmySlides=ActivePresentation.Slides.Range
mySlides.ColorScheme.Colors(ppTitle).RGB=RGB(255,0,0)
Thisexamplecreatesanarraythatcontainsallthetitleslidesintheactivepresentation,usesthatarraytodefineasliderange,andthensetsthetitlecolorforallslidesinthatrange.
![Page 791: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/791.jpg)
DimMyTitleArray()AsLong
SetpSlides=ActivePresentation.Slides
ReDimMyTitleArray(1TopSlides.Count)
ForEachpSlideInpSlides
IfpSlide.Layout=ppLayoutTitleThen
nCounter=nCounter+1
MyTitleArray(nCounter)=pSlide.SlideIndex
EndIf
NextpSlide
ReDimPreserveMyTitleArray(1TonCounter)
SetrngTitleSlides=ActivePresentation.Slides.Range(MyTitleArray)
rngTitleSlides.ColorScheme.Colors(ppTitle).RGB=RGB(255,123,99)
![Page 792: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/792.jpg)
RangeFromPointMethodReturnstheShapeobjectthatislocatedatthepointspecifiedbythescreenpositioncoordinatepair.Ifnoshapeislocatedatthecoordinatepairspecified,thenthemethodreturnsNothing.
expression.RangeFromPoint(x,y)
expressionRequired.AnexpressionthatreturnsaDocumentWindowobject.
xRequiredLong.Thehorizontaldistance(inpixels)fromtheleftedgeofthescreentothepoint.
yRequiredLong.Theverticaldistance(inpixels)fromthetopofthescreentothepoint.
![Page 793: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/793.jpg)
Example
Thisexampleaddsanewfive-pointstartoslideoneusingthecoordinates(288,100).Itthenconvertsthosecoordinatesfrompointstopixels,usestheRangeFromPointmethodtoreturnareferencetothenewobject,andchangesthefillcolorofthestar.
DimmyPointXAsInteger,myPointYAsInteger
DimmyShapeAsObject
ActivePresentation.Slides(1).Shapes_
.AddShape(msoShape5pointStar,288,100,100,72).Select
myPointX=ActiveWindow.PointsToScreenPixelsX(288)
myPointY=ActiveWindow.PointsToScreenPixelsY(100)
SetmyShape=ActiveWindow.RangeFromPoint(myPointX,myPointY)
myShape.Fill.ForeColor.RGB=RGB(80,160,130)
![Page 794: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/794.jpg)
RegroupMethodRegroupsthegroupthatthespecifiedshaperangebelongedtopreviously.ReturnstheregroupedshapesasasingleShapeobject.
expression.Regroup
expressionRequired.AnexpressionthatreturnsaShapeRangeobject.
![Page 795: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/795.jpg)
Remarks
TheRegroupmethodonlyrestoresthegroupforthefirstpreviouslygroupedshapeitfindsinthespecifiedShapeRangecollection.Therefore,ifthespecifiedshaperangecontainsshapesthatpreviouslybelongedtodifferentgroups,onlyoneofthegroupswillberestored.
Notethatbecauseagroupofshapesistreatedasasingleshape,groupingandungroupingshapeschangesthenumberofitemsintheShapescollectionandchangestheindexnumbersofitemsthatcomeaftertheaffecteditemsinthecollection.
![Page 796: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/796.jpg)
Example
Thisexampleregroupstheshapesintheselectionintheactivewindow.Iftheshapeshaven'tbeenpreviouslygroupedandungrouped,thisexamplewillfail.
ActiveWindow.Selection.ShapeRange.Regroup
![Page 797: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/797.jpg)
ShowAll
![Page 798: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/798.jpg)
ReloadAsMethodReloadsapresentationbasedonaspecifiedHTMLdocumentencoding.
expression.ReloadAs(cp)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
cpRequiredMsoEncoding.ThedocumentencodingtousewhenreloadingtheWebpage.
MsoEncodingcanbeoneoftheseMsoEncodingconstants.msoEncodingArabicAutoDetectmsoEncodingAutoDetectmsoEncodingCyrillicAutoDetectmsoEncodingGreekAutoDetectmsoEncodingJapaneseAutoDetectmsoEncodingKoreanAutoDetectmsoEncodingSimplifiedChineseAutoDetectmsoEncodingTraditionalChineseAutoDetect
![Page 799: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/799.jpg)
Example
ThisexamplereloadstheactivepresentationusingWesternencoding.
ActivePresentation.ReloadAs(msoEncodingWestern)
![Page 800: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/800.jpg)
RemoveMethodRemovesanadd-infromthecollectionofadd-ins.
expression.Remove(Index)
expressionRequired.AnexpressionthatreturnsanAddInsobject.
IndexRequiredVariant.Thenameoftheadd-intoberemovedfromthecollection.
![Page 801: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/801.jpg)
Example
Thisexampleremovestheadd-innamed"MyTools"fromthelistofavailableadd-ins.
AddIns.Remove"mytools"
![Page 802: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/802.jpg)
RemoveBaselineMethodRemovesthebaselinefromthepresentation.
expression.RemoveBaseline
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 803: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/803.jpg)
Remarks
Thismethodgeneratesanerrorifthepresentationisanauthorpresentationorifthereisnobaseline.
![Page 804: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/804.jpg)
Example
Thefollowinglineofcoderemovesthebaselinefromtheactivepresentation.
SubRmvBaseline()
ActivePresentation.RemoveBaseline
EndSub
![Page 805: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/805.jpg)
RemovePeriodsMethodRemovestheperiodattheendofeachparagraphinthespecifiedtext.
expression.RemovePeriods
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
![Page 806: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/806.jpg)
Example
Thisexampleremovestheperiodattheendofeachparagraphinshapetwoonslideoneintheactivepresentation.
Application.ActivePresentation.Slides(1)_
.Shapes(2).TextFrame.TextRange_
.RemovePeriods
![Page 807: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/807.jpg)
ShowAll
![Page 808: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/808.jpg)
ReplaceMethodReplacemethodasitappliestotheTextRangeobject.
Findsspecifictextinatextrange,replacesthefoundtextwithaspecifiedstring,andreturnsaTextRangeobjectthatrepresentsthefirstoccurrenceofthefoundtext.ReturnsNothingifnomatchisfound.
expression.Replace(FindWhat,ReplaceWhat,After,MatchCase,WholeWords)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
FindWhatRequiredString.Thetexttosearchfor.
ReplaceWhatRequiredString.Thetextyouwanttoreplacethefoundtextwith.
AfterOptionalInteger.Thepositionofthecharacter(inthespecifiedtextrange)afterwhichyouwanttosearchforthenextoccurrenceofFindWhat.Forexample,ifyouwanttosearchfromthefifthcharacterofthetextrange,specify4forAfter.Ifthisargumentisomitted,thefirstcharacterofthetextrangeisusedasthestartingpointforthesearch.
MatchCaseOptionalMsoTriState.Determineswhetheradistinctionismadeonthebasisofcase.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.msoTriStateMixedmsoTriStateTogglemsoTrueDistinguishbetweenuppercaseandlowercasecharacters.
WholeWordsOptionalMsoTriState.Determineswhetheronlywholewordsarefound.
![Page 809: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/809.jpg)
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.msoTriStateMixedmsoTriStateTogglemsoTrueFindonlywholewords,andnotpartsoflargerwords.
ReplacemethodasitappliestotheFontsobject.
ReplacesafontintheFontscollection.
expression.Replace(Original,Replacement)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
OriginalRequiredString.Thenameofthefonttoreplace.
ReplacementRequiredString.Thethenameofthereplacementfont.
![Page 810: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/810.jpg)
Example
AsitappliestotheTextRangeobject.
Thisexamplereplaceseverywhole-wordoccurrenceof"like"inalloftheshapesintheactivepresentationwith"NOTLIKE".
SubReplaceText()
DimoSldAsSlide
DimoShpAsShape
DimoTxtRngAsTextRange
DimoTmpRngAsTextRange
SetoSld=Application.ActivePresentation.Slides(1)
ForEachoShpInoSld.Shapes
SetoTxtRng=oShp.TextFrame.TextRange
SetoTmpRng=oTxtRng.Replace(FindWhat:="like",_
Replacewhat:="NOTLIKE",WholeWords:=True)
DoWhileNotoTmpRngIsNothing
SetoTxtRng=oTxtRng.Characters(oTmpRng.Start+oTmpRng.Length,_
oTxtRng.Length)
SetoTmpRng=oTxtRng.Replace(FindWhat:="like",_
Replacewhat:="NOTLIKE",WholeWords:=True)
Loop
NextoShp
EndSub
AsitappliestotheFontsobject.
ThisexamplereplacestheTimesNewRomanfontwiththeCourierfontintheactivepresentation.
Application.ActivePresentation.Fonts_
.ReplaceOriginal:="TimesNewRoman",Replacement:="Courier"
![Page 811: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/811.jpg)
![Page 812: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/812.jpg)
ReplaceNodeMethodReplacesatargetdiagramnodewiththesourcediagramnode.Thetargetdiagramnodeisdeleted,andthesourcediagramnode,includinganyofitschildnodes,aremovedtowherethetargetdiagramnodewas.
expression.ReplaceNode(TargetNode)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
TargetNodeRequiredDiagramNodeobject.Thediagramnodetobereplaced.
![Page 813: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/813.jpg)
Example
Thefollowingexamplereplacesthelastdiagramnodeofanewly-createddiagramwiththesecondnode.
SubReplaceLastNode()
DimdgnNodeAsDiagramNode
DimshpRadialAsShape
DimintNodesAsInteger
'Addsradialdiagramandrootnode
SetshpRadial=ActivePresentation.Slides(1).Shapes.AddDiagram_
(Type:=msoDiagramRadial,Left:=10,Top:=15,_
Width:=400,Height:=475)
SetdgnNode=shpRadial.DiagramNode.Children.AddNode
'Addsthreeadditionalchildnodes
ForintNodes=1To3
dgnNode.Children.AddNode
NextintNodes
'Displaysthenumberofnodesinthediagram
MsgBox"Thenumberofnodesinthediagram:"&_
dgnNode.Diagram.Nodes.Count
'Secondnodereplacesthelastnode.
dgnNode.Diagram.Nodes(2).ReplaceNode_
TargetNode:=dgnNode.Diagram.Nodes(4)
'Nodecountisthreebecausethereplacednodewasdeleted
MsgBox"Thenumberofnodesinthediagram:"&_
dgnNode.Diagram.Nodes.Count
EndSub
![Page 814: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/814.jpg)
ReplyWithChangesMethodSendsane-mailmessagetotheauthorofapresentationthathasbeensentoutforreview,notifyingthemthatareviewerhascompletedreviewofthepresentation.
expression.ReplyWithChanges(ShowMessage)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
ShowMessageOptionalBoolean.Truetodisplaythemessagepriortosending.Falsetoautomaticallysendthemessagewithoutdisplayingitfirst.ThedefaultisTrue.
![Page 815: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/815.jpg)
Remarks
UsetheSendForReviewmethodtostartacollaborativereviewofapresentation.IftheReplyWithChangesmethodisexecutedonapresentationthatisnotpartofacollaborativereviewcycle,theuserwillreceiveanerrormessage.
![Page 816: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/816.jpg)
Example
Thisexamplesendsamessagetotheauthorofareviewdocumentthatareviewerhascompletedareview,withoutfirstdisplayingthee-mailmessagetothereviewer.Thisexampleassumesthattheactivepresentationispartofacollaborativereviewcycle.
SubReplyMsg()
ActivePresentation.ReplyWithChangesShowMessage:=False
EndSub
![Page 817: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/817.jpg)
RerouteConnectionsMethodReroutesconnectorssothattheytaketheshortestpossiblepathbetweentheshapestheyconnect.Todothis,theRerouteConnectionsmethodmaydetachtheendsofaconnectorandreattachthemtodifferentconnectingsitesontheconnectedshapes.
Thismethodreroutesallconnectorsattachedtothespecifiedshape;ifthespecifiedshapeisaconnector,it'srerouted.
expression.RerouteConnections
expressionRequired.AnexpressionthatreturnsaShapeorShapeRangeobject.
![Page 818: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/818.jpg)
Remarks
Ifthismethodisappliedtoaconnector,onlythatconnectorwillbererouted.Ifthismethodisappliedtoaconnectedshape,allconnectorstothatshapewillbererouted.
![Page 819: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/819.jpg)
Example
ThisexampleaddstworectanglestomyDocument,connectsthemwithacurvedconnector,andthenreroutestheconnectorsothatittakestheshortestpossiblepathbetweenthetworectangles.NotethattheRerouteConnectionsmethodadjuststhesizeandpositionoftheconnectoranddetermineswhichconnectingsitesitattachesto,sothevaluesyouinitiallyspecifyfortheConnectionSiteargumentsusedwiththeBeginConnectandEndConnectmethodsareirrelevant.
SetmyDocument=ActivePresentation.Slides(1)
Sets=myDocument.Shapes
SetfirstRect=s.AddShape(msoShapeRectangle,100,50,200,100)
SetsecondRect=s.AddShape(msoShapeRectangle,300,300,200,100)
SetnewConnector=s_
.AddConnector(msoConnectorCurve,0,0,100,100)
WithnewConnector.ConnectorFormat
.BeginConnectfirstRect,1
.EndConnectsecondRect,1
EndWith
newConnector.RerouteConnections
![Page 820: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/820.jpg)
ResetRotationMethodResetstheextrusionrotationaroundthex-axisandthey-axisto0(zero)sothatthefrontoftheextrusionfacesforward.Thismethoddoesn'tresettherotationaroundthez-axis.
expression.ResetRotation
expressionRequired.AnexpressionthatreturnsaThreeDFormatobject.
![Page 821: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/821.jpg)
Remarks
Tosettheextrusionrotationaroundthex-axisandthey-axistoanythingotherthan0(zero),usetheRotationXandRotationYpropertiesoftheThreeDFormatobject.Tosettheextrusionrotationaroundthez-axis,usetheRotationpropertyoftheShapeobjectthatrepresentstheextrudedshape.
![Page 822: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/822.jpg)
Example
Thisexampleresetstherotationaroundthex-axisandthey-axisto0(zero)fortheextrusionofshapeoneonmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(1).ThreeD.ResetRotation
![Page 823: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/823.jpg)
ResetSlideTimeMethodResetstheelapsedtime(representedbytheSlideElapsedTimeproperty)fortheslidethat'scurrentlydisplayedto0(zero).
expression.ResetSlideTime
expressionRequired.AnexpressionthatreturnsaSlideShowViewobject.
![Page 824: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/824.jpg)
Example
Thisexampleresetstheelapsedtimefortheslidethat'scurrentlydisplayedinslideshowwindowoneto0(zero).
SlideShowWindows(1).View.ResetSlideTime
![Page 825: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/825.jpg)
RotatedBoundsMethodReturnsthecoordinatesoftheverticesofthetextboundingboxforthespecifiedtextrange.
expression.RotatedBounds(X1,Y1,X2,Y2,X3,Y3,X4,Y4)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
X1,Y1RequiredSingle.Returnstheposition(inpoints)ofthefirstvertexoftheboundingboxforthetextwithinthespecifiedtextrange.
X2,Y2RequiredSingle.Returnstheposition(inpoints)ofthesecondvertexoftheboundingboxforthetextwithinthespecifiedtextrange.
X3,Y3RequiredSingle.Returnstheposition(inpoints)ofthethirdvertexoftheboundingboxforthetextwithinthespecifiedtextrange.
X4,Y4RequiredSingle.Returnstheposition(inpoints)ofthefourthvertexoftheboundingboxforthetextwithinthespecifiedtextrange.
![Page 826: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/826.jpg)
Example
ThisexampleusesthevaluesreturnedbytheargumentsoftheRotatedBoundsmethodtodrawafreeformthathasthedimensionsofthetextboundingboxforthethirdwordinthetextrangeinshapeoneonslideoneintheactivepresentation.
Dimx1AsSingle,y1AsSingle
Dimx2AsSingle,y2AsSingle
Dimx3AsSingle,y3AsSingle
Dimx4AsSingle,y4AsSingle
DimmyDocumentAsSlide
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(1).TextFrame.TextRange.Words(3).RotatedBounds_
x1,y1,x2,y2,x3,y3,x4,y4
WithmyDocument.Shapes.BuildFreeform(msoEditingCorner,x1,y1)
.AddNodesmsoSegmentLine,msoEditingAuto,x2,y2
.AddNodesmsoSegmentLine,msoEditingAuto,x3,y3
.AddNodesmsoSegmentLine,msoEditingAuto,x4,y4
.AddNodesmsoSegmentLine,msoEditingAuto,x1,y1
.ConvertToShape.ZOrdermsoSendToBack
EndWith
![Page 827: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/827.jpg)
RtlRunMethodSetsthedirectionoftextinatextrangetoreadfromrighttoleft.
expression.RtlRun
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
![Page 828: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/828.jpg)
Remarks
Thismethodmakesitpossibletousetextfrombothleft-to-rightandright-to-leftlanguagesinthesamepresentation.
![Page 829: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/829.jpg)
Example
Thefollowingexamplefindsalloftheshapesonslideonethatcontaintextandchangesthetexttoreadfromrighttoleft.
ActiveWindow.ViewType=ppViewSlide
ForEachshInActivePresentation.Slides(1).Shapes
Ifsh.HasTextFrameThen
sh.TextFrame.TextRange.RtlRun
EndIf
Next
![Page 830: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/830.jpg)
ShowAll
![Page 831: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/831.jpg)
RunMethodRunmethodasitappliestotheSlideShowSettingsobject.
Runsaslideshowofthespecifiedpresentation.ReturnsaSlideShowWindowobject.
expression.Run
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 832: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/832.jpg)
Remarks
Torunacustomslideshow,settheRangeTypepropertytoppShowNamedSlideShow,andsettheSlideShowNamepropertytothenameofthecustomshowyouwanttorun.
RunmethodasitappliestotheApplicationobject.
RunsaVisualBasicprocedure.
NoteBecausemacroscancontainviruses,becarefulaboutrunningthem.Takethefollowingprecautions:runup-to-dateantivirussoftwareonyourcomputer;setyourmacrosecurityleveltohigh;cleartheTrustallinstalledadd-insandtemplatescheckbox;usedigitalsignatures;maintainalistoftrustedpublishers.
expression.Run(MacroName,safeArrayOfParams)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
MacroNameRequiredString.Thenameoftheproceduretoberun.Thestringcancontainthefollowing:aloadedpresentationoradd-infilenamefollowedbyanexclamationpoint(!),avalidmodulenamefollowedbyaperiod(.),andtheprocedurename.Forexample,thefollowingisavalidMacroNamevalue:"MyPres.ppt!Module1.Test."
safeArrayOfParamsRequiredVariant.Theargumenttobepassedtotheprocedure.Youcannotspecifyanobjectforthisargument,andyoucannotusenamedargumentswiththismethod.Argumentsmustbepassedbyposition.
![Page 833: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/833.jpg)
Example
AsitappliestotheSlideShowSettingsobject.
Thisexamplestartsafull-screenslideshowoftheactivepresentation,withshortcutkeysdisabled.
WithActivePresentation.SlideShowSettings
.ShowType=ppShowSpeaker
.Run.View.AcceleratorsEnabled=False
EndWith
Thisexamplerunsthenamedslideshow"QuickShow."
WithActivePresentation.SlideShowSettings
.RangeType=ppShowNamedSlideShow
.SlideShowName="QuickShow"
.Run
EndWith
AsitappliestotheApplicationobject.
Inthisexample,theMainproceduredefinesanarrayandthenrunsthemacroTestPass,passingthearrayasanargument.
SubMain()
Dimx(1To2)
x(1)="hi"
x(2)=7
Application.Run"TestPass",x
EndSub
SubTestPass(x)
MsgBoxx(1)
MsgBoxx(2)
EndSub
![Page 834: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/834.jpg)
![Page 835: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/835.jpg)
RunsMethodReturnsaTextRangeobjectthatrepresentsthespecifiedsubsetoftextruns.Atextrunconsistsofarangeofcharactersthatsharethesamefontattributes.Forinformationaboutcountingorloopingthroughtherunsinatextrange,seetheTextRangeobject.
expression.Runs(Start,Length)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
StartOptionalLong.Thefirstruninthereturnedrange.
LengthOptionalLong.Thenumberofrunstobereturned.
![Page 836: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/836.jpg)
Remarks
IfbothStartandLengthareomitted,thereturnedrangestartswiththefirstrunandendswiththelastparagraphinthespecifiedrange.
IfStartisspecifiedbutLengthisomitted,thereturnedrangecontainsonerun.
IfLengthisspecifiedbutStartisomitted,thereturnedrangestartswiththefirstruninthespecifiedrange.
IfStartisgreaterthanthenumberofrunsinthespecifiedtext,thereturnedrangestartswiththelastruninthespecifiedrange.
IfLengthisgreaterthanthenumberofrunsfromthespecifiedstartingruntotheendofthetext,thereturnedrangecontainsallthoseruns.
Arunconsistsofallcharactersfromthefirstcharacterafterafontchangetothesecond-to-lastcharacterwiththesamefontattributes.Forexample,considerthefollowingsentence:
Thisitalicwordisnotbold.
Intheprecedingsentence,thefirstrunconsistsoftheword"This"onlyifthespaceaftertheword"This"isn'tformattedasitalic(ifthespaceisitalic,thefirstrunisonlythefirstthreecharacters,or"Thi").Likewise,thesecondruncontainstheword"italic"onlyifthespaceafterthewordisformattedasitalic.
![Page 837: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/837.jpg)
Example
Thisexampleformatsthesecondruninshapetwoonslideoneintheactivepresentationasbolditalicifit'salreadyitalic.
WithApplication.ActivePresentation.Slides(1).Shapes(2)_
.TextFrame.TextRange
With.Runs(2).Font
If.ItalicThen
.Bold=True
EndIf
EndWith
EndWith
![Page 838: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/838.jpg)
SaveMethodSavesthespecifiedpresentation.
expression.Save
expressionRequired.AnexpressionthatreturnsaPresentationobject.
![Page 839: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/839.jpg)
Remarks
UsetheSaveAsmethodtosaveapresentationthathasn'tbeenpreviouslysaved.Todeterminewhetherapresentationhasbeensaved,testforanonemptyvaluefortheFullNameorPathproperty.Ifadocumentwiththesamenameasthespecifiedpresentationalreadyexistsondisk,thatdocumentwillbeoverwritten.Nowarningmessagewillbedisplayed.
Tomarkthepresentationassavedwithoutwritingittodisk,settheSavedpropertytoTrue.
![Page 840: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/840.jpg)
Example
Thisexamplesavestheactivepresentationifit'sbeenchangedsincethelasttimeitwassaved.
WithApplication.ActivePresentation
IfNot.SavedAnd.Path<>""Then.Save
EndWith
![Page 841: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/841.jpg)
ShowAll
![Page 842: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/842.jpg)
SaveAsMethodSavesapresentationthat'sneverbeensaved,orsavesapreviouslysavedpresentationunderadifferentname.
expression.SaveAs(Filename,FileFormat,EmbedFonts)
expressionRequired.AnexpressionthatreturnsaPresentationobject.
FilenameRequiredString.Specifiesthenametosavethefileunder.Ifyoudon'tincludeafullpath,PowerPointsavesthefileinthecurrentfolder.
FileFormatOptionalPpSaveAsFileType.Specifiesthesavedfileformat.Ifthisargumentisomitted,thefileissavedintheformatofapresentationinthecurrentversionofPowerPoint(ppSaveAsPresentation).
PpSaveAsFileTypecanbeoneofthesePpSaveAsFileTypeconstants.ppSaveAsHTMLv3ppSaveAsAddInppSaveAsBMPppSaveAsDefaultppSaveAsGIFppSaveAsHTMLppSaveAsHTMLDualppSaveAsJPGppSaveAsMetaFileppSaveAsPNGppSaveAsPowerPoint3ppSaveAsPowerPoint4ppSaveAsPowerPoint4FarEastppSaveAsPowerPoint7ppSaveAsPresentationDefault.ppSaveAsRTFppSaveAsShow
![Page 843: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/843.jpg)
ppSaveAsTemplateppSaveAsTIFppSaveAsWebArchive
EmbedFontsOptionalMsoTriState.SpecifieswhetherPowerPointembedsTrueTypefontsinthesavedpresentation.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedDefault.msoTriStateTogglemsoTruePowerPointembedsTrueTypefontsinthesavedpresentation.
![Page 844: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/844.jpg)
Example
Thisexamplesavesacopyoftheactivepresentationunderthename"NewFormatCopy.ppt."Bydefault,thiscopyissavedintheformatofapresentationinthecurrentversionofPowerPoint.ThepresentationisthensavedasaPowerPoint4.0filenamed"OldFormatCopy."
WithApplication.ActivePresentation
.SaveCopyAs"NewFormatCopy"
.SaveAs"OldFormatCopy",ppSaveAsPowerPoint4
EndWith
![Page 845: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/845.jpg)
ShowAll
![Page 846: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/846.jpg)
SaveCopyAsMethodSavesacopyofthespecifiedpresentationtoafilewithoutmodifyingtheoriginal.
expression.SaveCopyAs(FileName,FileFormat,EmbedTrueTypeFonts)
expressionRequired.AnexpressionthatreturnsaPresentationobject.
FileNameRequiredString.Specifiesthenametosavethefileunder.Ifyoudon'tincludeafullpath,PowerPointsavesthefileinthecurrentfolder.
FileFormatOptionalPpSaveAsFileType.Thefileformat.
PpSaveAsFileTypecanbeoneofthesePpSaveAsFileTypeconstants.ppSaveAsHTMLv3ppSaveAsAddInppSaveAsBMPppSaveAsDefaultdefaultppSaveAsGIFppSaveAsHTMLppSaveAsHTMLDualppSaveAsJPGppSaveAsMetaFileppSaveAsPNGppSaveAsPowerPoint3ppSaveAsPowerPoint4ppSaveAsPowerPoint4FarEastppSaveAsPowerPoint7ppSaveAsPresentationppSaveAsRTFppSaveAsShowppSaveAsTemplate
![Page 847: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/847.jpg)
ppSaveAsTIFppSaveAsWebArchive
EmbedTrueTypeFontsOptionalMsoTriState.SpecifieswhetherTrueTypefontsareembedded.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixeddefaultmsoTriStateTogglemsoTrue
![Page 848: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/848.jpg)
Example
Thisexamplesavesacopyoftheactivepresentationunderthename"NewFormatCopy.ppt."Bydefault,thiscopyissavedintheformatofapresentationinthecurrentversionofPowerPoint.ThepresentationisthensavedasaPowerPoint4.0filenamed"OldFormatCopy."
WithApplication.ActivePresentation
.SaveCopyAs"NewFormatCopy"
.SaveAs"OldFormatCopy",ppSaveAsPowerPoint4
EndWith
![Page 849: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/849.jpg)
ShowAll
![Page 850: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/850.jpg)
ScaleHeightMethodScalestheheightoftheshapebyaspecifiedfactor.ForpicturesandOLEobjects,youcanindicatewhetheryouwanttoscaletheshaperelativetotheoriginalsizeorrelativetothecurrentsize.ShapesotherthanpicturesandOLEobjectsarealwaysscaledrelativetotheircurrentheight.
expression.ScaleHeight(Factor,RelativeToOriginalSize,fScale)
expressionRequired.AnexpressionthatreturnsaShapeorShapeRangeobject.
FactorRequiredSingle.Specifiestheratiobetweentheheightoftheshapeafteryouresizeitandthecurrentororiginalheight.Forexample,tomakearectangle50percentlarger,specify1.5forthisargument.
RelativeToOriginalSizeRequiredMsoTriState.Specifieswhethertheshapeisscaledrelativetoitscurrentororiginalsize.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseScalestheshaperelativetoitscurrentsize.msoTriStateMixedmsoTriStateTogglemsoTrueScalestheshaperelativetoitsoriginalsize.YoucanspecifymsoTrueforthisargumentonlyifthespecifiedshapeisapictureoranOLEobject.
fScaleOptionalMsoScaleFrom.Thepartoftheshapethatretainsitspositionwhentheshapeisscaled.
MsoScaleFromcanbeoneoftheseMsoScaleFromconstants.msoScaleFromBottomRightmsoScaleFromMiddlemsoScaleFromTopLeftDefault.
![Page 851: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/851.jpg)
Example
ThisexamplescalesallpicturesandOLEobjectsonmyDocumentto175percentoftheiroriginalheightandwidth,anditscalesallothershapesto175percentoftheircurrentheightandwidth.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
SelectCases.Type
CasemsoEmbeddedOLEObject,msoLinkedOLEObject,_
msoOLEControlObject,msoLinkedPicture,msoPicture
s.ScaleHeight1.75,msoTrue
s.ScaleWidth1.75,msoTrue
CaseElse
s.ScaleHeight1.75,msoFalse
s.ScaleWidth1.75,msoFalse
EndSelect
Next
![Page 852: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/852.jpg)
ShowAll
![Page 853: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/853.jpg)
ScaleWidthMethodScalesthewidthoftheshapebyaspecifiedfactor.ForpicturesandOLEobjects,youcanindicatewhetheryouwanttoscaletheshaperelativetotheoriginalsizeorrelativetothecurrentsize.ShapesotherthanpicturesandOLEobjectsarealwaysscaledrelativetotheircurrentwidth.
expression.ScaleWidth(Factor,RelativeToOriginalSize,fScale)
expressionRequired.AnexpressionthatreturnsaShapeorShapeRangeobject.
FactorRequiredSingle.Specifiestheratiobetweenthewidthoftheshapeafteryouresizeitandthecurrentororiginalwidth.Forexample,tomakearectangle50percentlarger,specify1.5forthisargument.
RelativeToOriginalSizeRequiredMsoTriState.Specifieswhetherashapeisscaledrelativetoitscurrentororiginalsize.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseScalestheshaperelativetoitscurrentsize.msoTriStateMixedmsoTriStateTogglemsoTrueScalestheshaperelativetoitsoriginalsize.YoucanspecifymsoTrueforthisargumentonlyifthespecifiedshapeisapictureoranOLEobject.
fScaleOptionalMsoScaleFrom.Thepartoftheshapethatretainsitspositionwhentheshapeisscaled.
MsoScaleFromcanbeoneoftheseMsoScaleFromconstants.msoScaleFromBottomRightmsoScaleFromMiddlemsoScaleFromTopLeftDefault.
![Page 854: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/854.jpg)
Example
ThisexamplescalesallpicturesandOLEobjectsonmyDocumentto175percentoftheiroriginalheightandwidth,anditscalesallothershapesto175percentoftheircurrentheightandwidth.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
SelectCases.Type
CasemsoEmbeddedOLEObject,msoLinkedOLEObject,_
msoOLEControlObject,msoLinkedPicture,msoPicture
s.ScaleHeight1.75,msoTrue
s.ScaleWidth1.75,msoTrue
CaseElse
s.ScaleHeight1.75,msoFalse
s.ScaleWidth1.75,msoFalse
EndSelect
![Page 855: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/855.jpg)
ShowAll
![Page 856: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/856.jpg)
ScrollIntoViewMethodScrollsthedocumentwindowsothatitemswithinaspecifiedrectangularareaaredisplayedinthedocumentwindoworpane.
expression.ScrollIntoView(Left,Top,Width,Height,Start)
expressionRequired.AnexpressionthatreturnsaDocumentWindowobject.
LeftRequiredLong.Thehorizontaldistance(inpoints)fromtheleftedgeofthedocumentwindowtotherectangle.
TopRequiredLong.Theverticaldistance(inpoints)fromthetopofthedocumentwindowtotherectangle.
WidthRequiredLong.Thewidthoftherectangle(inpoints).
HeightRequiredLong.Theheightoftherectangle(inpoints).
StartOptionalMsoTriState.Determinesthestartingpositionoftherectangleinrelationtothedocumentwindow.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThebottomrightoftherectangleistoappearatthebottomrightofthedocumentwindow.msoTriStateMixedmsoTriStateTogglemsoTrueDefault.Thetopleftoftherectangleistoappearatthetopleftofthedocumentwindow.
![Page 857: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/857.jpg)
Remarks
Iftheboundingrectangleislargerthanthedocumentwindow,theStartargumentspecifieswhichendoftherectangledisplaysorgetsinitialfocus.Thismethodcannotbeusedwithoutlineorslidesorterviews.
![Page 858: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/858.jpg)
Example
Thisexamplebringsintoviewa100x200pointareabeginning50pointsfromtheleftedgeoftheslide,and20pointsfromthetopoftheslide.Thetopleftcorneroftherectangleispositionedatthetopleftcorneroftheactivedocumentwindow.
ActiveWindow.ScrollIntoViewLeft:=50,Top:=20,_
Width:=100,Height:=200
![Page 859: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/859.jpg)
ShowAll
![Page 860: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/860.jpg)
SelectMethodSelectmethodasitappliestotheCell,Column,Row,Slide,SlideRange,
andTextRangeobjects.
Selectsthespecifiedobject.
expression.Select
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
SelectmethodasitappliestotheShapeandShapeRangeobjects.
Selectsthespecifiedobject.
expression.Select(Replace)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
ReplaceOptionalMsoTriState.Specifieswhethertheselectionreplacesanypreviousselection.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseTheselectionisaddedtothepreviousselection.msoTriStateMixedmsoTriStateTogglemsoTrueDefault.Theselectionreplacesanypreviousselection.
![Page 861: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/861.jpg)
Remarks
Ifyoutrytomakeaselectionthatisn'tappropriatefortheview,yourcodewillfail.Forexample,youcanselectaslideinslidesorterviewbutnotinslideview.
![Page 862: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/862.jpg)
Example
AsitappliestotheCell,Column,Row,Slide,SlideRange,andTextRangeobjects
Thisexampleselectsthefirstfivecharactersinthetitleofslideoneintheactivepresentation.
ActivePresentation.Slides(1).Shapes.Title.TextFrame_
.TextRange.Characters(1,5).Select
Thisexampleselectsslideoneintheactivepresentation.
ActivePresentation.Slides(1).Select
Thisexampleselectsatablethathasbeenaddedtoanewslideinanewpresentation.Thetablehasthreerowsandthreecolumns.
WithPresentations.Add.Slides
.Add(1,ppLayoutBlank).Shapes.AddTable(3,3).Select
EndWith
AsitappliestotheShapeandShapeRangeobjects.
Thisexampleselectsshapesoneandthreeonslideoneintheactivepresentation.
ActivePresentation.Slides(1).Shapes.Range(Array(1,3)).Select
Thisexampleaddsshapestwoandfouronslideoneintheactivepresentationto
![Page 863: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/863.jpg)
thepreviousselection.
ActivePresentation.Slides(1).Shapes.Range(Array(2,4)).SelectFalse
![Page 864: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/864.jpg)
SelectAllMethodSelectsallshapes(inaShapescollection)oralldiagramnodes(inaDiagramNodesorDiagramNodeChildrencollection).
expression.SelectAll
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 865: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/865.jpg)
Example
ThisexampleselectsalltheshapesonmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.SelectAll
![Page 866: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/866.jpg)
SendFaxOverInternetMethodSendsapresentationasafaxtothespecifiedrecipients.
expression.SendFaxOverInternet(Recipients,Subject,ShowMessage)
expressionRequired.AnexpressionthatreturnsaPresentationobject.
RecipientsOptionalVariant.AStringthatrepresentsthefaxnumbersande-mailaddressesofthepeopletowhomtosendthefax.Separatemultiplerecipientswithasemicolon.
SubjectOptionalVariant.AStringthatrepresentsthesubjectlineforthefaxedpresentation.
ShowMessageOptionalVariant.Truedisplaysthefaxmessagebeforesendingit.Falsesendsthefaxwithoutdisplayingthefaxmessage.
![Page 867: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/867.jpg)
Remarks
UsingtheSendFaxOverInternetmethodrequiresthatthefaxservicebeenabledonauser'scomputer.
TheformatusedforspecifyingfaxnumbersintheRecipientsparameteriseitherrecipientsfaxnumber@usersfaxproviderorrecipientsname@recipientsfaxnumber.Youcanaccesstheuser'sfaxproviderinformationusingthefollowingregistrypath:
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\Services\Fax
UsetheFaxAddresskeyvalueundertheaboveregistrypathtodeterminetheformattouseforauser.
![Page 868: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/868.jpg)
Example
Thefollowingexamplesendsafaxtothefaxserviceprovider,whowillfaxthemessagetotherecipient.
ActivePresentation.SendFaxOverInternet_
"Foryourreview",True
![Page 869: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/869.jpg)
SendForReviewMethodSendsapresentationinane-mailmessageforreviewtothespecifiedrecipients.
expression.SendForReview(Recipients,Subject,ShowMessage,IncludeAttachment)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
RecipientsOptionalString.Astringthatliststhepeopletowhomtosendthemessage.Thesecanbeunresolvednamesandaliasesinane-mailphonebookorfulle-mailaddresses.Separatemultiplerecipientswithasemicolon(;).IfleftblankandShowMessageisFalse,youwillreceiveanerrormessage,andthemessagewillnotbesent.
SubjectOptionalString.Astringforthesubjectofthemessage.Ifleftblank,thesubjectwillbe:Pleasereview"filename".
ShowMessageOptionalBoolean.ABooleanvaluethatindicateswhetherthemessageshouldbedisplayedwhenthemethodisexecuted.ThedefaultvalueisTrue.IfsettoFalse,themessageisautomaticallysenttotherecipientswithoutfirstshowingthemessagetothesender.
IncludeAttachmentOptionalVariant.ABooleanvaluethatindicateswhetherthemessageshouldincludeanattachmentoralinktoaserverlocation.ThedefaultvalueisTrue.IfsettoFalse,thedocumentmustbestoredatasharedlocation.
![Page 870: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/870.jpg)
Remarks
TheSendForReviewmethodstartsacollaborativereviewcycle.UsetheEndReviewmethodtoendareviewcycle.
![Page 871: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/871.jpg)
Example
Thisexampleautomaticallysendstheactivepresentationasanattachmentinane-mailmessagetothespecifiedrecipients.
SubWebReview()
ActivePresentation.SendForReview_
Recipients:="[email protected];DanWilson",_
Subject:="Pleasereviewthisdocument.",_
ShowMessage:=False,_
IncludeAttachment:=True
EndSub
![Page 872: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/872.jpg)
SentencesMethodReturnsaTextRangeobjectthatrepresentsthespecifiedsubsetoftextsentences.Forinformationaboutcountingorloopingthroughthesentencesinatextrange,seetheTextRangeobject.
expression.Sentences(Start,Length)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
StartOptionalLong.Thefirstsentenceinthereturnedrange.
LengthOptionalLong.Thenumberofsentencestobereturned.
![Page 873: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/873.jpg)
Remarks
IfbothStartandLengthareomitted,thereturnedrangestartswiththefirstsentenceandendswiththelastparagraphinthespecifiedrange.
IfStartisspecifiedbutLengthisomitted,thereturnedrangecontainsonesentence.
IfLengthisspecifiedbutStartisomitted,thereturnedrangestartswiththefirstsentenceinthespecifiedrange.
IfStartisgreaterthanthenumberofsentencesinthespecifiedtext,thereturnedrangestartswiththelastsentenceinthespecifiedrange.
IfLengthisgreaterthanthenumberofsentencesfromthespecifiedstartingsentencetotheendofthetext,thereturnedrangecontainsallthosesentences.
![Page 874: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/874.jpg)
Example
Thisexampleformatsasboldthesecondsentenceinthesecondparagraphinshapetwoonslideoneintheactivepresentation.
Application.ActivePresentation.Slides(1).Shapes(2)_
.TextFrame.TextRange.Paragraphs(2).Sentences(2).Font_
.Bold=True
![Page 875: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/875.jpg)
ShowAll
![Page 876: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/876.jpg)
SetEditingTypeMethodSetstheeditingtypeofthenodespecifiedbyIndex.Ifthenodeisacontrolpointforacurvedsegment,thismethodsetstheeditingtypeofthenodeadjacenttoitthatjoinstwosegments.Notethat,dependingontheeditingtype,thismethodmayaffectthepositionofadjacentnodes.
expression.SetEditingType(Index,EditingType)
expressionRequired.AnexpressionthatreturnsaShapeNodesobject.
IndexRequiredLong.Thenodewhoseeditingtypeistobeset.
EditingTypeRequiredMsoEditingType.Theeditingtype.
MsoEditingTypecanbeoneoftheseMsoEditingTypeconstants.msoEditingAutomsoEditingCornermsoEditingSmoothmsoEditingSymmetric
![Page 877: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/877.jpg)
Example
ThisexamplechangesallcornernodestosmoothnodesinshapethreeonmyDocument.Shapethreemustbeafreeformdrawing.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Nodes
Forn=1to.Count
If.Item(n).EditingType=msoEditingCornerThen
.SetEditingTypen,msoEditingSmooth
EndIf
Next
EndWith
![Page 878: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/878.jpg)
ShowAll
![Page 879: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/879.jpg)
SetExtrusionDirectionMethodSetsthedirectionthattheextrusion'ssweeppathtakesawayfromtheextrudedshape.
expression.SetExtrusionDirection(PresetExtrusionDirection)
expressionRequired.AnexpressionthatreturnsaThreeDFormatobject.
PresetExtrusionDirectionRequiredMsoPresetExtrusionDirection.Specifiestheextrusiondirection.
MsoPresetExtrusionDirectioncanbeoneoftheseMsoPresetExtrusionDirectionconstants.msoExtrusionBottommsoExtrusionBottomLeftmsoExtrusionBottomRightmsoExtrusionLeftmsoExtrusionNonemsoExtrusionRightmsoExtrusionTopmsoExtrusionTopLeftmsoExtrusionTopRightmsoPresetExtrusionDirectionMixed
![Page 880: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/880.jpg)
Remarks
ThismethodsetsthePresetExtrusionDirectionpropertytothedirectionspecifiedbythePresetExtrusionDirectionargument.
![Page 881: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/881.jpg)
Example
ThisexamplespecifiesthattheextrusionforshapeoneonmyDocumentextendtowardthetopoftheshapeandthatthelightingfortheextrusioncomefromtheleft.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).ThreeD
.Visible=True
.SetExtrusionDirectionmsoExtrusionTop
.PresetLightingDirection=msoLightingLeft
EndWith
![Page 882: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/882.jpg)
ShowAll
![Page 883: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/883.jpg)
SetPasswordEncryptionOptionsMethodSetstheoptionsMicrosoftPowerPointusesforencryptingpresentationswithpasswords.
expression.SetPasswordEncryptionOptions(PasswordEncryptionProvider,PasswordEncryptionFileProperties,PasswordEncryptionKeyLength,PasswordEncryptionAlgorithm)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
PasswordEncryptionProviderRequiredString.Thenameoftheencryptionprovider.
PasswordEncryptionAlgorithmRequiredString.Thenameoftheencryptionalgorithm.PowerPointsupportsstream-encryptedalgorithms.
PasswordEncryptionKeyLengthRequiredLong.Theencryptionkeylength.Mustbeamultipleof8,startingat40.
PasswordEncryptionFilePropertiesRequiredMsoTriState.MsoTrueforPowerPointtoencryptfileproperties.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueNotusedwiththismethod.msoFalsemsoTriStateMixedNotusedwiththismethod.msoTriStateToggleNotusedwiththismethod.msoTrue
![Page 884: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/884.jpg)
Example
Thisexamplesetsthepasswordencryptionoptionsifthefilepropertiesarenotencryptedforpassword-protecteddocuments.
SubPasswordSettings()
WithActivePresentation
If.PasswordEncryptionFileProperties=msoFalseThen
.SetPasswordEncryptionOptions_
PasswordEncryptionProvider:="MicrosoftRSASChannelCryptographicProvider",_
PasswordEncryptionAlgorithm:="RC4",_
PasswordEncryptionKeyLength:=56,_
PasswordEncryptionFileProperties:=True
EndIf
EndWith
EndSub
![Page 885: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/885.jpg)
SetPositionMethodSetsthelocationofthenodespecifiedbyIndex.Notethat,dependingontheeditingtypeofthenode,thismethodmayaffectthepositionofadjacentnodes.
expression.SetPosition(Index,X1,Y1)
expressionRequired.AnexpressionthatreturnsaShapeNodesobject.
IndexRequiredLong.Thenodewhosepositionistobeset.
X1,Y1RequiredSingle.Theposition(inpoints)ofthenewnoderelativetotheupper-leftcornerofthedocument.
![Page 886: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/886.jpg)
Example
ThisexamplemovesnodetwoinshapethreeonmyDocumenttotheright200pointsanddown300points.Shapethreemustbeafreeformdrawing.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Nodes
pointsArray=.Item(2).Points
currXvalue=pointsArray(1,1)
currYvalue=pointsArray(1,2)
.SetPosition2,currXvalue+200,currYvalue+300
EndWith
![Page 887: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/887.jpg)
ShowAll
![Page 888: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/888.jpg)
SetSegmentTypeMethodSetsthesegmenttypeofthesegmentthatfollowsthenodespecifiedbyIndex.Ifthenodeisacontrolpointforacurvedsegment,thismethodsetsthesegmenttypeforthatcurve.Notethatthismayaffectthetotalnumberofnodesbyinsertingordeletingadjacentnodes.
expression.SetSegmentType(Index,SegmentType)
expressionRequired.AnexpressionthatreturnsaShapeNodesobject.
IndexRequiredLong.Thenodewhosesegmenttypeistobeset.
SegmentTypeRequiredMsoSegmentType.Specifiesifthesegmentisstraightorcurved.
MsoSegmentTypecanbeoneoftheseMsoSegmentTypeconstants.msoSegmentCurvemsoSegmentLine
![Page 889: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/889.jpg)
Example
ThisexamplechangesallstraightsegmentstocurvedsegmentsinshapethreeonmyDocument.Shapethreemustbeafreeformdrawing.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Nodes
n=1
Whilen<=.Count
If.Item(n).SegmentType=msoSegmentLineThen
.SetSegmentTypen,msoSegmentCurve
EndIf
n=n+1
Wend
EndWith
![Page 890: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/890.jpg)
ShowAll
![Page 891: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/891.jpg)
SetShapesDefaultPropertiesMethodAppliestheformattingforthespecifiedshapetothedefaultshape.Shapescreatedafterthismethodhasbeenusedwillhavethisformattingappliedtothembydefault.
expression.SetShapesDefaultProperties
expressionRequired.AnexpressionthatreturnsaShapeobject.
![Page 892: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/892.jpg)
Example
ThisexampleaddsarectangletomyDocument,formatstherectangle'sfill,appliestherectangle'sformattingtothedefaultshape,andthenaddsanothersmallerrectangletothedocument.Thesecondrectanglehasthesamefillasthefirstone.
Setmydocument=ActivePresentation.Slides(1)
Withmydocument.Shapes
With.AddShape(msoShapeRectangle,5,5,80,60)
With.Fill
.ForeColor.RGB=RGB(0,0,255)
.BackColor.RGB=RGB(0,204,255)
.PatternedmsoPatternHorizontalBrick
EndWith
'Setsformattingfordefaultshapes
.SetShapesDefaultProperties
EndWith
'Newshapehasdefaultformatting
.AddShapemsoShapeRectangle,90,90,40,30
EndWith
![Page 893: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/893.jpg)
ShowAll
![Page 894: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/894.jpg)
SetThreeDFormatMethodSetsthepresetextrusionformat.Eachpresetextrusionformatcontainsasetofpresetvaluesforthevariouspropertiesoftheextrusion.
expression.SetThreeDFormat(PresetThreeDFormat)
expressionRequired.AnexpressionthatreturnsaThreeDFormatobject.
PresetThreeDFormatRequiredMsoPresetThreeDFormat.Specifiesapresetextrusionformatthatcorrespondstooneoftheoptions(numberedfromlefttoright,fromtoptobottom)displayedwhenyouclickthe3-DbuttonontheDrawingtoolbar.
MsoPresetThreeDFormatcanbeoneoftheseMsoPresetThreeDFormatconstants.msoPresetThreeDFormatMixedSpecifyingthisconstantcausesanerror.msoThreeD1msoThreeD2msoThreeD3msoThreeD4msoThreeD5msoThreeD6msoThreeD7msoThreeD8msoThreeD9msoThreeD10msoThreeD11msoThreeD12msoThreeD13msoThreeD14msoThreeD15msoThreeD16
![Page 895: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/895.jpg)
msoThreeD17msoThreeD18msoThreeD19msoThreeD20
![Page 896: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/896.jpg)
Remarks
ThismethodsetsthePresetThreeDFormatpropertytotheformatspecifiedbythePresetThreeDFormatargument.
![Page 897: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/897.jpg)
Example
ThisexampleaddsanovaltomyDocumentandsetsitsextrusionformatto3DStyle12.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes_
.AddShape(msoShapeOval,30,30,50,25).ThreeD
.Visible=True
.SetThreeDFormatmsoThreeD12
EndWith
![Page 898: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/898.jpg)
SmallScrollMethodScrollsthroughthespecifieddocumentwindowbylinesandcolumns.
expression.SmallScroll(Down,Up,ToRight,ToLeft)
expressionRequired.AnexpressionthatreturnsaDocumentWindowobject.
DownOptionalLong.Specifiesthenumberoflinestoscrolldown.
UpOptionalLong.Specifiesthenumberoflinestoscrollup.
ToRightOptionalLong.Specifiesthenumberofcolumnstoscrollright.
ToLeftOptionalLong.Specifiesthenumberofcolumnstoscrollleft.
![Page 899: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/899.jpg)
Remarks
Ifnoargumentsarespecified,thismethodscrollsdownoneline.IfDownandUparebothspecified,theireffectsarecombined.Forexample,ifDownis2andUpis4,thismethodscrollsuptwolines.Similarly,ifRightandLeftarebothspecified,theireffectsarecombined.
Anyoftheargumentscanbeanegativenumber.
![Page 900: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/900.jpg)
Example
Thisexamplescrollsdownthreelinesintheactivewindow.
Application.ActiveWindow.SmallScrollDown:=3
![Page 901: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/901.jpg)
SolidMethodSetsthespecifiedfilltoauniformcolor.Usethismethodtoconvertagradient,textured,patterned,orbackgroundfillbacktoasolidfill.
expression.Solid
expressionRequired.AnexpressionthatreturnsaFillFormatobject.
![Page 902: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/902.jpg)
Example
ThisexampleconvertsallfillsonmyDocumenttouniformredfills.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Withs.Fill
.Solid
.ForeColor.RGB=RGB(255,0,0)
EndWith
Next
![Page 903: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/903.jpg)
SplitMethodSplitsasingletablecellintomultiplecells.
expression.SplitNumRows,NumColumns
expressionRequired.AnexpressionthatreturnsaCellobject.
NumRowsRequiredLong.Numberofrowsthatthecellisbeingsplitinto.
NumColumnsRequiredLong.Numberofcolumnsthatthecellisbeingsplitinto.
![Page 904: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/904.jpg)
Example
Thisexamplesplitsthefirstcellinthereferencedtableintotwocells,onedirectlyabovetheother.
ActivePresentation.Slides(2).Shapes(5).Table.Cell(1,1).Split2,1
![Page 905: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/905.jpg)
SwapNodeMethodSwapsthesourcediagramnodewiththetargetdiagramnode.Anychilddiagramnodesaremovedalongwiththeircorrespondingrootnodesunlessspecifiedotherwise.
expression.SwapNode(TargetNode,SwapChildren)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
TargetNodeRequiredDiagramNodeobject.Thetargetdiagramnode.
SwapChildrenOptionalBoolean.True(default)ifallchilddiagramnodesaremovedalongwiththeircorrespondingtargetorsourcediagramnodes.Falsetoswapjustthetargetandsourcediagramnodes,inheritingtheother'schilddiagramnodes.
![Page 906: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/906.jpg)
Example
Thefollowingexampleswapsthefirstandthirdnodesinanewly-createddiagram.
SubSwapTwoNodes()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
'Addsradialdiagramandfirstnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramRadial,Left:=10,_
Top:=15,Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addsthreeadditionalnodes
ForintNodes=1To3
dgnNode.Children.AddNode
NextintNodes
'Swapsthefirstandthethirdnodes
dgnNode.Children.Item(1).SwapNode_
TargetNode:=dgnNode.Children.Item(3)
EndSub
![Page 907: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/907.jpg)
ToggleVerticalTextMethodSwitchesthetextflowinthespecifiedWordArtfromhorizontaltovertical,orviceversa.
expression.ToggleVerticalText
expressionRequired.AnexpressionthatreturnsaTextEffectFormatobject.
![Page 908: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/908.jpg)
Remarks
UsingtheToggleVerticalTextmethodswapsthevaluesoftheWidthandHeightpropertiesoftheShapeobjectthatrepresentstheWordArtandleavestheLeftandToppropertiesunchanged.
TheFlipmethodandRotationpropertyoftheShapeobjectandtheRotatedCharspropertyandToggleVerticalTextmethodoftheTextEffectFormatobjectallaffectthecharacterorientationandthedirectionoftextflowinaShapeobjectthatrepresentsWordArt.Youmayhavetoexperimenttofindouthowtocombinetheeffectsofthesepropertiesandmethodstogettheresultyouwant.
![Page 909: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/909.jpg)
Example
ThisexampleaddsWordArtthatcontainsthetext"Test"tomyDocument,andswitchesfromhorizontaltextflow(thedefaultforthespecifiedWordArtstyle,msoTextEffect1)toverticaltextflow.
SetmyDocument=ActivePresentation.Slides(1)
SetnewWordArt=myDocument.Shapes.AddTextEffect_
(PresetTextEffect:=msoTextEffect1,Text:="Test",_
FontName:="ArialBlack",FontSize:=36,_
FontBold:=False,FontItalic:=False,Left:=100,Top:=100)
newWordArt.TextEffect.ToggleVerticalText
![Page 910: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/910.jpg)
TransferChildrenMethodMovesthechildnodesofonediagramnodetoanotherdiagramnode.
expression.TransferChildren(ReceivingNode)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
ReceivingNodeRequiredDiagramNodeobject.Thetarget(receiving)diagramnode.
![Page 911: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/911.jpg)
Example
Thefollowingexampletransfersthechildnodesfromthefirstnodetothethirdnodeofanewly-createddiagram.
SubTransferChildNodes()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
'Addsorgchartandrootnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramOrgChart,Left:=10,_
Top:=15,Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addsthreechildnodestorootnode
ForintNodes=1To3
dgnNode.Children.AddNode
NextintNodes
'Addsthreechildnodestofirstchildnode
ForintNodes=1To3
dgnNode.Children.Item(1).Children.AddNode
NextintNodes
'Transferschildrenofthefirstnodetothethirdnode
dgnNode.Children.Item(1).TransferChildren_
ReceivingNode:=dgnNode.Children.Item(3)
EndSub
![Page 912: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/912.jpg)
TrimTextMethodReturnsaTextRangeobjectthatrepresentsthespecifiedtextminusanytrailingspaces.
expression.TrimText
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
![Page 913: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/913.jpg)
Example
Thisexampleinsertsthestring"Texttotrim"atthebeginningofthetextinshapetwoonslideoneintheactivepresentationandthendisplaysmessageboxesshowingthestringbeforeandafterit'strimmed.
WithApplication.ActivePresentation.Slides(1).Shapes(2)_
.TextFrame.TextRange
With.InsertBefore("Texttotrim")
MsgBox"Untrimmed:"&""""&.Text&""""
MsgBox"Trimmed:"&""""&.TrimText.Text&""""
EndWith
EndWith
![Page 914: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/914.jpg)
ShowAll
![Page 915: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/915.jpg)
TwoColorGradientMethodSetsthespecifiedfilltoatwo-colorgradient.
expression.TwoColorGradient(Style,Variant)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
StyleRequiredMsoGradientStyle.Thegradientstyle.
MsoGradientStylecanbeoneoftheseMsoGradientStyleconstants.msoGradientDiagonalDownmsoGradientDiagonalUpmsoGradientFromCentermsoGradientFromCornermsoGradientFromTitlemsoGradientHorizontalmsoGradientMixedmsoGradientVertical
VariantRequiredLong.Thegradientvariant.Canbeavaluefrom1to4,correspondingtothefourvariantsontheGradienttabintheFillEffectsdialogbox.IfStyleismsoGradientFromTitleormsoGradientFromCenter,thisargumentcanbeeither1or2.
![Page 916: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/916.jpg)
Example
Thisexampleaddsarectanglewithatwo-colorgradientfilltomyDocument,andsetsthebackgroundandforegroundcolorforthefill.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(Type:=msoShapeRectangle,Left:=0,_
Top:=0,Width:=40,Height:=80).Fill
.ForeColor.RGB=RGB(Red:=128,Green:=0,Blue:=0)
.BackColor.RGB=RGB(Red:=0,Green:=170,Blue:=170)
.TwoColorGradientStyle:=msoGradientHorizontal,Variant:=1
EndWith
![Page 917: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/917.jpg)
UngroupMethodUngroupsanygroupedshapesinthespecifiedshapeorrangeofshapes.DisassemblespicturesandOLEobjectswithinthespecifiedshapeorrangeofshapes.ReturnstheungroupedshapesasasingleShapeRangeobject.
expression.Ungroup
expressionRequired.AnexpressionthatreturnsaShapeRangeobject.
![Page 918: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/918.jpg)
Remarks
Becauseagroupofshapesistreatedasasingleobject,groupingandungroupingshapeschangesthenumberofitemsintheShapescollectionandchangestheindexnumbersofitemsthatcomeaftertheaffecteditemsinthecollection.
![Page 919: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/919.jpg)
Example
ThisexampleungroupsanygroupedshapesanddisassemblesanypicturesorOLEobjectsonmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
s.Ungroup
Next
ThisexampleungroupsanygroupedshapesonmyDocumentwithoutdisassemblingpicturesorOLEobjectsontheslide.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Ifs.Type=msoGroupThens.Ungroup
Next
![Page 920: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/920.jpg)
UnselectMethodCancelsthecurrentselection.
expression.Unselect
expressionRequired.AnexpressionthatreturnsaSelectionobject.
![Page 921: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/921.jpg)
Example
Thisexamplecancelsthecurrentselectioninwindowone.
Windows(1).Selection.Unselect
![Page 922: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/922.jpg)
UpdateMethodUpdatesthespecifiedlinkedOLEobject.Toupdateallthelinksinapresentationatonce,usetheUpdateLinksmethod.
expression.Update
expressionRequired.AnexpressionthatreturnsaLinkFormatobject.
![Page 923: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/923.jpg)
Example
ThisexampleupdatesalllinkedOLEobjectsintheactivepresentation.
ForEachsldInActivePresentation.Slides
ForEachshInsld.Shapes
Ifsh.Type=msoLinkedOLEObjectThen
sh.LinkFormat.Update
EndIf
Next
Next
![Page 924: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/924.jpg)
UpdateLinksMethodUpdateslinkedOLEobjectsinthespecifiedpresentation.
expression.UpdateLinks
expressionRequired.AnexpressionthatreturnsaPresentationobject.
![Page 925: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/925.jpg)
Example
ThisexampleupdatesallOLElinksintheactivepresentation.
ActivePresentation.UpdateLinks
![Page 926: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/926.jpg)
UseDefaultFolderSuffixMethodSetsthefoldersuffixforthespecifiedpresentationtothedefaultsuffixforthelanguagesupportyouhaveselectedorinstalled.
expression.UseDefaultFolderSuffix
expressionAnexpressionthatreturnsaWebOptionsobject.
![Page 927: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/927.jpg)
Remarks
MicrosoftPowerPointusesthefoldersuffixwhenyousaveorpublishacompleteorpartialpresentationasaWebpage,uselongfilenames,andchoosetosavesupportingfilesinaseparatefolder(thatis,iftheUseLongFileNamesandOrganizeInFolderpropertiesaresettoTrue).
Thesuffixappearsinthefoldernameafterthepresentationname.Forexample,ifthepresentationiscalled"Pres1"andthelanguageisEnglish,thefoldernameisPres1_files.ThefoldersuffixesforeachlanguagearelistedintheFolderSuffixpropertytopic.
![Page 928: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/928.jpg)
Example
Thisexamplesetsthefoldersuffixfortheactivepresentationtothedefaultsuffix.
ActivePresentation.WebOptions.UseDefaultFolderSuffix
![Page 929: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/929.jpg)
UserPictureMethodFillsthespecifiedshapewithonelargeimage.Ifyouwanttofilltheshapewithsmalltilesofanimage,usetheUserTexturedmethod.
expression.UserPicture(PictureFile)
expressionRequired.AnexpressionthatreturnsaFillFormatobject.
PictureFileRequiredString.Thenameofthepicturefile.
![Page 930: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/930.jpg)
Example
ThisexampleaddstworectanglestomyDocument.TherectangleontheleftisfilledwithonelargeimageofthepictureinTiles.bmp;therectangleontherightisfilledwithmanysmalltilesofthepictureinTiles.bmp
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
.AddShape(msoShapeRectangle,0,0,200,100).Fill_
.UserPicture"c:\windows\tiles.bmp"
.AddShape(msoShapeRectangle,300,0,200,100).Fill_
.UserTextured"c:\windows\tiles.bmp"
EndWith
![Page 931: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/931.jpg)
UserTexturedMethodFillsthespecifiedshapewithsmalltilesofanimage.Ifyouwanttofilltheshapewithonelargeimage,usetheUserPicturemethod.
expression.UserTextured(TextureFile)
expressionRequired.AnexpressionthatreturnsaFillFormatobject.
TextureFileRequiredString.Thenameofthepicturefile.
![Page 932: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/932.jpg)
Example
ThisexampleaddstworectanglestomyDocument.TherectangleontheleftisfilledwithonelargeimageofthepictureinTiles.bmp;therectangleontherightisfilledwithmanysmalltilesofthepictureinTiles.bmp
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
.AddShape(msoShapeRectangle,0,0,200,100).Fill_
.UserPicture"c:\windows\tiles.bmp"
.AddShape(msoShapeRectangle,300,0,200,100).Fill_
.UserTextured"c:\windows\tiles.bmp"
EndWith
![Page 933: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/933.jpg)
ValueMethodReturnsthevalueofthespecifiedtagasaString.
expression.Value(Index)
expressionRequired.AnexpressionthatreturnsaTagscollection.
IndexRequiredLong.Thetagnumber.
![Page 934: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/934.jpg)
Example
Thisexampledisplaysthenameandvalueforeachtagassociatedwithslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Tags
Fori=1To.Count
MsgBox"Tag#"&i&":Name="&.Name(i)
MsgBox"Tag#"&i&":Value="&.Value(i)
Next
EndWith
Thisexamplesearchesthroughthetagsforeachslideintheactivepresentation.Ifthere'satagnamed"PRIORITY,"amessageboxdisplaysthetagvalue.Ifthereisn'tatagnamed"PRIORITY,"theexampleaddsthistagwiththevalue"Unknown."
ForEachsInApplication.ActivePresentation.Slides
Withs.Tags
found=False
Fori=1To.Count
If.Name(i)="PRIORITY"Then
found=True
slNum=.Parent.SlideIndex
MsgBox"Slide"&slNum&"priority:"&.Value(i)
EndIf
Next
IfNotfoundThen
slNum=.Parent.SlideIndex
.Add"Name","NewFigures"
.Add"Priority","Unknown"
MsgBox"Slide"&slNum&_
"prioritytagadded:Unknown"
EndIf
EndWith
Next
![Page 935: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/935.jpg)
![Page 936: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/936.jpg)
WebPagePreviewMethodShowsapreviewofthepresentationintheactiveWebbrowser.
expression.WebPagePreview
expressionRequired.AnexpressionthatreturnsaPresentationobject.
![Page 937: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/937.jpg)
Example
ThisexamplepreviewspresentationtwoasaWebpage.
Presentations(2).WebPagePreview
![Page 938: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/938.jpg)
WordsMethodReturnsaTextRangeobjectthatrepresentsthespecifiedsubsetoftextwords.Forinformationaboutcountingorloopingthroughthewordsinatextrange,seetheTextRangeobject.
expression.Words(Start,Length)
expressionRequired.AnexpressionthatreturnsaTextRangeobject.
StartOptionalLong.Thefirstwordinthereturnedrange.
LengthOptionalLong.Thenumberofwordstobereturned.
![Page 939: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/939.jpg)
Remarks
IfbothStartandLengthareomitted,thereturnedrangestartswiththefirstwordandendswiththelastparagraphinthespecifiedrange.
IfStartisspecifiedbutLengthisomitted,thereturnedrangecontainsoneword.
IfLengthisspecifiedbutStartisomitted,thereturnedrangestartswiththefirstwordinthespecifiedrange.
IfStartisgreaterthanthenumberofwordsinthespecifiedtext,thereturnedrangestartswiththelastwordinthespecifiedrange.
IfLengthisgreaterthanthenumberofwordsfromthespecifiedstartingwordtotheendofthetext,thereturnedrangecontainsallthosewords.
![Page 940: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/940.jpg)
Example
Thisexampleformatsasboldthesecond,third,andfourthwordsinthefirstparagraphinshapetwoonslideoneintheactivepresentation.
Application.ActivePresentation.Slides(1).Shapes(2)_
.TextFrame.TextRange.Paragraphs(1).Words(2,3).Font_
.Bold=True
![Page 941: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/941.jpg)
ShowAll
![Page 942: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/942.jpg)
ZOrderMethodMovesthespecifiedshapeinfrontoforbehindothershapesinthecollection(thatis,changestheshape'spositioninthez-order).
expression.ZOrder(ZOrderCmd)
expressionRequired.AnexpressionthatreturnsaShapeobject.
ZOrderCmdRequiredMsoZOrderCmd.Specifieswheretomovethespecifiedshaperelativetotheothershapes.
MsoZOrderCmdcanbeoneoftheseMsoZOrderCmdconstants.msoBringForwardmsoBringInFrontOfTextForuseinMicrosoftWordonly.msoBringToFrontmsoSendBackwardmsoSendBehindTextForuseinMicrosoftWordonly.msoSendToBack
![Page 943: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/943.jpg)
Remarks
UsetheZOrderPositionpropertytodetermineashape'scurrentpositioninthez-order.
![Page 944: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/944.jpg)
Example
ThisexampleaddsanovaltomyDocumentandthenplacestheovalsecondfromthebackinthez-orderifthereisatleastoneothershapeontheslide.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(msoShapeOval,100,100,100,300)
While.ZOrderPosition>2
.ZOrdermsoSendBackward
Wend
EndWith
![Page 945: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/945.jpg)
AcceleratePropertyReturnsorsetsaSinglethatrepresentsthepercentofthedurationoverwhichatimingaccelerationshouldtakeplace.Forexample,avalueof0.9meansthatanaccelerationshouldstartslowerthanthedefaultspeedfor90%ofthetotalanimationtime,withthelast10%oftheanimationatthedefaultspeed.Read/write.
expression.Accelerate
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 946: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/946.jpg)
Remarks
Toslowdownananimationattheend,usetheDecelerateproperty.
![Page 947: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/947.jpg)
Example
Thisexampleaddsashapeandaddsananimation,startingoutslowandmatchingthedefaultspeedafter30%oftheanimationsequence.
SubAddShapeSetTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
'Addsrectangleandspecifieseffecttouseforrectangle
SetshpRectangle=ActivePresentation.Slides(1)_
.Shapes.AddShape(Type:=msoShapeRectangle,_
Left:=100,Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1)_
.TimeLine.MainSequence.AddEffect(Shape:=shpRectangle,_
effectId:=msoAnimEffectPathDiamond)
'Specifiestheaccelerationfortheeffect
WitheffDiamond.Timing
.Accelerate=0.3
EndWith
EndSub
![Page 948: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/948.jpg)
ShowAll
![Page 949: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/949.jpg)
AcceleratorsEnabledPropertyDetermineswhethershortcutkeyareenabledduringaslideshow.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.(Ifshortcutkeysaredisabledduringaslideshow,youcanneitherusekeystonavigateintheslideshownorpressF1togetalistofshortcutkeys.YoucanstillusetheESCkeytoexittheslideshow.)msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueDefault.Shortcutkeysareenabledduringaslideshow.
expression.AcceleratorsEnabled
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 950: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/950.jpg)
Example
Thisexamplerunsaslideshowoftheactivepresentationwithshortcutkeysdisabled.
ActivePresentation.SlideShowSettings.Run_
.View.AcceleratorsEnabled=False
![Page 951: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/951.jpg)
ShowAll
![Page 952: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/952.jpg)
AccentPropertyDetermineswhetheraverticalaccentbarseparatesthecallouttextfromthecalloutline.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueAverticalaccentbarseparatesthecallouttextfromthecalloutline.
expression.Accent
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 953: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/953.jpg)
Example
ThisexampleaddstomyDocumentanovalandacalloutthatpointstotheoval.Thecallouttextwon'thaveaborder,butitwillhaveaverticalaccentbarthatseparatesthetextfromthecalloutline.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
.AddShapemsoShapeOval,180,200,280,130
With.AddCallout(msoCalloutTwo,420,170,170,40)
.TextFrame.TextRange.Text="Myoval"
With.Callout
.Accent=msoTrue
.Border=msoFalse
EndWith
EndWith
EndWith
![Page 954: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/954.jpg)
ShowAll
![Page 955: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/955.jpg)
AccumulatePropertySetsorreturnsanMsoAnimAccumulateconstantthatrepresentswhetheranimationbehaviorsaccumulate.Read/write.
MsoAnimAccumulatecanbeoneoftheseMsoAnimAccumulateconstants.msoAnimAccumulateAlwaysRepetitionsstartwiththecurrentvalue.msoAnimAccumulateNoneDefault.
expression.Accumulate
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 956: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/956.jpg)
Remarks
UsethispropertyinconjunctionwiththeAdditivepropertytocombineanimationeffects.
![Page 957: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/957.jpg)
Example
Thefollowingexampleallowsaspecifiedanimationbehaviortoaccumulatewithotheranimationbehaviors.
SubSetAccumulate()
DimanimBehaviorAsAnimationBehavior
SetanimBehavior=ActiveWindow.Selection.SlideRange(1).TimeLine._
MainSequence(1).Behaviors(1)
animBehavior.Accumulate=msoAnimAccumulateAlways
EndSub
![Page 958: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/958.jpg)
ShowAll
![Page 959: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/959.jpg)
ActionPropertyReturnsorsetsthetypeofactionthatwilloccurwhenthespecifiedshapeisclickedorthemousepointerispositionedovertheshapeduringaslideshow.CanbeoneofthefollowingPpActionTypeconstants.Read/writeLong.
ppActionEndShowppActionFirstSlideppActionHyperlinkppActionLastSlideppActionLastSlideViewedppActionMixedppActionNamedSlideShowppActionNextSlideppActionNoneppActionOLEVerbppActionPlayppActionPreviousSlideppActionRunMacroppActionRunProgram
YoucanusetheActionpropertyinconjunctionwithotherpropertiesoftheActionSettingobject,asshowninthefollowingtable.
IfyousettheActionpropertytothis
value
Usethisproperty Todothis
ppActionHyperlink Hyperlink
Setpropertiesforthehyperlinkthatwillbefollowedinresponsetoamouseactionontheshapeduringaslideshow.Returnorsetthenameoftheprogramtoruninresponsetoa
![Page 960: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/960.jpg)
ppActionRunProgram Run mouseactionontheshapeduringaslideshow.
ppActionRunMacro Run
Returnorsetthenameofthemacrotoruninresponsetoamouseactionontheshapeduringaslideshow.
ppActionOLEVerb ActionVerb
SettheOLEverbthatwillbeinvokedinresponsetoamouseactionontheshapeduringaslideshow.
ppActionNamedSlideShow SlideShowName
Setthenameofthecustomslideshowthatwillruninresponsetoamouseactionontheshapeduringaslideshow.
![Page 961: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/961.jpg)
Example
Thisexamplesetsshapethree(anOLEobject)onslideoneintheactivepresentationtobeplayedwhenthemousepassesoveritduringaslideshow.
WithActivePresentation.Slides(1)_
.Shapes(3).ActionSettings(ppMouseOver)
.ActionVerb="Play"
.Action=ppActionOLEVerb
EndWith
![Page 962: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/962.jpg)
ActionSettingsPropertyReturnsanActionSettingsobjectthatcontainsinformationaboutwhatactionoccurswhentheuserclicksormovesthemouseoverthespecifiedshapeortextrangeduringaslideshow.Read-only.
![Page 963: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/963.jpg)
Example
Thefollowingexamplesetstheactionsforclickingandmovingthemouseovershapeoneonslidetwointheactivepresentation.
SetmyShape=ActivePresentation.Slides(2).Shapes(1)
myShape.ActionSettings(ppMouseClick).Action=ppActionLastSlide
myShape.ActionSettings(ppMouseOver).SoundEffect.Name="applause"
![Page 964: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/964.jpg)
ShowAll
![Page 965: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/965.jpg)
ActionVerbPropertyActionVerbpropertyasitappliestothePlaySettingsobject.
ReturnsorsetsastringthatcontainstheOLEverbthatwillberunwhenthespecifiedOLEobjectisanimatedduringaslideshow.ThedefaultverbspecifiestheactionthattheOLEobjectruns—suchasplayingawavefileordisplayingdatasothattheusercanmodifyit—afterthepreviousanimationorslidetransition.Read/writeString.
ActionVerbpropertyasitappliestotheActionSettingobject.
ReturnsorsetsastringthatcontainstheOLEverbthatwillberunwhentheuserclicksthespecifiedshapeorpassesthemousepointeroveritduringaslideshow.TheActionpropertymustbesettoppActionOLEVerbfirstforthispropertytoaffecttheslideshowaction.Read/writeString.
![Page 966: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/966.jpg)
Example
AsitappliestothePlaySettingsobject.
Thisexamplespecifiesthatshapethreeonslideoneintheactivepresentationwillautomaticallyopenforeditingwhenit'sanimated.ShapethreemustbeanOLEobjectthatcontainsasoundormovieobjectandthatsupportsthe"Edit"verb.
SetOLEobj=ActivePresentation.Slides(1).Shapes(3)
WithOLEobj.AnimationSettings.PlaySettings
.PlayOnEntry=True
.ActionVerb="Edit"
EndWith
AsitappliestotheActionSettingobject.
Thisexamplesetsshapethreeonslideonetobeplayedwheneverthemousepointerpassesoveritduringaslideshow.ShapethreemustrepresentanOLEobjectthatsupportsthe"Play"verb.
WithActivePresentation.Slides(1).Shapes(3)_
.ActionSettings(ppMouseOver)
.ActionVerb="Play"
.Action=ppActionOLEVerb
EndWith
![Page 967: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/967.jpg)
ShowAll
![Page 968: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/968.jpg)
ActivePropertyReturnswhetherthespecifiedpaneorwindowisactive.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedpaneorwindowisactive.
expression.Active
expressionRequired.AnexpressionthatreturnsoftheobjectsintheAppliesTolist.
![Page 969: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/969.jpg)
Example
Thisexamplecheckstoseeifthepresentationfile"test.ppt"isintheactivewindow.Ifnot,itsavesthenameofthepresentationthatiscurrentlyactiveinthevariableoldWinandactivatesthe"test.ppt"presentation.
WithApplication.Presentations("test.ppt").Windows(1)
IfNot.ActiveThen
SetoldWin=Application.ActiveWindow
.Activate
EndIf
EndWith
![Page 970: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/970.jpg)
ActivePanePropertyReturnsaPaneobjectthatrepresentstheactivepaneinthedocumentwindow.Read-only.
![Page 971: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/971.jpg)
Example
Iftheactivepaneistheslidepane,thisexamplemakesthenotespanetheactivepane.ThenotespaneisthethirdmemberofthePanescollection.
WithActiveWindow
If.ActivePane.ViewType=ppViewSlideThen
.Panes(3).Activate
EndIf
EndWith
![Page 972: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/972.jpg)
ActivePresentationPropertyReturnsaPresentationobjectthatrepresentsthepresentationopenintheactivewindow.Read-only.
Notethatifanembeddedpresentationisin-placeactive,theActivePresentationpropertyreturnstheembeddedpresentation.
![Page 973: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/973.jpg)
Example
Thisexamplesavestheloadedpresentationtotheapplicationfolderinafilenamed"TestFile."
MyPath=Application.Path&"\TestFile"
Application.ActivePresentation.SaveAsMyPath
![Page 974: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/974.jpg)
ActivePrinterPropertyReturnsthenameoftheactiveprinter.Read-onlyString.
![Page 975: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/975.jpg)
Example
Thisexampledisplaysthenameoftheactiveprinter.
MsgBox"Thenameoftheactiveprinteris"_
&Application.ActivePrinter
![Page 976: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/976.jpg)
ActiveWindowPropertyReturnsaDocumentWindowobjectthatrepresentstheactivedocumentwindow.Read-only.
![Page 977: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/977.jpg)
Example
Thisexampleminimizestheactivewindow.
Application.ActiveWindow.WindowState=ppWindowMinimized
![Page 978: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/978.jpg)
ShowAll
![Page 979: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/979.jpg)
AddInsPropertyReturnstheprogram-specificAddInscollectionthatrepresentsalltheadd-inslistedintheAdd-Insdialogbox(Toolsmenu).Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 980: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/980.jpg)
Remarks
MicrosoftPowerPoint-specificadd-insareidentifiedbya.ppafilenameextension.ComponentObjectModel(COM)add-inscanbeuseduniversallyacrossMicrosoftprogrammingproductsandhavea.dllor.exefilenameextension.
![Page 981: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/981.jpg)
Example
Thisexampleaddstheadd-innamed"Myaddin.ppa"tothelistintheAdd-Insdialogboxandloadstheadd-inautomatically.
SetmyAddIn=Application.AddIns.Add(FileName:="c:\myaddin.ppa")
myAddIn.Loaded=True
MsgBoxmyAddIn.Name&"hasbeenaddedtothelist"
![Page 982: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/982.jpg)
ShowAll
![Page 983: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/983.jpg)
AdditivePropertySetsorreturnsanMsoAnimAdditiveconstantthatrepresentswhetherthecurrentanimationbehavioriscombinedwithotherrunninganimations.Read/write.
MsoAnimAdditivecanbeoneoftheseMsoAnimAdditiveconstants.msoAnimAdditiveAddBaseDoesnotcombinecurrentanimationwithotheranimations.Default.msoAnimAdditiveAddSumCombinesthecurrentanimationwithotherrunninganimations.
expression.Additive
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 984: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/984.jpg)
Remarks
Combininganimationbehaviorsparticularlyusefulforrotationeffects.Forexample,ifthecurrentanimationchangesrotationandanotheranimationisalsochangingrotation,thenifthispropertyissettomsoAnimAdditiveAddSum,MicrosoftPowerPointwilladdtogethertherotationsfromboththeanimations.
![Page 985: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/985.jpg)
Example
Thefollowingexampleallowsthecurrentanimationbehaviortobeaddedtoanotheranimationbehavior.
SubSetAdditive()
DimanimBehaviorAsAnimationBehavior
SetanimBehavior=ActiveWindow.Selection.SlideRange(1)_
.TimeLine.MainSequence(1).Behaviors(1)
animBehavior.Additive=msoAnimAdditiveAddSum
EndSub
![Page 986: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/986.jpg)
AddressPropertyReturnsorsetstheInternetaddress(URL)tothetargetdocument.Read/writeString.
![Page 987: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/987.jpg)
Example
ThisexamplescansallshapesonthefirstslidefortheURLtotheMicrosoftWebsite.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Hyperlinks
Ifs.Address="http://www.microsoft.com/"Then
MsgBox"YouhavealinktotheMicrosoftHomePage"
EndIf
Next
![Page 988: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/988.jpg)
AdjustmentsPropertyReturnsanAdjustmentsobjectthatcontainsadjustmentvaluesforalltheadjustmentsinthespecifiedshape.AppliestoanyShapeorShapeRangeobjectthatrepresentsanAutoShape,WordArt,oraconnector.Read-only.
![Page 989: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/989.jpg)
Example
Thisexamplesetsto0.25thevalueofadjustmentoneforshapethreeonmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(3).Adjustments(1)=0.25
![Page 990: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/990.jpg)
ShowAll
![Page 991: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/991.jpg)
AdvanceModePropertyAdvanceModepropertyasitappliestotheAnimationSettingsobject.
Returnsorsetsavaluethatindicateswhetherthespecifiedshapeanimationadvancesonlywhenclickedorautomaticallyafteraspecifiedamountoftime.Read/writePpAdvanceMode.Ifyourshapedoesn'tbecomeanimated,makesurethattheTextLevelEffectpropertyissettoavalueotherthanppAnimateLevelNoneandthattheAnimatepropertyissettoTrue.
PpAdvanceModecanbeoneofthesePpAdvanceModeconstants.ppAdvanceModeMixedppAdvanceOnClickppAdvanceOnTime
expression.AdvanceMode
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
AdvanceModepropertyasitappliestotheSlideShowSettingsobject.
Returnsorsetsavaluethatindicateshowtheslideshowadvances.Read/writePpSlideShowAdvanceMode.
PpSlideShowAdvanceModecanbeoneofthesePpSlideShowAdvanceModeconstants.ppSlideShowManualAdvanceppSlideShowRehearseNewTimingsppSlideShowUseSlideTimings
expression.AdvanceMode
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
AdvanceModepropertyasitappliestotheSlideShowViewobject.
![Page 992: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/992.jpg)
Returnsavaluethatindicateshowtheslideshowinthespecifiedviewadvances.Read-onlyPpSlideShowAdvanceMode.
PpSlideShowAdvanceModecanbeoneofthesePpSlideShowAdvanceModeconstants.ppSlideShowManualAdvanceppSlideShowRehearseNewTimingsppSlideShowUseSlideTimings
expression.AdvanceMode
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 993: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/993.jpg)
Example
AsitappliestotheAnimationSettingsobject.
Thisexamplesetsshapetwoonslideoneintheactivepresentationtobecomeanimatedautomaticallyafterfiveseconds.
WithActivePresentation.Slides(1).Shapes(2).AnimationSettings
.AdvanceMode=ppAdvanceOnTime
.AdvanceTime=5
.TextLevelEffect=ppAnimateByAllLevels
.Animate=True
EndWith
![Page 994: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/994.jpg)
ShowAll
![Page 995: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/995.jpg)
AdvanceOnClickPropertyDetermineswhetherthespecifiedslideadvanceswhenit'sclickedduringaslideshow.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedslideadvanceswhenit'sclickedduringaslideshow.
expression.AdvanceOnClick
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 996: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/996.jpg)
Remarks
Tosettheslidetoadvanceautomaticallyafteracertainamountoftimeelapses,settheAdvanceOnTimepropertytoTrueandsettheAdvanceTimepropertytotheamountoftimeyouwanttheslidetobeshown.IfyousetboththeAdvanceOnClickandtheAdvanceOnTimepropertiestoTrue,theslidewilladvanceeitherwhenit'sclickedorwhenthespecifiedamountoftimehaselapsed—whichevercomesfirst.
![Page 997: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/997.jpg)
Example
Thisexamplesetsslideoneintheactivepresentationtoadvanceafterfivesecondshavepassedorwhenthemouseisclicked—whicheveroccursfirst.
WithActivePresentation.Slides(1).SlideShowTransition
.AdvanceOnClick=msoTrue
.AdvanceOnTime=msoTrue
.AdvanceTime=5
EndWith
![Page 998: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/998.jpg)
ShowAll
![Page 999: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/999.jpg)
AdvanceOnTimePropertyDetermineswhetherthespecifiedslideadvancesautomaticallyafteraspecifiedamountoftimehaselapsed.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedslideadvancesautomaticallyafteraspecifiedamountoftimehaselapsed.
expression.AdvanceOnTime
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1000: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1000.jpg)
Remarks
UsetheAdvanceTimepropertytospecifythenumberofsecondsafterwhichtheslidewillautomaticallyadvance.SettheAdvanceModepropertyoftheSlideShowSettingsobjecttoppSlideShowUseSlideTimingstoputtheslideintervalsettingsintoeffectfortheentireslideshow.
![Page 1001: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1001.jpg)
Example
Thisexamplesetsslideoneintheactivepresentationtoadvanceafterfivesecondshavepassedorwhenthemouseisclicked—whicheveroccursfirst.
WithActivePresentation.Slides(1).SlideShowTransition
.AdvanceOnClick=msoTrue
.AdvanceOnTime=msoTrue
.AdvanceTime=5
EndWith
![Page 1002: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1002.jpg)
ShowAll
![Page 1003: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1003.jpg)
AdvanceTimePropertyAsitappliestotheAnimationSettingsobject.
Returnsorsetstheamountoftime,inseconds,afterwhichthespecifiedshapewillbecomeanimated.Read/writeSingle.
AsitappliestotheSlideShowTransitionobject.
Returnsorsetstheamountoftime,inseconds,afterwhichthespecifiedslidetransitionwilloccur.Read/writeSingle.
![Page 1004: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1004.jpg)
Remarks
Thespecifiedslideanimationwon'tstartautomaticallyaftertheamountoftimeyou'vespecifiedunlesstheAdvanceModepropertyoftheanimationissettoppAdvanceOnTime.Thespecifiedslidetransitionwon'tadvanceautomaticallyunlesstheAdvanceModepropertyoftheslideshowsettingsissettoppSlideShowUseSlideTimings.
![Page 1005: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1005.jpg)
Example
AsitappliestotheAnimationSettingsobject.
Thisexamplesetsshapetwoonslideoneintheactivepresentationtobecomeanimatedautomaticallyafterfiveseconds.
WithActivePresentation.Slides(1).Shapes(2).AnimationSettings
.AdvanceMode=ppAdvanceOnTime
.AdvanceTime=5
.TextLevelEffect=ppAnimateByAllLevels
.Animate=True
EndWith
![Page 1006: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1006.jpg)
ShowAll
![Page 1007: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1007.jpg)
AfterEffectPropertyAfterEffectpropertyasitappliestotheEffectInformationobject.
ReturnsanMsoAnimAfterEffectconstantthatindicateswhetheranaftereffectisdimmed,hidden,orunchangedafteritruns.Read-only.
MsoAnimAfterEffectcanbeoneoftheseMsoAnimAfterEffectconstants.msoAnimAfterEffectDimmsoAnimAfterEffectHidemsoAnimAfterEffectHideOnNextClickmsoAnimAfterEffectMixedmsoAnimAfterEffectNone
expression.AfterEffect
expressionRequired.AnexpressionthatanEffectInformationobject.
AfterEffectpropertyasitappliestotheAnimationSettingsobject.
ReturnsorsetsaPpAfterEffectconstantthatindicateswhetherthespecifiedshapeappearsdimmed,hidden,orunchangedafterit'sbeenbuilt.Read/write.
PpAfterEffectcanbeoneofthesePpAfterEffectconstants.ppAfterEffectDimppAfterEffectHideppAfterEffectHideOnClickppAfterEffectMixedppAfterEffectNothing
expression.AfterEffect
expressionRequired.AnexpressionthatreturnsanAnimationSettingsobject.
![Page 1008: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1008.jpg)
Remarks
Youwon'tseetheaftereffectyousetforashapeunlesstheshapegetsanimatedandatleastoneothershapeontheslidegetsanimatedafterit.Forashapetobeanimated,theTextLevelEffectpropertyoftheAnimationSettingsobjectfortheshapemustbesettosomethingotherthanppAnimateLevelNone,ortheEntryEffectpropertymustbesettoaconstantotherthanppEffectNone.Inaddition,theAnimatepropertymustbesettoTrue.Tochangethebuildorderoftheshapesonaslide,usetheAnimationOrderproperty.
![Page 1009: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1009.jpg)
Example
Thisexamplespecifiesthatthetitleonslideoneintheactivepresentationistoappeardimmedafterthetitleisbuilt.Ifthetitleisthelastoronlyshapetobebuiltonslideone,thetextwon'tbedimmed.
WithActivePresentation.Slides(1).Shapes.Title.AnimationSettings
.Animate=True
.TextLevelEffect=ppAnimateByAllLevels
.AfterEffect=ppAfterEffectDim
EndWith
![Page 1010: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1010.jpg)
ShowAll
![Page 1011: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1011.jpg)
AlignmentPropertyAlignmentpropertyasitappliestotheTextEffectFormatobject.
ReturnsorsetsthealignmentforthespecifiedWordArt.Read/writeMsoTextEffectAlignment.
MsoTextEffectAlignmentcanbeoneoftheseMsoTextEffectAlignmentconstants.msoTextEffectAlignmentCenteredmsoTextEffectAlignmentLeftmsoTextEffectAlignmentMixedmsoTextEffectAlignmentRightmsoTextEffectAlignmentStretchJustifymsoTextEffectAlignmentWordJustifymsoTextEffectAlignmentLetterJustify
expression.Alignment
expressionRequired.AnexpressionthatreturnsaTextEffectFormatobject.
AlignmentpropertyasitappliestotheParagraphFormatobject.
Returnsorsetsthealignmentforeachparagraphinthespecifiedparagraphformat.Read/writePpParagraphAlignment.
PpParagraphAlignmentcanbeoneofthesePpParagraphAlignmentconstants.ppAlignCenterppAlignDistributeppAlignJustifyppAlignJustifyLowppAlignLeftppAlignmentMixedppAlignRight
![Page 1012: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1012.jpg)
ppAlignThaiDistribute
expression.Alignment
expressionRequired.AnexpressionthatreturnsaParagraphFormatobject.
![Page 1013: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1013.jpg)
Example
AsitappliestotheTextEffectFormatobject.
ThisexampleaddsaWordArtobjecttoslideoneintheactivepresentationandthenrightalignstheWordArt.
SetmySh=Application.ActivePresentation.Slides(1).Shapes
SetmyTE=mySh.AddTextEffect(PresetTextEffect:=msoTextEffect1,_
Text:="TestText",FontName:="Palatino",FontSize:=54,_
FontBold:=True,FontItalic:=False,Left:=100,Top:=50)
myTE.TextEffect.Alignment=msoTextEffectAlignmentRight
AsitappliestotheParagraphFormatobject.
Thisexampleleftalignstheparagraphsinshapetwoonslideoneintheactivepresentation.
Application.ActivePresentation.Slides(1).Shapes(2)_
.TextFrame.TextRange.ParagraphFormat.Alignment=ppAlignLeft
![Page 1014: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1014.jpg)
ShowAll
![Page 1015: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1015.jpg)
AllowPNGPropertyDetermineswhetherPNG(PortableNetworkGraphics)isallowedasanoutputformatwhenyousaveorpublishacompleteorpartialpresentationasaWebpage.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.PNGisnotallowedasanoutputformatwhenyousaveorpublishacompleteorpartialpresentationasaWebpage.msoTriStateMixedmsoTriStateTogglemsoTruePNGisallowedasanimageformatwhenyousaveorpublishacompleteorpartialpresentationasaWebpage.
expression.AllowPNG
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1016: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1016.jpg)
Remarks
IfyousaveimagesinthePNGformatasopposedtoanyotherfileformat,youmightimprovetheimagequalityorreducethesizeofthoseimagefiles,andthereforedecreasethedownloadtime,assumingthattheWebbrowsersyouaretargetingsupportthePNGformat.
![Page 1017: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1017.jpg)
Example
ThisexampleenablesPNGasanoutputformatfortheactivepresentation.
ActivePresentation.WebOptions.AllowPNG=msoTrue
Alternatively,PNGcanbeenabledastheglobaldefaultfortheapplicationfornewlycreatedpresentations.
Application.DefaultWebOptions.AllowPNG=msoTrue
![Page 1018: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1018.jpg)
AlternativeTextPropertyReturnsorsetsthealternativetextassociatedwithashapeinaWebpresentation.Read/writeString.
![Page 1019: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1019.jpg)
Example
Thefollowingexamplesetsthealternativetextfortheselectedshapeintheactivewindow.Theselectedshapeisapictureofamallardduck.
ActiveWindow.Selection.ShapeRange_
.AlternativeText="Thisisamallardduck."
![Page 1020: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1020.jpg)
ShowAll
![Page 1021: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1021.jpg)
AlwaysSaveInDefaultEncodingPropertyDetermineswhetherthedefaultencodingisusedwhenyousaveaWebpageorplaintextdocument,independentofthefile'soriginalencodingwhenopened.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.TheoriginalencodingofthefileisusedwhenyousaveaWebpageorplaintextdocument,independentofthefile'soriginalencodingwhenopened.msoTriStateMixedmsoTriStateTogglemsoTrueThedefaultencodingisusedwhenyousaveaWebpageorplaintextdocument,independentofthefile'soriginalencodingwhenopened.
expression.AlwaysSaveInDefaultEncoding
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1022: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1022.jpg)
Remarks
TheEncodingpropertycanbeusedtosetthedefaultencoding.
![Page 1023: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1023.jpg)
Example
Thisexamplesetstheencodingtothedefaultencoding.TheencodingisusedwhenyousavethedocumentasaWebpage.
Application.DefaultWebOptions.AlwaysSaveInDefaultEncoding=msoTrue
![Page 1024: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1024.jpg)
AmountPropertyReturnsorsetsaSinglethatrepresentsthenumberofdegreesananimatedshapeisrotatedaroundthez-axis.Apositivevalueindicatesclockwiserotation;anegativevalueindicatescounterclockwiserotation.Read/write.
expression.Amount
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1025: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1025.jpg)
Example
Thefollowingexampleaddsashape,anda90-degreespinanimationtotheshape.
SubSetAnimEffect()
DimeffSpinAsEffect
DimshpCubeAsShape
SetshpCube=ActivePresentation.Slides(1).Shapes.AddShape_
(Type:=msoShapeCube,Left:=100,Top:=100,_
Width:=50,Height:=50)
SeteffSpin=ActivePresentation.Slides(1).TimeLine_
.MainSequence.AddEffect(Shape:=shpCube,_
effectId:=msoAnimEffectSpin)
effSpin.Timing.Duration=3
effSpin.EffectParameters.Amount=-90
EndSub
![Page 1026: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1026.jpg)
ShowAll
![Page 1027: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1027.jpg)
AnglePropertyReturnsorsetstheangleofthecalloutline.Ifthecalloutlinecontainsmorethanonelinesegment,thispropertyreturnsorsetstheangleofthesegmentthatisfarthestfromthecallouttextbox.Read/writeMsoCalloutAngleType.
MsoCalloutAngleTypecanbeoneoftheseMsoCalloutAngleTypeconstants.msoCalloutAngle30msoCalloutAngle45msoCalloutAngle60msoCalloutAngle90msoCalloutAngleAutomaticCalloutlinemaintainsafixedangleasyoudragthecallout.msoCalloutAngleMixed
expression.Angle
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1028: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1028.jpg)
Example
Thisexamplesetsto90degreesthecalloutangleforacalloutnamed"co1"onmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes("co1").Callout.Angle=msoCalloutAngle90
![Page 1029: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1029.jpg)
ShowAll
![Page 1030: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1030.jpg)
AnimatePropertyDetermineswhetherthespecifiedshapeisanimatedduringaslideshow.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedshapeisanimatedduringaslideshow.
expression.Animate
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1031: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1031.jpg)
Remarks
Forashapetobeanimated,theTextLevelEffectpropertyoftheAnimationSettingsobjectfortheshapemustbesettosomethingotherthanppAnimateLevelNone,andeithertheAnimatepropertymustbesettoTrue,ortheEntryEffectpropertymustbesettoaconstantotherthanppEffectNone.
![Page 1032: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1032.jpg)
Example
Thisexamplespecifiesthatthetitleonslidetwointheactivepresentationappeardimmedafterthetitleisbuilt.Ifthetitleisthelastoronlyshapetobebuiltonslidetwo,thetextwon'tbedimmed.
WithActivePresentation.Slides(2).Shapes.Title.AnimationSettings
.TextLevelEffect=ppAnimateByAllLevels
.AfterEffect=ppAfterEffectDim
.Animate=msoTrue
EndWith
![Page 1033: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1033.jpg)
ShowAll
![Page 1034: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1034.jpg)
AnimateActionPropertyMsoTrueifthecolorofthespecifiedshapeismomentarilyinvertedwhenthespecifiedmouseactionoccurs.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrue
expression.AnimateAction
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1035: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1035.jpg)
Example
Thisexamplesetsshapethreeonslideoneintheactivepresentationtoplaythesoundofapplauseandtomomentarilyinvertitscolorwhenit'sclickedduringaslideshow.
WithActivePresentation.Slides(1)_
.Shapes(3).ActionSettings(ppMouseClick)
.SoundEffect.Name="applause"
.AnimateAction=msoTrue
EndWith
![Page 1036: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1036.jpg)
ShowAll
![Page 1037: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1037.jpg)
AnimateBackgroundPropertyAnimateBackgroundpropertyasitappliestotheAnimationSettings
object.
IfthespecifiedobjectisanAutoShape,msoTrueiftheshapeisanimatedseparatelyfromthetextitcontains.Ifthespecifiedshapeisagraphobject,msoTrueifthebackground(theaxesandgridlines)ofthespecifiedgraphobjectisanimated.AppliesonlytoAutoShapeswithtextthatcanbebuiltinmorethanonesteportographobjects.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrue
expression.AnimateBackground
expressionRequired.AnexpressionthatreturnsanAnimationSettingsobject.
AnimateBackgroundpropertyasitappliestotheEffectInformationobject.
ReturnsMsoTrueifthespecifiedeffectisabackgroundanimation.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrue
![Page 1038: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1038.jpg)
expression.AnimateBackground
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 1039: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1039.jpg)
Remarks
UsetheTextLevelEffectandTextUnitEffectpropertiestocontroltheanimationoftextattachedtothespecifiedshape.
IfthispropertyissettoMsoTrueandtheTextLevelEffectpropertyissettoppAnimateByAllLevels,theshapeanditstextwillbeanimatedsimultaneously.IfthispropertyissettoMsoTrueandtheTextLevelEffectpropertyissettoanythingotherthanppAnimateByAllLevels,theshapewillbeanimatedimmediatelybeforethetextisanimated.
Youwon'tseeeffectsofsettingthispropertyunlessthespecifiedshapeisanimated.Forashapetobeanimated,theTextLevelEffectpropertyfortheshapemustbesettosomethingotherthanppAnimateLevelNone,andeithertheAnimatepropertymustbesettoMsoTrue,ortheEntryEffectpropertymustbesettoaconstantotherthanppEffectNone.
![Page 1040: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1040.jpg)
Example
AsitappliestotheAnimationSettingsobject.
Thisexamplecreatesarectanglethatcontainstext.Theexamplethenspecifiesthattheshapeshouldflyinfromthelowerright,thatthetextshouldbebuiltfromfirst-levelparagraphs,andthattheshapeshouldbeanimatedseparatelyfromthetextitcontains.Inthisexample,theEntryEffectpropertyturnsonanimation.
SubAnimateTextBox()
WithActivePresentation.Slides(1).Shapes.AddShape_
(Type:=msoShapeRectangle,Left:=50,Top:=200,_
Width:=200,Height:=200)
.TextFrame.TextRange="Reason1"&Chr(13)&_
"Reason2"&Chr(13)&"Reason3"
With.AnimationSettings
.EntryEffect=ppEffectFlyFromBottomRight
.TextLevelEffect=ppAnimateByFirstLevel
.TextUnitEffect=ppAnimateByParagraph
.AnimateBackground=msoTrue
EndWith
EndWith
EndSub
AsitappliestotheEffectInformationobject.
Thisexamplechangesthedirectionoftheanimationifthebackgroundiscurrentlyanimated.
SubChangeAnimationDirection()
WithActivePresentation.Slides(1).TimeLine.MainSequence(1)
If.EffectInformation.AnimateBackground=msoTrueThen
.EffectParameters.Direction=msoAnimDirectionTopLeft
EndIf
EndWith
EndSub
![Page 1041: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1041.jpg)
![Page 1042: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1042.jpg)
ShowAll
![Page 1043: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1043.jpg)
AnimateTextInReversePropertyDetermineswhetherthespecifiedshapeisbuiltinreverseorder.Appliesonlytoshapes(suchasshapescontaininglists)thatcanbebuiltinmorethanonestep.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedshapeisbuiltinreverseorder.
expression.AnimateTextInReverse
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1044: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1044.jpg)
Remarks
Youwon'tseeeffectsofsettingthispropertyunlessthespecifiedshapegetsanimated.Forashapetobeanimated,theTextLevelEffectpropertyoftheAnimationSettingsobjectfortheshapemustbesettosomethingotherthanppAnimateLevelNoneandtheAnimatepropertymustbesettoTrue.
![Page 1045: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1045.jpg)
Example
Thisexampleaddsaslideafterslideoneintheactivepresentation,setsthetitletext,addsathree-itemlisttothetextplaceholder,andsetsthelisttobebuiltinreverseorder.
WithActivePresentation.Slides.Add(2,ppLayoutText).Shapes
.Item(1).TextFrame.TextRange.Text="TopThreeReasons"
With.Item(2)
.TextFrame.TextRange="Reason1"&Chr(13)_
&"Reason2"&Chr(13)&"Reason3"
With.AnimationSettings
.Animate=msoTrue
.TextLevelEffect=ppAnimateByFirstLevel
.AnimateTextInReverse=msoTrue
EndWith
EndWith
EndWith
![Page 1046: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1046.jpg)
AnimationOrderPropertyReturnsorsetsanintegerthatrepresentsthepositionofthespecifiedshapewithinthecollectionofshapestobeanimated.Read/writeLong.
![Page 1047: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1047.jpg)
Remarks
Youwon'tseeeffectsofsettingthispropertyunlessthespecifiedshapegetsanimated.Forashapetobeanimated,theTextLevelEffectpropertyoftheAnimationSettingsobjectfortheshapemustbesettosomethingotherthanppAnimateLevelNoneandtheAnimatepropertymustbesettoTrue.
NoteSettingtheAnimationOrderpropertytoavaluethatislessthanthegreatestexistingAnimationOrderpropertyvaluecanshifttheanimationorder.
![Page 1048: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1048.jpg)
Example
Thisexamplespecifiesthatshapetwoonslidetwointheactivepresentationbeanimatedsecond.
ActivePresentation.Slides(2).Shapes(2)_
.AnimationSettings.AnimationOrder=2
![Page 1049: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1049.jpg)
AnimationSettingsPropertyReturnsanAnimationSettingsobjectthatrepresentsallthespecialeffectsyoucanapplytotheanimationofthespecifiedshape.
expression.AnimationSettings
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1050: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1050.jpg)
Example
Thisexamplesetsshapeoneonslidetwointheactivepresentationtoflyinfromtheleftwhentheslideisbuilt.
WithActivePresentation.Slides(2).Shapes(1).AnimationSettings
.EntryEffect=ppEffectFlyFromLeft
.TextLevelEffect=ppAnimateByAllLevels
EndWith
![Page 1051: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1051.jpg)
AnswerWizardPropertyReturnstheAnswerWizardobjectthatcontainsthefilesusedbytheonlineHelpsearchengine.Read-only.
![Page 1052: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1052.jpg)
ApplicationPropertyReturnsanApplicationobjectthatrepresentsthecreatorofthespecifiedobject.
expression.Application
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1053: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1053.jpg)
Example
Inthisexample,aPresentationobjectispassedtotheprocedure.TheprocedureaddsaslidetothepresentationandthensavesthepresentationinthefolderwhereMicrosoftPowerPointisrunning.
SubAddAndSave(pptPresAsPresentation)
pptPres.Slides.Add1,1
pptPres.SaveAspptPres.Application.Path&"\AddedSlide"
EndSub
ThisexampledisplaysthenameoftheapplicationthatcreatedeachlinkedOLEobjectonslideoneintheactivepresentation.
ForEachshpOleInActivePresentation.Slides(1).Shapes
IfshpOle.Type=msoLinkedOLEObjectThen
MsgBoxshpOle.OLEFormat.Application.Name
EndIf
Next
![Page 1054: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1054.jpg)
AssistantPropertySomeofthecontentinthistopicmaynotbeapplicabletosomelanguages.
ReturnsanAssistantobjectthatrepresentstheOfficeAssistant.Read-only.
![Page 1055: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1055.jpg)
Example
ThisexampledisplaystheOfficeAssistant.
Application.Assistant.Visible=True
ThisexamplemovestheOfficeAssistanttotheupper-leftregionofthescreen.
Application.Assistant.MovexLeft:=100,yTop:=100
![Page 1056: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1056.jpg)
AuthorPropertyReturnsaStringthatrepresentstheauthorasforaspecifiedCommentobject.Read-only.
expression.Author
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1057: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1057.jpg)
Remarks
Thispropertyonlyreturnstheauthor'sname.Toreturntheauthor'sinitials,usetheAuthorInitialsproperty.SpecifytheAuthorofacommentwhenyouaddanewcommenttothepresentation.
![Page 1058: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1058.jpg)
Example
Thefollowingexampleaddsacommenttothefirstslideoftheactivepresentationandthendisplaystheauthor'snameandinitialsinamessage.
SubGetAuthorName()
WithActivePresentation.Slides(1)
.Comments.AddLeft:=100,Top:=100,Author:="JeffSmith",_
AuthorInitials:="JS",_
Text:="Thisisanewcommentaddedtothefirstslide."
MsgBox"Thiscommentwascreatedby"&_
.Comments(1).Author&"("&.Comments(1).AuthorInitials&")."
EndWith
EndSub
![Page 1059: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1059.jpg)
AuthorIndexPropertyReturnsaLongrepresentingtheindexnumberofacommentforagivenauthor.Thefirstcommentforagivenauthorhasanindexnumberof1,theirsecondcommenthasanindexnumberof2,andsoon.Read-only.
expression.AuthorIndex
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1060: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1060.jpg)
Example
Thefollowingexampleprovideinformationabouttheauthorsandtheircommentindexesforagivenslide.
SubGetCommentAuthorInfo()
DimcmtCommentAsComment
DimstrAuthorInfoAsString
WithActivePresentation.Slides(1)
If.Comments.Count>0Then
ForEachcmtCommentIn.Comments
strAuthorInfo=strAuthorInfo&"CommentNumber:"&_
cmtComment.AuthorIndex&vbLf&_
"Madeby:"&cmtComment.Author&vbLf&_
"Says:"&cmtComment.Text&vbLf&vbLf
NextcmtComment
EndIf
EndWith
MsgBox"Thecommentsforthisslideareasfollows:"&_
vbLf&vbLf&strAuthorInfo
EndSub
![Page 1061: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1061.jpg)
AuthorInitialsPropertyReturnstheauthor'sinitialsasaread-onlyStringforaspecifiedCommentobject.Read-only.
expression.AuthorInitials
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1062: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1062.jpg)
Remarks
Thispropertyonlyreturnstheauthor'sinitials.Toreturntheauthor'snameusetheAuthorproperty.Specifytheauthor'sinitialswhenyouaddanewcommenttothepresentation.
![Page 1063: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1063.jpg)
Example
Thefollowingexamplereturnstheauthor'sinitialsforaspecifiedcomment.
SubGetAuthorName()
WithActivePresentation.Slides(1)
.Comments.AddLeft:=100,Top:=100,Author:="JeffSmith",_
AuthorInitials:="JS",_
Text:="Thisisanewcommentaddedtothefirstslide."
MsgBox.Comments(1).Author&.Comments(1).AuthorInitials
EndWith
EndSub
![Page 1064: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1064.jpg)
ShowAll
![Page 1065: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1065.jpg)
AutoAttachPropertyDetermineswhethertheplacewherethecalloutlineattachestothecallouttextboxchangesdependingonwhethertheoriginofthecalloutline(wherethecalloutpointsto)istotheleftorrightofthecallouttextbox.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueTheplacewherethecalloutlineattachestothecallouttextboxchangesdependingonwhethertheoriginofthecalloutline(wherethecalloutpointsto)istotheleftorrightofthecallouttextbox.
![Page 1066: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1066.jpg)
Remarks
WhenthevalueofthispropertyismsoTrue,thedropvalue(theverticaldistancefromtheedgeofthecallouttextboxtotheplacewherethecalloutlineattaches)ismeasuredfromthetopofthetextboxwhenthetextboxistotherightoftheorigin,andit'smeasuredfromthebottomofthetextboxwhenthetextboxistotheleftoftheorigin.WhenthevalueofthispropertyismsoFalse,thedropvalueisalwaysmeasuredfromthetopofthetextbox,regardlessoftherelativepositionsofthetextboxandtheorigin.UsetheCustomDropmethodtosetthedropvalue,andusetheDroppropertytoreturnthedropvalue.
Settingthispropertyaffectsacalloutonlyifithasanexplicitlysetdropvalue—thatis,ifthevalueoftheDropTypepropertyismsoCalloutDropCustom.Bydefault,calloutshaveexplicitlysetdropvalueswhenthey'recreated.
![Page 1067: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1067.jpg)
Example
Thisexampleaddstwocalloutstothefirstslide.Oneofthecalloutsisautomaticallyattachedandtheotherisnot.Ifyouchangethecalloutlineoriginfortheautomaticallyattachedcallouttotherightoftheattachedtextbox,thepositionofthetextboxchanges.Thecalloutthatisnotautomaticallyattacheddoesnotdisplaythisbehavior.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
With.AddCallout(msoCalloutTwo,420,170,200,50)
.TextFrame.TextRange.Text="auto-attached"
.Callout.AutoAttach=msoTrue
EndWith
With.AddCallout(msoCalloutTwo,420,350,200,50)
.TextFrame.TextRange.Text="notauto-attached"
.Callout.AutoAttach=msoFalse
EndWith
EndWith
![Page 1068: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1068.jpg)
AutoCorrectPropertyReturnsanAutoCorrectobjectthatrepresentstheAutoCorrectfunctionalityinMicrosoftPowerPoint.
expression.AutoCorrect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1069: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1069.jpg)
Example
ThefollowingexampledisablesdisplayoftheAutoCorrectOptionsandAutoLayoutOptionsbuttons.
SubHideAutoCorrectOpButton()
WithApplication.AutoCorrect
.DisplayAutoCorrectOptions=msoFalse
.DisplayAutoLayoutOptions=msoFalse
EndWith
EndSub
![Page 1070: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1070.jpg)
ShowAll
![Page 1071: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1071.jpg)
AutoFormatPropertySetsorreturnsanMsoTriStateconstantthatrepresentsadiagram'sautomaticformattingstate.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseAutomaticformattingisnotenabled.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueAutomaticformattingisenabled.
expression.AutoFormat
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1072: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1072.jpg)
Example
Thefollowingexamplecreatesadiagram,andenablesautomaticformatting.
SubConvertPyramidDiagram()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
'Addspyramiddiagramandfirstchildnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramPyramid,Left:=10,_
Top:=15,Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addsthreeadditionalnodes
ForintNodes=1To3
dgnNode.AddNode
NextintNodes
'Automaticallyformatsthediagramnodesand
'convertspyramiddiagramtoradialdiagram
WithdgnNode.Diagram
.AutoFormat=msoTrue
.ConvertType:=msoDiagramRadial
EndWith
EndSub
![Page 1073: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1073.jpg)
ShowAll
![Page 1074: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1074.jpg)
AutoLayoutPropertySetsorreturnsanMsoTriStateconstantthatrepresentswhetheradiagram'scomponentsareautomaticallylaidout.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseThediagram'scomponentsarenotautomaticallylaidout.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueThediagram'scomponentsareautomaticallylaidout.
expression.AutoLayout
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1075: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1075.jpg)
Example
Thefollowingexampleaddsadiagramtoaslide,convertsittoaradialdiagram,andarrangesthediagram'snodesautomatically.
SubConvertPyramidDiagram()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
'Addspyramiddiagramandfirstchildnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramPyramid,Left:=10,_
Top:=15,Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addsthreeadditionalnodes
ForintNodes=1To3
dgnNode.AddNode
NextintNodes
'Automaticallyplacesthediagramnodesand
'convertspyramiddiagramtoradialdiagram
WithdgnNode.Diagram
.AutoLayout=msoTrue
.ConvertType:=msoDiagramRadial
EndWith
EndSub
![Page 1076: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1076.jpg)
ShowAll
![Page 1077: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1077.jpg)
AutoLengthPropertyDetermineswhetherthefirstsegmentofthecalloutretainsthefixedlengthspecifiedbytheLengthproperty,orisscaledautomatically,wheneverthecalloutismoved.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.Appliesonlytocalloutswhoselinesconsistofmorethanonesegment(typesmsoCalloutThreeandmsoCalloutFour).msoCTruemsoFalseThefirstsegmentofthecalloutretainsthefixedlengthspecifiedbytheLengthpropertywheneverthecalloutismoved.msoTriStateMixedmsoTriStateTogglemsoTrueThefirstsegmentofthecalloutline(thesegmentattachedtothetextcalloutbox)isscaledautomaticallywheneverthecalloutismoved.
![Page 1078: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1078.jpg)
Remarks
Thispropertyisread-only.UsetheAutomaticLengthmethodtosetthispropertytomsoTrue,andusetheCustomLengthmethodtosetthispropertytomsoFalse.
![Page 1079: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1079.jpg)
Example
ThisexampletogglesbetweenanautomaticallyscalingfirstsegmentandonewithafixedlengthforthecalloutlineforshapeoneonmyDocument.Fortheexampletowork,shapeonemustbeacallout.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).Callout
If.AutoLengthThen
.CustomLength50
Else
.AutomaticLength
EndIf
EndWith
![Page 1080: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1080.jpg)
ShowAll
![Page 1081: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1081.jpg)
AutoLoadPropertyDetermineswhetherthespecifiedadd-inisautomaticallyloadedeachtimePowerPointisstarted.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedadd-inisautomaticallyloadedeachtimePowerPointisstarted.
![Page 1082: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1082.jpg)
Remarks
SettingthispropertytomsoTrueautomaticallysetstheRegisteredpropertytomsoTrue.
![Page 1083: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1083.jpg)
Example
Thisexampledisplaysthenameofeachadd-inthat'sautomaticallyloadedeachtimePowerPointisstarted.
ForEachmyAddInInAddIns
IfmyAddIn.AutoLoadThen
MsgBoxmyAddIn.Name
afound=True
EndIf
NextmyAddIn
Ifafound<>TrueThen
MsgBox"Noadd-inswereloadedautomatically."
EndIf
Thisexamplespecifiesthattheadd-innamed"MyTools"beloadedautomaticallyeachtimePowerPointisstarted.
Application.AddIns("mytools").AutoLoad=msoTrue
![Page 1084: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1084.jpg)
ShowAll
![Page 1085: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1085.jpg)
AutomationSecurityPropertyReturnsorsetsanMsoAutomationSecurityconstantthatrepresentsthesecuritymodeMicrosoftPowerPointuseswhenprogrammaticallyopeningfiles.ThispropertyisautomaticallysettomsoAutomationSecurityLowwhentheapplicationisstarted.Therefore,toavoidbreakingsolutionsthatrelyonthedefaultsetting,youshouldbecarefultoresetthispropertytomsoAutomationSecurityLowafterprogrammaticallyopeningafile.Also,thispropertyshouldbesetimmediatelybeforeandafteropeningafileprogrammaticallytoavoidmalicioussubversion.Read/write.
MsoAutomationSecuritycanbeoneoftheseMsoAutomationSecurityconstants.msoAutomationSecurityByUIUsesthesecuritysettingspecifiedintheSecuritydialogbox.msoAutomationSecurityForceDisableDisablesallmacrosinallfilesopenedprogrammaticallywithoutshowinganysecurityalerts.msoAutomationSecurityLowEnablesallmacros.Thisisthedefaultvaluewhentheapplicationisstarted.
expression.AutomationSecurity
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1086: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1086.jpg)
Remarks
ThevalueoftheDisplayAlertspropertywillnotapplytosecuritywarnings.Forexample,iftheusersetstheDisplayAlertspropertyequaltoFalseandtheAutomationSecuritypropertytomsoAutomationSecurityByUI,whiletheuserisonMediumsecuritylevel,thentherewillbesecuritywarningswhilethemacroisrunning.Thisallowsthemacrototrapfileopenerrors,whilestillshowingthesecuritywarningifthefileopensucceeds.
![Page 1087: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1087.jpg)
Example
Thisexamplecapturesthecurrentautomationsecuritysetting,changesthesettingtodisablemacros,displaystheOpendialogbox,andafteropeningtheselectedpresentation,setstheautomationsecuritybacktoitsoriginalsetting.
SubSecurity()
DimsecAutomationAsMsoAutomationSecurity
secAutomation=Application.AutomationSecurity
Application.AutomationSecurity=msoAutomationSecurityForceDisable
Application.FileDialog(msoFileDialogOpen).Show
Application.AutomationSecurity=secAutomation
EndSub
![Page 1088: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1088.jpg)
ShowAll
![Page 1089: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1089.jpg)
AutoReversePropertySetsorreturnsanMsoTriStatethatrepresentswhetheraneffectshouldplayforwardandthenreverse,therebydoublingtheduration.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseDefault.Theeffectdoesnotplayforwardandthenreverse.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueTheeffectplaysforwardandthenreverse.
expression.AutoReverse
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1090: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1090.jpg)
Example
Thefollowingexampleaddsashapeandananimationeffecttoit;thensetstheanimationtoreversedirectionafterfinishingforwardmovement.
SubSetEffectTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
'Addsrectangleandappliesdiamondeffect
SetshpRectangle=ActivePresentation.Slides(1).Shapes.AddShape_
(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine_
.MainSequence.AddEffect(Shape:=shpRectangle,_
effectId:=msoAnimEffectPathDiamond)
'Setsthedurationofandreversestheeffect
WitheffDiamond.Timing
.Duration=5'Lengthofeffect.
.AutoReverse=msoTrue
EndWith
EndSub
![Page 1091: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1091.jpg)
ShowAll
![Page 1092: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1092.jpg)
AutoRotateNumbersPropertyReturnsorsetslateralcompression.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseHalf-widthnumberswillnotbecompressedinlateralcolumns.msoTriStateMixedmsoTriStateTogglemsoTrueDisplayshalf-widthnumberswithinverticaltextintwo-characterlateralcolumns.
![Page 1093: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1093.jpg)
Example
Thisexamplesetsthetextdirectionofshapethreeonthefirstslidetoverticaltext,andsetslateralcolumncompression.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).TextFrame
.Orientation=msoTextOrientationVerticalFarEast
.TextRange.Font.AutoRotateNumbers=msoTrue
EndWith
![Page 1094: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1094.jpg)
ShowAll
![Page 1095: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1095.jpg)
AutoShapeTypePropertyReturnsorsetstheshapetypeforthespecifiedShapeorShapeRangeobject,whichmustrepresentanAutoShapeotherthanaline,freeformdrawing,orconnector.Read/writeMsoAutoShapeType.
MsoAutoShapeTypecanbeoneoftheseMsoAutoShapeTypeconstants.msoShapeFlowchartConnectormsoShapeFlowchartDatamsoShapeFlowchartDecisionmsoShapeFlowchartDelaymsoShapeFlowchartDirectAccessStoragemsoShapeFlowchartDisplaymsoShapeFlowchartDocumentmsoShapeFlowchartExtractmsoShapeFlowchartInternalStoragemsoShapeFlowchartMagneticDiskmsoShapeFlowchartManualInputmsoShapeFlowchartManualOperationmsoShapeFlowchartMergemsoShapeFlowchartMultidocumentmsoShapeFlowchartOffpageConnectormsoShapeFlowchartOrmsoShapeFlowchartPredefinedProcessmsoShapeFlowchartPreparationmsoShapeFlowchartProcessmsoShapeFlowchartPunchedTapemsoShapeFlowchartSequentialAccessStoragemsoShapeFlowchartSortmsoShapeFlowchartStoredDatamsoShapeFlowchartSummingJunctionmsoShapeFlowchartTerminator
![Page 1096: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1096.jpg)
msoShapeFoldedCornermsoShapeHeartmsoShapeHexagonmsoShapeHorizontalScrollmsoShapeIsoscelesTrianglemsoShapeLeftArrowmsoShapeLeftArrowCalloutmsoShapeLeftBracemsoShapeLeftBracketmsoShapeLeftRightArrowmsoShapeLeftRightArrowCalloutmsoShapeLeftRightUpArrowmsoShapeLeftUpArrowmsoShapeLightningBoltmsoShapeLineCallout1msoShapeLineCallout1AccentBarmsoShapeLineCallout1BorderandAccentBarmsoShapeLineCallout1NoBordermsoShapeLineCallout2msoShapeLineCallout2AccentBarmsoShapeLineCallout2BorderandAccentBarmsoShapeLineCallout2NoBordermsoShapeLineCallout3msoShapeLineCallout3AccentBarmsoShapeLineCallout3BorderandAccentBarmsoShapeLineCallout3NoBordermsoShapeLineCallout4msoShapeLineCallout4AccentBarmsoShapeLineCallout4BorderandAccentBarmsoShapeLineCallout4NoBordermsoShapeMixedmsoShapeMoonmsoShapeNoSymbol
![Page 1097: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1097.jpg)
msoShapeNotchedRightArrowmsoShapeNotPrimitivemsoShapeOctagonmsoShapeOvalmsoShapeOvalCalloutmsoShapeParallelogrammsoShapePentagonmsoShapePlaquemsoShapeQuadArrowmsoShapeQuadArrowCalloutmsoShapeRectanglemsoShapeRectangularCalloutmsoShapeRegularPentagonmsoShapeRightArrowmsoShapeRightArrowCalloutmsoShapeRightBracemsoShapeRightBracketmsoShapeRightTrianglemsoShapeRoundedRectanglemsoShapeRoundedRectangularCalloutmsoShapeSmileyFacemsoShapeStripedRightArrowmsoShapeSunmsoShapeTrapezoidmsoShapeUpArrowmsoShapeUpArrowCalloutmsoShapeUpDownArrowmsoShapeUpDownArrowCalloutmsoShapeUpRibbonmsoShapeUTurnArrowmsoShapeVerticalScrollmsoShapeWavemsoShapeFlowchartCollate
![Page 1098: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1098.jpg)
msoShape16pointStarmsoShape24pointStarmsoShape32pointStarmsoShape4pointStarmsoShape5pointStarmsoShape8pointStarmsoShapeActionButtonBackorPreviousmsoShapeActionButtonBeginningmsoShapeActionButtonCustommsoShapeActionButtonDocumentmsoShapeActionButtonEndmsoShapeActionButtonForwardorNextmsoShapeActionButtonHelpmsoShapeActionButtonHomemsoShapeActionButtonInformationmsoShapeActionButtonMoviemsoShapeActionButtonReturnmsoShapeActionButtonSoundmsoShapeArcmsoShapeBalloonmsoShapeBentArrowmsoShapeBentUpArrowmsoShapeBevelmsoShapeBlockArcmsoShapeCanmsoShapeChevronmsoShapeCircularArrowmsoShapeCloudCalloutmsoShapeCrossmsoShapeCubemsoShapeCurvedDownArrowmsoShapeCurvedDownRibbonmsoShapeCurvedLeftArrow
![Page 1099: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1099.jpg)
msoShapeCurvedRightArrowmsoShapeCurvedUpArrowmsoShapeCurvedUpRibbonmsoShapeDiamondmsoShapeDonutmsoShapeDoubleBracemsoShapeDoubleBracketmsoShapeDoubleWavemsoShapeDownArrowmsoShapeDownArrowCalloutmsoShapeDownRibbonmsoShapeExplosion1msoShapeExplosion2msoShapeFlowchartAlternateProcessmsoShapeFlowchartCard
expression.AutoShapeType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.Read/writeLong.
NoteWhenyouchangethetypeofashape,theshaperetainsitssize,color,andotherattributes.
![Page 1100: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1100.jpg)
Remarks
UsetheTypepropertyoftheConnectorFormatobjecttosetorreturntheconnectortype.
![Page 1101: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1101.jpg)
Example
Thisexamplereplacesall16-pointstarswith32-pointstarsinmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Ifs.AutoShapeType=msoShape16pointStarThen
s.AutoShapeType=msoShape32pointStar
EndIf
Next
![Page 1102: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1102.jpg)
ShowAll
![Page 1103: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1103.jpg)
AutoSizePropertyReturnsorsetsavaluethatindicateswhetherthesizeofthespecifiedshapeischangedautomaticallytofittextwithinitsboundaries.Read/writePpAutoSize.
PpAutoSizecanbeoneofthesePpAutoSizeconstants.ppAutoSizeMixedppAutoSizeNoneppAutoSizeShapeToFitText
expression.AutoSize
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1104: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1104.jpg)
Example
Thisexampleadjuststhesizeofthetitleboundingboxonslideonetofitthetitletext.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1)
If.TextFrame.TextRange.Characters.Count<50Then
.TextFrame.AutoSize=ppAutoSizeShapeToFitText
EndIf
EndWith
![Page 1105: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1105.jpg)
ShowAll
![Page 1106: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1106.jpg)
AutoUpdatePropertyReturnsorsetsthewaythelinkwillbeupdated.Read/writePpUpdateOption.
PpUpdateOptioncanbeoneofthesePpUpdateOptionconstants.ppUpdateOptionAutomaticLinkwillbeupdatedeachtimethepresentationisopenedorthesourcefilechanges.ppUpdateOptionManualLinkwillbeupdatedonlywhentheuserspecificallyaskstoupdatethepresentation.ppUpdateOptionMixed
expression.AutoUpdate
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1107: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1107.jpg)
Example
ThisexampleloopsthroughalltheshapesonalltheslidesintheactivepresentationandsetsalllinkedMicrosoftExcelworksheetstobeupdatedmanually.
ForEachsldInActivePresentation.Slides
ForEachshInsld.Shapes
Ifsh.Type=msoLinkedOLEObjectThen
Ifsh.OLEFormat.ProgID="Excel.Sheet"Then
sh.LinkFormat.AutoUpdate=ppUpdateOptionManual
EndIf
EndIf
Next
Next
![Page 1108: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1108.jpg)
BackColorPropertyReturnsorsetsaColorFormatobjectthatrepresentsthebackgroundcolorforthespecifiedfillorpatternedline.Read/write.
![Page 1109: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1109.jpg)
Example
ThisexampleaddsarectangletomyDocumentandthensetstheforegroundcolor,backgroundcolor,andgradientfortherectangle'sfill.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(msoShapeRectangle,_
90,90,90,50).Fill
.ForeColor.RGB=RGB(128,0,0)
.BackColor.RGB=RGB(170,170,170)
.TwoColorGradientmsoGradientHorizontal,1
EndWith
ThisexampleaddsapatternedlinetomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(10,100,250,0).Line
.Weight=6
.ForeColor.RGB=RGB(0,0,255)
.BackColor.RGB=RGB(128,0,0)
.Pattern=msoPatternDarkDownwardDiagonal
EndWith
![Page 1110: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1110.jpg)
BackgroundPropertyReturnsaShapeRangeobjectthatrepresentstheslidebackground.
expression.Background
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1111: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1111.jpg)
Remarks
IfyouusetheBackgroundpropertytosetthebackgroundforanindividualslidewithoutchangingtheslidemaster,theFollowMasterBackgroundpropertyforthatslidemustbesettoFalse.
![Page 1112: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1112.jpg)
Example
Thisexamplesetsthebackgroundoftheslidemasterintheactivepresentationtoapresetshade.
ActivePresentation.SlideMaster.Background.Fill.PresetGradient_
Style:=msoGradientHorizontal,Variant:=1,_
PresetGradientType:=msoGradientLateSunset
Thisexamplesetsthebackgroundofslideoneintheactivepresentationtoapresetshade.
WithActivePresentation.Slides(1)
.FollowMasterBackground=False
.Background.Fill.PresetGradientStyle:=msoGradientHorizontal,_
Variant:=1,PresetGradientType:=msoGradientLateSunset
EndWith
![Page 1113: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1113.jpg)
ShowAll
![Page 1114: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1114.jpg)
BaseLineAlignmentPropertyReturnsorsetsthebaselinealignmentforthespecifiedparagraph.Read/writePpBaselineAlignment.
PpBaselineAlignmentcanbeoneofthesePpBaselineAlignmentconstants.ppBaselineAlignBaselineppBaselineAlignCenterppBaselineAlignFarEast50ppBaselineAlignMixedppBaselineAlignTop
expression.BaseLineAlignment
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1115: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1115.jpg)
Example
Thisexampledisplaysthebaselinealignmentfortheparagraphsinshapetwoonslideoneintheactivepresentation.
MsgBoxActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange_
.ParagraphFormat.BaseLineAlignment
![Page 1116: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1116.jpg)
BaselineOffsetPropertyReturnsorsetsthebaselineoffsetforthespecifiedsuperscriptorsubscriptcharacters.Canbeafloating-pointvaluefrom–1through1.Avalueof–1representsanoffsetof–100percent,andavalueof1representsanoffsetof100percent.Read/writeSingle.
![Page 1117: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1117.jpg)
Remarks
SettingtheBaselineOffsetpropertytoanegativevalueautomaticallysetstheSubscriptpropertytoTrueandtheSuperscriptpropertytoFalse.
SettingtheBaselineOffsetpropertytoapositivevalueautomaticallysetstheSubscriptpropertytoFalseandtheSuperscriptpropertytoTrue.
SettingtheSubscriptpropertytoTrueautomaticallysetstheBaselineOffsetpropertyto0.3(30percent).
SettingtheSuperscriptpropertytoTrueautomaticallysetstheBaselineOffsetpropertyto–0.25(–25percent).
![Page 1118: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1118.jpg)
Example
Thisexamplesetsthetextforshapetwoonslideoneandthenmakesthesecondcharactersubscriptwitha20-percentoffset.
WithApplication.ActivePresentation.Slides(1)_
.Shapes(2).TextFrame.TextRange
.Text="H2O"
.Characters(2,1).Font.BaselineOffset=-0.2
EndWith
![Page 1119: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1119.jpg)
ShowAll
![Page 1120: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1120.jpg)
BeginArrowheadLengthPropertyReturnsorsetsthelengthofthearrowheadatthebeginningofthespecifiedline.Read/writeMsoArrowheadLength.
MsoArrowheadLengthcanbeoneoftheseMsoArrowheadLengthconstants.msoArrowheadLengthMediummsoArrowheadLengthMixedmsoArrowheadLongmsoArrowheadShort
expression.BeginArrowheadLength
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1121: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1121.jpg)
Example
ThisexampleaddsalinetomyDocument.There'sashort,narrowovalontheline'sstartingpointandalong,widetriangleonitsendpoint.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(100,100,200,300).Line
.BeginArrowheadLength=msoArrowheadShort
.BeginArrowheadStyle=msoArrowheadOval
.BeginArrowheadWidth=msoArrowheadNarrow
.EndArrowheadLength=msoArrowheadLong
.EndArrowheadStyle=msoArrowheadTriangle
.EndArrowheadWidth=msoArrowheadWide
EndWith
![Page 1122: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1122.jpg)
ShowAll
![Page 1123: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1123.jpg)
BeginArrowheadStylePropertyReturnsorsetsthestyleofthearrowheadatthebeginningofthespecifiedline.Read/writeMsoArrowheadStyle.
MsoArrowheadStylecanbeoneoftheseMsoArrowheadStyleconstants.msoArrowheadDiamondmsoArrowheadNonemsoArrowheadOpenmsoArrowheadOvalmsoArrowheadStealthmsoArrowheadStyleMixedmsoArrowheadTriangle
expression.BeginArrowheadStyle
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1124: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1124.jpg)
Example
ThisexampleaddsalinetomyDocument.There'sashort,narrowovalontheline'sstartingpointandalong,widetriangleonitsendpoint.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(100,100,200,300).Line
.BeginArrowheadLength=msoArrowheadShort
.BeginArrowheadStyle=msoArrowheadOval
.BeginArrowheadWidth=msoArrowheadNarrow
.EndArrowheadLength=msoArrowheadLong
.EndArrowheadStyle=msoArrowheadTriangle
.EndArrowheadWidth=msoArrowheadWide
EndWith
![Page 1125: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1125.jpg)
ShowAll
![Page 1126: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1126.jpg)
BeginArrowheadWidthPropertyReturnsorsetsthewidthofthearrowheadatthebeginningofthespecifiedline.Read/writeMsoArrowheadWidth.
MsoArrowheadWidthcanbeoneoftheseMsoArrowheadWidthconstants.msoArrowheadNarrowmsoArrowheadWidemsoArrowheadWidthMediummsoArrowheadWidthMixed
expression.BeginArrowheadWidth
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1127: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1127.jpg)
Example
ThisexampleaddsalinetomyDocument.There'sashort,narrowovalontheline'sstartingpointandalong,widetriangleonitsendpoint.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(100,100,200,300).Line
.BeginArrowheadLength=msoArrowheadShort
.BeginArrowheadStyle=msoArrowheadOval
.BeginArrowheadWidth=msoArrowheadNarrow
.EndArrowheadLength=msoArrowheadLong
.EndArrowheadStyle=msoArrowheadTriangle
.EndArrowheadWidth=msoArrowheadWide
EndWith
![Page 1128: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1128.jpg)
ShowAll
![Page 1129: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1129.jpg)
BeginConnectedPropertyDetermineswhetherthebeginningofthespecifiedconnectorisconnectedtoashape.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThebeginningofthespecifiedconnectorisconnectedtoashape.
![Page 1130: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1130.jpg)
Example
Ifshapethreeonthefirstslideintheactivepresentationisaconnectorwhosebeginningisconnectedtoashape,thisexamplestorestheconnectionsitenumberinthevariableoldBeginConnSite,storesareferencetotheconnectedshapeintheobjectvariableoldBeginConnShape,andthendisconnectsthebeginningoftheconnectorfromtheshape.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3)
If.ConnectorThen
With.ConnectorFormat
If.BeginConnectedThen
oldBeginConnSite=.BeginConnectionSite
SetoldBeginConnShape=.BeginConnectedShape
.BeginDisconnect
EndIf
EndWith
EndIf
EndWith
![Page 1131: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1131.jpg)
BeginConnectedShapePropertyReturnsaShapeobjectthatrepresentstheshapethatthebeginningofthespecifiedconnectorisattachedto.Read-only.
NoteIfthebeginningofthespecifiedconnectorisn'tattachedtoashape,thispropertygeneratesanerror.
![Page 1132: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1132.jpg)
Example
Thisexampleassumesthatthefirstslideintheactivepresentationalreadycontainstwoshapesattachedbyaconnectornamed"Conn1To2."Thecodeaddsarectangleandaconnectortothefirstslide.Thebeginningofthenewconnectorwillbeattachedtothesameconnectionsiteasthebeginningoftheconnectornamed"Conn1To2,"andtheendofthenewconnectorwillbeattachedtoconnectionsiteoneonthenewrectangle.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
Setr3=.AddShape(msoShapeRectangle,450,190,200,100)
.AddConnector(msoConnectorCurve,0,0,10,10)_
.Name="Conn1To3"
With.Item("Conn1To2").ConnectorFormat
beginConnSite1=.BeginConnectionSite
SetbeginConnShape1=.BeginConnectedShape
EndWith
With.Item("Conn1To3").ConnectorFormat
.BeginConnectbeginConnShape1,beginConnSite1
.EndConnectr3,1
EndWith
EndWith
![Page 1133: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1133.jpg)
BeginConnectionSitePropertyReturnsanintegerthatspecifiestheconnectionsitethatthebeginningofaconnectorisconnectedto.Read-onlyLong.
NoteIfthebeginningofthespecifiedconnectorisn'tattachedtoashape,thispropertygeneratesanerror.
![Page 1134: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1134.jpg)
Example
Thisexampleassumesthatthefirstslideintheactivepresentationalreadycontainstwoshapesattachedbyaconnectornamed"Conn1To2."Thecodeaddsarectangleandaconnectortothefirstslide.Thebeginningofthenewconnectorwillbeattachedtothesameconnectionsiteasthebeginningoftheconnectornamed"Conn1To2,"andtheendofthenewconnectorwillbeattachedtoconnectionsiteoneonthenewrectangle.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
Setr3=.AddShape(msoShapeRectangle,450,190,200,100)
.AddConnector(msoConnectorCurve,_
0,0,10,10).Name="Conn1To3"
With.Item("Conn1To2").ConnectorFormat
beginConnSite1=.BeginConnectionSite
SetbeginConnShape1=.BeginConnectedShape
EndWith
With.Item("Conn1To3").ConnectorFormat
.BeginConnectbeginConnShape1,beginConnSite1
.EndConnectr3,1
EndWith
EndWith
![Page 1135: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1135.jpg)
BehaviorsPropertyReturnsaspecifiedslideanimationbehaviorasanAnimationBehaviorscollection.
expression.Behaviors
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1136: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1136.jpg)
Remarks
ToreturnasingleAnimationBehaviorobjectintheAnimationBehaviorscollection,usetheItemmethodorBehaviors(index),whereindexistheindexnumberoftheAnimationBehaviorobjectintheAnimationBehaviorscollection.
![Page 1137: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1137.jpg)
Example
Thefollowingexamplereturnsaspecificanimationbehaviortypeintheactivepresentation.
SubReturnTypeValue
MsgBoxActiveWindow.Selection.SlideRange(1).TimeLine_
.MainSequence(1).Behaviors.Item(1).Type
EndSub
![Page 1138: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1138.jpg)
ShowAll
![Page 1139: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1139.jpg)
BlackAndWhitePropertyDetermineswhetherthedocumentwindowdisplayisblackandwhite.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.msoTriStateMixedmsoTriStateTogglemsoTrueThedocumentwindowdisplayisblackandwhite.
![Page 1140: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1140.jpg)
Example
Thisexamplechangesthedisplayinwindowonetoblackandwhite.
Application.Windows(1).BlackAndWhite=msoTrue
![Page 1141: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1141.jpg)
ShowAll
![Page 1142: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1142.jpg)
BlackWhiteModePropertyReturnsorsetsavaluethatindicateshowthespecifiedshapeappearswhenthepresentationisviewedinblack-and-whitemode.Read/writeMsoBlackWhiteMode.
MsoBlackWhiteModecanbeoneoftheseMsoBlackWhiteModeconstants.msoBlackWhiteAutomaticmsoBlackWhiteBlackmsoBlackWhiteBlackTextAndLinemsoBlackWhiteDontShowmsoBlackWhiteGrayOutlinemsoBlackWhiteGrayScalemsoBlackWhiteHighContrastmsoBlackWhiteInverseGrayScalemsoBlackWhiteLightGrayScalemsoBlackWhiteMixedmsoBlackWhiteWhite
expression.BlackWhiteMode
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1143: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1143.jpg)
Example
ThisexamplesetsshapeoneonmyDocumenttoappearinblack-and-whitemode.Whenyouviewthepresentationinblack-and-whitemode,shapeonewillappearblack,regardlessofwhatcoloritisincolormode.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(1).BlackWhiteMode=msoBlackWhiteBlack
![Page 1144: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1144.jpg)
ShowAll
![Page 1145: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1145.jpg)
BoldPropertyDetermineswhetherthecharacterformatisbold.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThecharacterformatisnotbold.msoTriStateMixedThespecifiedtextrangecontainsbothboldandnonboldcharacters.msoTriStateTogglemsoTrueThecharacterformatisbold.
![Page 1146: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1146.jpg)
Example
Thisexamplesetscharactersonethroughfiveinthetitleonslideonetobold.
SetmyT=Application.ActivePresentation.Slides(1).Shapes.Title
myT.TextFrame.TextRange.Characters(1,5).Font.Bold=msoTrue
![Page 1147: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1147.jpg)
ShowAll
![Page 1148: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1148.jpg)
BorderPropertyDetermineswhetherthetextinthespecifiedcalloutissurroundedbyaborder.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThetextinthespecifiedcalloutissurroundedbyaborder.
![Page 1149: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1149.jpg)
Example
ThisexampleaddstomyDocumentanovalandacalloutthatpointstotheoval.Thecallouttextwon'thaveaborder,butitwillhaveaverticalaccentbarthatseparatesthetextfromthecalloutline.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
.AddShapemsoShapeOval,180,200,280,130
With.AddCallout(msoCalloutTwo,420,170,170,40)
.TextFrame.TextRange.Text="Myoval"
With.Callout
.Accent=msoTrue
.Border=msoFalse
EndWith
EndWith
EndWith
![Page 1150: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1150.jpg)
BordersPropertyReturnsaBorderscollectionthatrepresentsthebordersanddiagonallinesforthespecifiedCellobjectorCellRangecollection.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1151: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1151.jpg)
Example
Thisexamplesetsthethicknessoftheleftborderforthefirstcellinthesecondrowoftheselectedtabletothreepoints.
ActiveWindow.Selection.ShapeRange.Table.Rows(2)_
.Cells(1).Borders.Item(ppBorderLeft).Weight=3
![Page 1152: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1152.jpg)
ShowAll
![Page 1153: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1153.jpg)
BoundHeightPropertyReturnstheheight(inpoints)ofthetextboundingboxforthespecifiedtextframe.Read-onlySingle.
![Page 1154: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1154.jpg)
Example
Thisexampleaddsaroundedrectangletoslideoneintheactivepresentation.Therectanglehasthesamedimensionsasthetextboundingboxforshapeone.
WithApplication.ActivePresentation.Slides(1).Shapes
Settr=.Item(1).TextFrame.TextRange
SetroundRect=.AddShape(msoShapeRoundedRectangle,_
tr.BoundLeft,tr.BoundTop,tr.BoundWidth,tr.BoundHeight)
EndWith
WithroundRect.Fill
.ForeColor.RGB=RGB(255,0,128)
.Transparency=0.75
EndWith
![Page 1155: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1155.jpg)
ShowAll
![Page 1156: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1156.jpg)
BoundLeftPropertyReturnsthedistance(inpoints)fromtheleftedgeofthetextboundingboxforthespecifiedtextframetotheleftedgeoftheslide.Read-onlySingle.
![Page 1157: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1157.jpg)
Example
Thisexampleaddsaroundedrectangletoslideoneintheactivepresentation.Therectanglehasthesamedimensionsasthetextboundingboxforshapeone.
WithApplication.ActivePresentation.Slides(1).Shapes
Settr=.Item(1).TextFrame.TextRange
SetroundRect=.AddShape(msoShapeRoundedRectangle,_
tr.BoundLeft,tr.BoundTop,tr.BoundWidth,tr.BoundHeight)
EndWith
WithroundRect.Fill
.ForeColor.RGB=RGB(255,0,128)
.Transparency=0.75
EndWith
![Page 1158: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1158.jpg)
ShowAll
![Page 1159: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1159.jpg)
BoundTopPropertyReturnsthedistance(inpoints)fromthetopoftheofthetextboundingboxforthespecifiedtextframetothetopoftheslide.Read-onlySingle.
![Page 1160: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1160.jpg)
Example
Thisexampleaddsaroundedrectangletoslideoneintheactivepresentation.Therectanglehasthesamedimensionsasthetextboundingboxforshapeone.
WithApplication.ActivePresentation.Slides(1).Shapes
Settr=.Item(1).TextFrame.TextRange
SetroundRect=.AddShape(msoShapeRoundedRectangle,_
tr.BoundLeft,tr.BoundTop,tr.BoundWidth,tr.BoundHeight)
EndWith
WithroundRect.Fill
.ForeColor.RGB=RGB(255,0,128)
.Transparency=0.75
EndWith
![Page 1161: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1161.jpg)
ShowAll
![Page 1162: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1162.jpg)
BoundWidthPropertyReturnsthewidth(inpoints)ofthetextboundingboxforthespecifiedtextframe.Read-onlySingle.
![Page 1163: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1163.jpg)
Example
Thisexampleaddsaroundedrectangletoslideoneintheactivepresentation.Therectanglehasthesamedimensionsasthetextboundingboxforshapeone.
WithApplication.ActivePresentation.Slides(1).Shapes
Settr=.Item(1).TextFrame.TextRange
SetroundRect=.AddShape(msoShapeRoundedRectangle,_
tr.BoundLeft,tr.BoundTop,tr.BoundWidth,tr.BoundHeight)
EndWith
WithroundRect.Fill
.ForeColor.RGB=RGB(255,0,128)
.Transparency=0.75
EndWith
![Page 1164: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1164.jpg)
BrightnessPropertyReturnsorsetsthebrightnessofthespecifiedpictureorOLEobject.Thevalueforthispropertymustbeanumberfrom0.0(dimmest)to1.0(brightest).Read/writeSingle.
![Page 1165: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1165.jpg)
Example
ThisexamplesetsthebrightnessforshapeoneonmyDocument.ShapeonemustbeeitherapictureoranOLEobject.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(1).PictureFormat.Brightness=0.3
![Page 1166: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1166.jpg)
BuildPropertyReturnsthePowerPointbuildnumber.Read-onlyString.
![Page 1167: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1167.jpg)
Example
ThisexampledisplaysthePowerPointbuildnumber.
MsgBoxPrompt:=Application.Build,Title:="PowerPointBuild"
![Page 1168: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1168.jpg)
ShowAll
![Page 1169: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1169.jpg)
BuildByLevelEffectPropertyReturnsanMsoAnimateByLevelconstantthatrepresentstheleveloftheanimationbuildeffect.Read-only.
MsoAnimateByLevelcanbeoneoftheseMsoAnimateByLevelconstants.msoAnimateChartAllAtOncemsoAnimateChartByCategorymsoAnimateChartByCategoryElementsmsoAnimateChartBySeriesmsoAnimateChartBySeriesElementsmsoAnimateDiagramAllAtOncemsoAnimateDiagramBreadthByLevelmsoAnimateDiagramBreadthByNodemsoAnimateDiagramClockwisemsoAnimateDiagramClockwiseInmsoAnimateDiagramClockwiseOutmsoAnimateDiagramCounterClockwisemsoAnimateDiagramCounterClockwiseInmsoAnimateDiagramCounterClockwiseOutmsoAnimateDiagramDepthByBranchmsoAnimateDiagramDepthByNodemsoAnimateDiagramDownmsoAnimateDiagramInByRingmsoAnimateDiagramOutByRingmsoAnimateDiagramUpmsoAnimateLevelMixedmsoAnimateTextByAllLevelsmsoAnimateTextByFifthLevelmsoAnimateTextByFirstLevelmsoAnimateTextByFourthLevelmsoAnimateTextBySecondLevel
![Page 1170: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1170.jpg)
msoAnimateTextByThirdLevelmsoAnimationLevelNone
expression.BuildByLevelEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1171: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1171.jpg)
Example
Thefollowingexamplereturnsabuild-by-leveleffect.
SubQueryBuildByLevelEffect()
DimeffMainAsEffect
SeteffMain=ActivePresentation.Slides(1).TimeLine_
.MainSequence(1)
IfeffMain.EffectInformation.BuildByLevelEffect<>msoAnimateLevelNoneThen
ActivePresentation.Slides(1).TimeLine.MainSequence_
.ConvertToTextUnitEffectEffect:=effMain,_
UnitEffect:=msoAnimTextUnitEffectByWord
EndIf
EndSub
![Page 1172: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1172.jpg)
BuiltInDocumentPropertiesPropertyReturnsaDocumentPropertiescollectionthatrepresentsallthebuilt-indocumentpropertiesforthespecifiedpresentation.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1173: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1173.jpg)
Remarks
UsetheCustomDocumentPropertiespropertytoreturnthecollectionofcustomdocumentproperties.
![Page 1174: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1174.jpg)
Example
Thisexampledisplaysthenamesofallthebuilt-indocumentpropertiesfortheactivepresentation.
ForEachpInApplication.ActivePresentation_
.BuiltInDocumentProperties
bidpList=bidpList&p.Name&Chr$(13)
Next
MsgBoxbidpList
Thisexamplesetsthe"Category"built-inpropertyfortheactivepresentationiftheauthorofthepresentationisJakeJarmel.
WithApplication.ActivePresentation.BuiltInDocumentProperties
If.Item("author").Value="JakeJarmel"Then
.Item("category").Value="CreativeWriting"
EndIf
EndWith
![Page 1175: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1175.jpg)
BulletPropertyReturnsaBulletFormatobjectthatrepresentsbulletformattingforthespecifiedparagraphformat.Read-only.
![Page 1176: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1176.jpg)
Example
Thisexamplesetsthebulletsizeandbulletcolorfortheparagraphsinshapetwoonslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Shapes(2).TextFrame
With.TextRange.ParagraphFormat.Bullet
.Visible=True
.RelativeSize=1.25
.Font.Color=RGB(255,0,255)
EndWith
EndWith
![Page 1177: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1177.jpg)
ShowAll
![Page 1178: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1178.jpg)
ByPropertyBypropertyasitappliestotheColorEffectobject.
ReturnsaColorFormatobjectthatrepresentsachangetothecoloroftheobjectbythespecifiednumber,expressedinRGBformat.
expression.By
expressionRequired.AnexpressionthatreturnsaColorEffectobject.
BypropertyasitappliestotheRotationEffectobject.
SetsorreturnsaSinglethatrepresentstherotationofanobjectbythespecifiednumberofdegrees;forexample,avalueof180meanstorotatetheobjectby180degrees.Read/write.
expression.By
expressionRequired.AnexpressionthatreturnsaRotationEffectobject.
![Page 1179: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1179.jpg)
Remarks
Thespecifiedobjectwillberotatedwiththecenteroftheobjectremaininginthesamepositiononthescreen.
IfboththeByandTopropertiesaresetforarotationeffect,thenthevalueoftheBypropertyisignored.
Floatingpointnumbers(forexample,55.5)arevalid,butnegativenumbersarenot.
![Page 1180: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1180.jpg)
Remarks
DonotconfusethispropertywiththeByXorByYpropertiesoftheScaleEffectandMotionEffectobjects,whichareonlyusedforscalingormotioneffects.
![Page 1181: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1181.jpg)
Example
AsitappliestotheColorEffectobject.
Thisexampleaddsacoloreffectandchangesitscolor.Thisexampleassumesthereisatleastoneshapeonthefirstslideoftheactivepresentation.
SubAddAndChangeColorEffect()
DimeffBlindsAsEffect
DimtmlnShapeAsTimeLine
DimshpShapeAsShape
DimanimBehaviorAsAnimationBehavior
DimclrEffectAsColorEffect
'Setsshape,timing,andeffect
SetshpShape=ActivePresentation.Slides(1).Shapes(1)
SettmlnShape=ActivePresentation.Slides(1).TimeLine
SeteffBlinds=tmlnShape.MainSequence.AddEffect_
(Shape:=shpShape,effectId:=msoAnimEffectBlinds)
'Addsanimationbehaviorandcoloreffect
SetanimBehavior=tmlnShape.MainSequence(1).Behaviors_
.Add(Type:=msoAnimTypeColor)
SetclrEffect=animBehavior.ColorEffect
'Specifiescolor
clrEffect.By.RGB=RGB(Red:=255,Green:=0,Blue:=0)
EndSub
AsitappliestotheRotationEffectobject.
Thisexampleaddsarotationeffectandchangesitsrotation.
SubAddAndChangeRotationEffect()
DimeffBlindsAsEffect
DimtmlnShapeAsTimeLine
DimshpShapeAsShape
DimanimBehaviorAsAnimationBehavior
DimrtnEffectAsRotationEffect
'Setsshape,timing,andeffect
SetshpShape=ActivePresentation.Slides(1).Shapes(1)
SettmlnShape=ActivePresentation.Slides(1).TimeLine
![Page 1182: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1182.jpg)
SeteffBlinds=tmlnShape.MainSequence.AddEffect_
(Shape:=shpShape,effectId:=msoAnimEffectBlinds)
'Addsanimationbehaviorandsetsrotationeffect
SetanimBehavior=tmlnShape.MainSequence(1).Behaviors_
.Add(Type:=msoAnimTypeRotation)
SetrtnEffect=animBehavior.RotationEffect
rtnEffect.By=270
EndSub
![Page 1183: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1183.jpg)
ByXPropertySetsorreturnsaSinglethatrepresentsscalingormovinganobjecthorizontallybyaspecifiedpercentageofthescreenwidth,dependingonwhetheritusedinconjunctionwithaScaleEffectorMotionEffectobject,respectively.Forexample,avalueof50foramotioneffectmeanstomovetheobjecthalfthescreenwidthtotheright.Read/write.
expression.ByX
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1184: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1184.jpg)
Remarks
Negativenumbersmovetheobjecthorizontallytotheleft.Floatingpointnumbers(forexample,55.5)areallowed.
Toscaleormoveanobjectvertically,usetheByYproperty.
IfboththeByXandByYpropertiesareset,thentheobjectisscaledormovesbothhorizontallyandvertically.
DonotconfusethispropertywiththeBypropertyoftheColorEffect,RotationEffect,orPropertyEffectobjects,whichisusedtosetcolors,rotations,orotherpropertiesofananimationbehavior,respectively.
![Page 1185: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1185.jpg)
Example
Thefollowingexampleaddsananimationpath;thensetsthehorizontalandverticalmovementoftheshape.
SubAddMotionPath()
DimeffCustomAsEffect
DimanimBehaviorAsAnimationBehavior
DimshpRectangleAsShape
'Addsrectangleandsetseffectandanimation
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=300,_
Top:=300,Width:=300,Height:=150)
SeteffCustom=ActivePresentation.Slides(1).TimeLine_
.MainSequence.AddEffect(Shape:=shpRectangle,_
effectId:=msoAnimEffectCustom)
SetanimBehavior=effCustom.Behaviors.Add(msoAnimTypeMotion)
'Specifiesanimationmotion
WithanimBehavior.MotionEffect
.ByX=50
.ByY=50
EndWith
EndSub
![Page 1186: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1186.jpg)
ByYPropertySetsorreturnsaSinglethatrepresentsscalingormovinganobjectverticallybyaspecifiedpercentageofthescreenwidth,dependingonwhetheritisusedinconjunctionwithaScaleEffectorMotionEffectobject,respectively.Read/write.
expression.ByY
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1187: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1187.jpg)
Remarks
Negativenumbersmovetheobjecthorizontallytotheleft.Floatingpointnumbers(forexample,55.5)areallowed.
Toscaleormoveanobjecthorizontally,usetheByXproperty.
IfboththeByXandByYpropertiesareset,thentheobjectisscaledormovesbothhorizontallyandvertically.
DonotconfusethispropertywiththeBypropertyoftheColorEffect,RotationEffect,orPropertyEffectobjects,whichisusedtosetcolors,rotations,orotherpropertiesofananimationbehavior,respectively.
![Page 1188: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1188.jpg)
Example
Thefollowingexampleaddsananimationpath;thensetsthehorizontalandverticalmovementoftheshape.
SubAddMotionPath()
DimeffCustomAsEffect
DimanimBehaviorAsAnimationBehavior
DimshpRectangleAsShape
'Addsrectangleandsetseffectandanimation
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=300,_
Top:=300,Width:=300,Height:=150)
SeteffCustom=ActivePresentation.Slides(1).TimeLine_
.MainSequence.AddEffect(Shape:=shpRectangle,_
effectId:=msoAnimEffectCustom)
SetanimBehavior=effCustom.Behaviors.Add(msoAnimTypeMotion)
'Specifiesanimationmotion
WithanimBehavior.MotionEffect
.ByX=50
.ByY=50
EndWith
EndSub
![Page 1189: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1189.jpg)
CalloutPropertyReturnsaCalloutFormatobjectthatcontainscalloutformattingpropertiesforthespecifiedshape.AppliestoShapeorShapeRangeobjectsthatrepresentlinecallouts.Read-only.
![Page 1190: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1190.jpg)
Example
ThisexampleaddstomyDocumentanovalandacalloutthatpointstotheoval.Thecallouttextwon'thaveaborder,butitwillhaveaverticalaccentbarthatseparatesthetextfromthecalloutline.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
.AddShapemsoShapeOval,180,200,280,130
With.AddCallout(msoCalloutTwo,420,170,170,40)
.TextFrame.TextRange.Text="Myoval"
With.Callout
.Accent=True
.Border=False
EndWith
EndWith
EndWith
![Page 1191: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1191.jpg)
ShowAll
![Page 1192: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1192.jpg)
CaptionPropertyCaptionpropertyasitappliestotheApplicationobject.
Returnsthetextthatappearsinthetitlebaroftheapplicationwindow.Read/writeString.
expression.Caption
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
CaptionpropertyasitappliestotheDocumentWindowobject.
Returnsthetextthatappearsinthetitlebarofthedocumentwindow.Read-onlyString.
expression.Caption
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 1193: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1193.jpg)
Example
Thisexampledisplaysthecaptionforeachopendocumentwindow.
WithApplication.Windows
Forw=1To.Count
MsgBox"Window"&w&"contains"&.Item(1).Caption
Next
EndWith
![Page 1194: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1194.jpg)
CellsPropertyReturnsaCellRangecollectionthatrepresentsthecellsinatablecolumnorrow.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1195: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1195.jpg)
Example
Thisexamplecreatesanewpresentation,addsaslide,insertsa3x3tableontheslide,andassignsthecolumnandrownumbertoeachcellinthetable.
DimiAsInteger
DimjAsInteger
WithPresentations.Add
.Slides.Add(1,ppLayoutBlank).Shapes.AddTable(3,3).Select
SetmyTable=.Slides(1).Shapes(1).Table
Fori=1TomyTable.Columns.Count
Forj=1TomyTable.Columns(i).Cells.Count
myTable.Columns(i).Cells(j).Shape.TextFrame_
.TextRange.Text="col."&i&"row"&j
Nextj
Nexti
EndWith
![Page 1196: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1196.jpg)
CharacterPropertyReturnsorsetstheUnicodecharactervaluethatisusedforbulletsinthespecifiedtext.Read/writeLong.
![Page 1197: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1197.jpg)
Example
Thisexamplesetsthebulletcharacterforshapetwoonslideoneintheactivepresentation.
Setframe2=ActivePresentation.Slides(1).Shapes(2).TextFrame
Withframe2.TextRange.ParagraphFormat.Bullet
.Character=8226
.Visible=True
EndWith
![Page 1198: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1198.jpg)
ShowAll
![Page 1199: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1199.jpg)
ChartUnitEffectPropertyReturnsorsetsavaluethatindicateswhetherthegraphrangeisanimatedbyseries,category,orelement.Read/writePpChartUnitEffect.
PpChartUnitEffectcanbeoneofthesePpChartUnitEffectconstants.ppAnimateByCategoryppAnimateByCategoryElementsppAnimateBySeriesppAnimateBySeriesElementsppAnimateChartAllAtOnceppAnimateChartMixed
expression.ChartUnitEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1200: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1200.jpg)
Remarks
Ifyourgraphdoesn'tbecomeanimated,makesurethattheAnimatepropertyissettoTrue
![Page 1201: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1201.jpg)
Example
Thisexamplesetsshapetwoonslidethreeintheactivepresentationtobeanimatedbyseries.Shapetwomustbeagraphforthistowork.
WithActivePresentation.Slides(3).Shapes(2)
With.AnimationSettings
.ChartUnitEffect=ppAnimateBySeries
.EntryEffect=ppEffectFlyFromLeft
.Animate=True
EndWith
EndWith
![Page 1202: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1202.jpg)
ShowAll
![Page 1203: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1203.jpg)
CheckIfOfficeIsHTMLEditorPropertyDetermineswhetherMicrosoftPowerPointcheckstoseewhetheranOfficeapplicationisthedefaultHTMLeditorwhenyoustartPowerPoint.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsePowerPointdoesnotchecktoseewhetheranOfficeapplicationisthedefaultHTMLeditorwhenyoustartPowerPoint.msoTriStateMixedmsoTriStateTogglemsoTrueDefault.PowerPointcheckstoseewhetheranOfficeapplicationisthedefaultHTMLeditorwhenyoustartPowerPoint.
![Page 1204: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1204.jpg)
Remarks
ThispropertyisusedonlyiftheWebbrowseryouareusingsupportsHTMLeditingandHTMLeditors.
TouseadifferentHTMLeditor,youmustsetthispropertytoFalseandthenregistertheeditorasthedefaultsystemHTMLeditor.
![Page 1205: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1205.jpg)
Example
ThisexamplecausesMicrosoftPowerPointnottocheckwhetheranOfficeapplicationisthedefaultHTMLeditor.
Application.DefaultWebOptions.CheckIfOfficeIsHTMLEditor=msoFalse
![Page 1206: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1206.jpg)
ShowAll
![Page 1207: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1207.jpg)
ChildPropertyMsoTrueiftheshapeisachildshapeorifallshapesinashaperangearechildshapesofthesameparent.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesnotapplytothisproperty.msoFalseTheshapeisnotachildshapeor,ifashaperange,allchildshapesdonotbelongtothesameparent.msoTriStateMixedDoesnotapplytothisproperty.msoTriStateToggleDoesnotapplytothisproperty.msoTrueTheshapeisachildshapeor,ifashaperange,allchildshapesbelongtothesameparent.
expression.Child
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1208: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1208.jpg)
Example
Thisexampleselectsthefirstshapeinthecanvas,andiftheselectedshapeisachildshape,fillstheshapewiththespecifiedcolor.Thisexampleassumesthatthefirstshapeintheactivepresentationisadrawingcanvasthatcontainsmultipleshapes.
SubFillChildShape()
'Selectthefirstshapeinthedrawingcanvas
ActivePresentation.Slides(1).Shapes(1).CanvasItems(1).Select
'Fillselectedshapeifitisachildshape
WithActiveWindow.Selection
If.ShapeRange.Child=msoTrueThen
.ShapeRange.Fill.ForeColor.RGB=RGB(Red:=100,Green:=0,Blue:=200)
Else
MsgBox"Thisshapeisnotachildshape."
EndIf
EndWith
EndSub
![Page 1209: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1209.jpg)
ChildrenPropertyReturnsaDiagramNodeChildrenobjectthatrepresentsallofthechildrenofthespecifieddiagramnode.
expression.Children
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1210: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1210.jpg)
Example
Thefollowingexamplecreatesapyramiddiagramandaddschildnodestoit.
SubCreatePyramidDiagram()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
'Addspyramiddiagramandfirstchildnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramPyramid,Left:=10,_
Top:=15,Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addsthreeadditionalchildnodestodiagram
ForintNodes=1To3
dgnNode.AddNode
NextintNodes
EndSub
![Page 1211: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1211.jpg)
ChildShapeRangePropertyReturnsaShapeRangeobjectthatrepresentsthechildshapesofaselection.
expression.ChildShapeRange
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1212: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1212.jpg)
Example
Thisexamplecreatesanewdocumentwithadrawingcanvas,populatesthedrawingcanvaswithshapes,andselectstheshapesaddedtothecanvas.Thenaftercheckingthattheshapesselectedarechildshapes,itfillsthechildshapeswithapattern.
SubChildShapes()
DimsldNewAsSlide
DimshpCanvasAsShape
'Createanewslidewithadrawingcanvasandshapes
SetsldNew=Presentations(1).Slides_
.Add(Index:=1,Layout:=ppLayoutBlank)
SetshpCanvas=sldNew.Shapes.AddCanvas(_
Left:=100,Top:=100,Width:=200,Height:=200)
WithshpCanvas.CanvasItems
.AddShapemsoShapeRectangle,Left:=0,Top:=0,_
Width:=100,Height:=100
.AddShapemsoShapeOval,Left:=0,Top:=50,_
Width:=100,Height:=100
.AddShapemsoShapeDiamond,Left:=0,Top:=100,_
Width:=100,Height:=100
EndWith
'Selectallshapesinthecanvas
shpCanvas.CanvasItems.SelectAll
'Fillcanvaschildshapeswithapattern
WithActiveWindow.Selection
If.HasChildShapeRange=TrueThen
.ChildShapeRange.Fill.PatternedPattern:=msoPatternDivot
Else
MsgBox"Thisisnotarangeofchildshapes."
EndIf
EndWith
EndSub
![Page 1213: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1213.jpg)
![Page 1214: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1214.jpg)
ShowAll
![Page 1215: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1215.jpg)
CollatePropertyDetermineswhetheracompletecopyofthespecifiedpresentationisprintedbeforethefirstpageofthenextcopyisprinted.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueDefault.Acompletecopyofthespecifiedpresentationisprintedbeforethefirstpageofthenextcopyisprinted.
![Page 1216: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1216.jpg)
Remarks
SpecifyingavaluefortheCollateargumentofthePrintOutmethodsetsthevalueofthisproperty.
![Page 1217: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1217.jpg)
Example
Thisexampleprintsthreecollatedcopiesoftheactivepresentation.
WithActivePresentation.PrintOptions
.NumberOfCopies=3
.Collate=msoTrue
.Parent.PrintOut
EndWith
![Page 1218: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1218.jpg)
ColorPropertyReturnsaColorFormatobjectthatrepresentsthecolorforthespecifiedcharacters.Read-only.
![Page 1219: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1219.jpg)
Example
Thisexamplesetsthecolorofcharactersonethroughfiveinthetitleonslideone.
myRed=RGB(255,0,0)
SetmyT=Application.ActivePresentation.Slides(1).Shapes.Title
myT.TextFrame.TextRange.Characters(1,5).Font.Color.RGB=myRed
![Page 1220: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1220.jpg)
Color2PropertyReturnsaColorFormatobjectthatrepresentsthecoloronwhichtoendacolor-cycleanimation.
expression.Color2
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1221: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1221.jpg)
Example
Thefollowingexampleaddsashape,addsafillanimationtothatshape,thenreportsthestartingandendingfillcolors.
SubSetStartEndColors()
DimeffChangeFillAsEffect
DimshpCubeAsShape
DimaAsAnimationBehavior
'Addscubeandsetfilleffect
SetshpCube=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeCube,Left:=300,_
Top:=300,Width:=100,Height:=100)
SeteffChangeFill=ActivePresentation.Slides(1).TimeLine_
.MainSequence.AddEffect(Shape:=shpCube,_
effectId:=msoAnimEffectChangeFillColor)
'Setsdurationofeffectanddisplaysamessagecontaining
'thestartingandendingcolorsforthefilleffect
effChangeFill.Timing.Duration=3
MsgBox"StartColor="&effChangeFill.EffectParameters_
.Color1&vbCrLf&"EndColor="&effChangeFill_
.EffectParameters.Color2
EndSub
![Page 1222: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1222.jpg)
ColorEffectPropertyReturnsaColorEffectobjectthatrepresentsthecolorpropertiesforaspecifiedanimationbehavior.
expression.ColorEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1223: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1223.jpg)
Example
Thisexampleaddsashapetothefirstslideoftheactivepresentationandsetsacoloreffectbehaviortochangethefillcolorofthenewshape.
SubChangeColorEffect()
DimsldFirstAsSlide
DimshpHeartAsShape
DimeffNewAsEffect
DimbhvEffectAsAnimationBehavior
SetsldFirst=ActivePresentation.Slides(1)
SetshpHeart=sldFirst.Shapes.AddShape(Type:=msoShapeHeart,_
Left:=100,Top:=100,Width:=100,Height:=100)
SeteffNew=sldFirst.TimeLine.MainSequence.AddEffect_
(Shape:=shpHeart,EffectID:=msoAnimEffectChangeFillColor,_
Trigger:=msoAnimTriggerAfterPrevious)
SetbhvEffect=effNew.Behaviors.Add(Type:=msoAnimTypeColor)
WithbhvEffect.ColorEffect
.From.RGB=RGB(Red:=255,Green:=0,Blue:=0)
.To.RGB=RGB(Red:=0,Green:=0,Blue:=255)
EndWith
EndSub
![Page 1224: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1224.jpg)
ColorSchemePropertyReturnsorsetstheColorSchemeobjectthatrepresentstheschemecolorsforthespecifiedslide,sliderange,orslidemaster.Read/write.
![Page 1225: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1225.jpg)
Example
Thisexamplesetsthetitlecolortogreenforslidesoneandthreeintheactivepresentation.
SetmySlides=ActivePresentation.Slides.Range(Array(1,3))
mySlides.ColorScheme.Colors(ppTitle).RGB=RGB(0,255,0)
![Page 1226: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1226.jpg)
ColorSchemesPropertyReturnsaColorSchemescollectionthatrepresentsthecolorschemesinthespecifiedpresentation.Read-only.
![Page 1227: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1227.jpg)
Example
Thisexamplesetsthebackgroundcolorforcolorschemethreeintheactivepresentationandthenappliesthecolorschemetoallslidesinthepresentationthatarebasedontheslidemaster.
WithActivePresentation
Setcs1=.ColorSchemes(3)
cs1.Colors(ppBackground).RGB=RGB(128,128,0)
.SlideMaster.ColorScheme=cs1
EndWith
![Page 1228: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1228.jpg)
ShowAll
![Page 1229: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1229.jpg)
ColorTypePropertyReturnsorsetsthetypeofcolortransformationappliedtothespecifiedpictureorOLEobject.Read/writeMsoPictureColorType.
MsoPictureColorTypecanbeoneoftheseMsoPictureColorTypeconstants.msoPictureAutomaticmsoPictureBlackAndWhitemsoPictureGrayscalemsoPictureMixedmsoPictureWatermark
expression.ColorType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1230: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1230.jpg)
Example
ThisexamplesetsthecolortransformationtograyscaleforshapeoneonmyDocument.ShapeonemustbeeitherapictureoranOLEobject.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(1).PictureFormat.ColorType=msoPictureGrayScale
![Page 1231: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1231.jpg)
ColumnsPropertyReturnsaColumnscollectionthatrepresentsallthecolumnsinatable.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1232: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1232.jpg)
Example
Thisexampledisplaystheshapenumber,theslidenumber,andthenumberofcolumnsinthefirsttableoftheactivepresentation.
DimColCountAsInteger
DimslAsInteger
DimshAsInteger
WithActivePresentation
Forsl=1To.Slides.Count
Forsh=1To.Slides(sl).Shapes.Count
If.Slides(sl).Shapes(sh).HasTableThen
ColCount=.Slides(sl).Shapes(sh)_
.Table.Columns.Count
MsgBox"Shape"&sh&"onslide"&sl&_
"containsthefirsttableandhas"&_
ColCount&"columns."
ExitSub
EndIf
Next
Next
EndWith
Thisexampleteststheselectedshapetoseeifitcontainsatable.Ifitdoes,thecodesetsthewidthofcolumnoneto72points(oneinch).
WithActiveWindow.Selection.ShapeRange
If.HasTable=TrueThen
.Table.Columns(1).Width=72
EndIf
EndWith
![Page 1233: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1233.jpg)
COMAddInsPropertyReturnsareferencetotheComponentObjectModel(COM)add-inscurrentlyloadedinMicrosoftPowerPoint.ThesearelistedintheCOMAdd-Insdialogbox.YoucanaddtheCOMAdd-InscommandtoyourToolsmenubyusingtheCustomizedialogbox.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1234: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1234.jpg)
CommandPropertySetsorreturnsaStringthatrepresentsthecommandtobeexecutedforthecommandeffect.Read/write.
expression.Command
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1235: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1235.jpg)
Remarks
YoucansendOLEverbstoembeddedobjectsusingthisproperty.
IftheshapeisanOLEobject,thentheoleobjectwillexecutethecommandifitunderstandstheverb.
Iftheshapeisamediaobject(sound/video),PowerPointunderstandsthefollowingverbs:play,stop,pause,togglepause,resumeandplayfrom.Anyothercommandsenttotheshapewillbeignored.
![Page 1236: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1236.jpg)
Example
Thefollowingexampleshowshowtosetacommandeffectanimationbehavior.
SetbhvEffect=effectNew.Behaviors.Add(msoAnimTypeCommand)
WithbhvEffect.CommandEffect
.Type=msoAnimCommandTypeVerb
.Command=Play
EndWith
![Page 1237: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1237.jpg)
ShowAll
![Page 1238: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1238.jpg)
CommandBarsPropertyCommandBarspropertyasitappliestotheApplicationobject.
ReturnsaCommandBarscollectionthatrepresentsallthecommandbarsinPowerPoint.Read-only.
CommandBarspropertyasitappliestothePresentationobject.
ReturnsaCommandBarscollectionthatrepresentsthemergedcommandbarsetfromthehostcontainerapplicationandPowerPoint.ThispropertyreturnsavalidobjectonlywhenthecontainerisaDocObjectserver,likeMicrosoftBinder,andPowerPointisactingasanOLEserver.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1239: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1239.jpg)
Example
AsitappliestotheApplicationobject.
ThisexampleenlargesallcommandbarbuttonsandenablesToolTips.
WithApplication.CommandBars
.LargeButtons=True
.DisplayTooltips=True
EndWith
AsitappliestothePresentationobject.
ThisexampledisplaystheFormattingcommandbarwiththemergedcommandbarsetatthetopoftheapplicationwindow.
WithActivePresentation.CommandBars("Formatting")
.Visible=True
.Position=msoBarTop
EndWith
![Page 1240: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1240.jpg)
CommandEffectPropertyReturnsaCommandEffectobjectforthespecifiedanimationbehavior.Read-only.
expression.CommandEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1241: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1241.jpg)
Remarks
Youcansendevents,callfunctions,andsendOLEverbstoembeddedobjectsusingthisproperty.
![Page 1242: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1242.jpg)
Example
Thefollowingexampleshowshowtosetacommandeffectanimationbehavior.
SetbhvEffect=effectNew.Behaviors.Add(msoAnimTypeCommand)
WithbhvEffect.CommandEffect
.Type=msoAnimCommandTypeVerb
.Command=Play
EndWith
![Page 1243: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1243.jpg)
CommentsPropertyReturnsaCommentsobjectthatrepresentsacollectionofcomments.
expression.Comments
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1244: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1244.jpg)
Example
Thefollowingexampleaddsacommenttoaslide.
SubAddNewComment()
ActivePresentation.Slides(1).Comments.Add_
Left:=0,Top:=0,Author:="JohnDoe",AuthorInitials:="jd",_
Text:="Pleasecheckthisspellingagainbeforethenextdraft."
EndSub
![Page 1245: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1245.jpg)
ConnectionSiteCountPropertyReturnsthenumberofconnectionsitesonthespecifiedshape.Read-onlyLong.
![Page 1246: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1246.jpg)
Example
ThisexampleaddstworectanglestomyDocumentandjoinsthemwithtwoconnectors.Thebeginningsofbothconnectorsattachtoconnectionsiteoneonthefirstrectangle;theendsoftheconnectorsattachtothefirstandlastconnectionsitesofthesecondrectangle.
SetmyDocument=ActivePresentation.Slides(1)
Sets=myDocument.Shapes
SetfirstRect=s.AddShape(msoShapeRectangle,100,50,200,100)
SetsecondRect=s.AddShape(msoShapeRectangle,300,300,200,100)
lastsite=secondRect.ConnectionSiteCount
Withs.AddConnector(msoConnectorCurve,0,0,100,100)_
.ConnectorFormat
.BeginConnectConnectedShape:=firstRect,ConnectionSite:=1
.EndConnectConnectedShape:=secondRect,ConnectionSite:=1
EndWith
Withs.AddConnector(msoConnectorCurve,0,0,100,100)_
.ConnectorFormat
.BeginConnectConnectedShape:=firstRect,ConnectionSite:=1
.EndConnectConnectedShape:=secondRect,_
ConnectionSite:=lastsite
EndWith
![Page 1247: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1247.jpg)
ShowAll
![Page 1248: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1248.jpg)
ConnectorPropertyDetermineswhetherthespecifiedshapeisaconnector.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedshapeisaconnector.
![Page 1249: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1249.jpg)
Example
ThisexampledeletesallconnectorsonmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
Fori=.CountTo1Step-1
With.Item(i)
If.ConnectorThen.Delete
EndWith
Next
EndWith
![Page 1250: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1250.jpg)
ConnectorFormatPropertyReturnsaConnectorFormatobjectthatcontainsconnectorformattingproperties.AppliestoShapeorShapeRangeobjectsthatrepresentconnectors.Read-only.
![Page 1251: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1251.jpg)
Example
ThisexampleaddstworectanglestomyDocument,attachesthemwithaconnector,automaticallyreroutestheconnectoralongtheshortestpath,andthendetachestheconnectorfromtherectangles.
SetmyDocument=ActivePresentation.Slides(1)
Sets=myDocument.Shapes
SetfirstRect=s.AddShape(msoShapeRectangle,100,50,200,100)
SetsecondRect=s.AddShape(msoShapeRectangle,300,300,200,100)
Withs.AddConnector(msoConnectorCurve,0,0,0,0).ConnectorFormat
.BeginConnectfirstRect,1
.EndConnectsecondRect,1
.Parent.RerouteConnections
.BeginDisconnect
.EndDisconnect
EndWith
![Page 1252: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1252.jpg)
ContainerPropertyReturnstheobjectthatcontainsthespecifiedembeddedpresentation.Read-onlyObject.
NoteIfthecontainerdoesn'tsupportOLEAutomation,orifthespecifiedpresentationisn'tembeddedinaMicrosoftBinderfile,thispropertyfails.
![Page 1253: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1253.jpg)
Example
ThisexamplehidesthesecondsectionoftheMicrosoftBinderfilethatcontainstheembeddedactivepresentation.TheContainerpropertyofthepresentationreturnsaSectionobject,andtheParentpropertyoftheSectionobjectreturnsaBinderobject.
Application.ActivePresentation.Container.Parent.Sections(2)_
.Visible=False
![Page 1254: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1254.jpg)
ContrastPropertyReturnsorsetsthecontrastforthespecifiedpictureorOLEobject.Thevalueforthispropertymustbeanumberfrom0.0(theleastcontrast)to1.0(thegreatestcontrast).Read/writeSingle.
![Page 1255: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1255.jpg)
Example
ThisexamplesetsthecontrastforshapeoneonmyDocument.ShapeonemustbeeitherapictureoranOLEobject.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(1).PictureFormat.Contrast=0.8
![Page 1256: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1256.jpg)
CountPropertyReturnsthenumberofobjectsinthespecifiedcollection.
Read-onlyIntegerforthefollowingobjects:Adjustments,CanvasShapes,DiagramNodeChildren,DiagramNodes,GroupShapes,ShapeNodes,andShapes.
Read-onlyLongforthefollowingobjects:ActionSettings,AddIns,AnimationPoints,Animations10,Borders,CellRange,ColorScheme,ColorSchemes,Columns,Comments,Designs,DocumentWindows,ExtraColors,Fonts,Hyperlinks,NamedSlideShow,NamedSlideShows,ObjectVerbs,Panes,Placeholders,Presentations,PrintRanges,PublishObjects,Rows,RulerLevels,ShapeRange,SlideRange,Slides,SlideShowWindows,TabStops,Tags,TextRange,TextStyleLevels,TextStyles,TimeNodes,andTriggers.
![Page 1257: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1257.jpg)
Example
Thisexampleclosesallwindowsexcepttheactivewindow.
WithApplication.Windows
Fori=2To.Count
.Item(2).Close
Next
EndWith
![Page 1258: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1258.jpg)
CreatorPropertyReturnsaLongthatrepresentsthefour-charactercreatorcodefortheapplicationinwhichthespecifiedobjectwascreated.Forexample,iftheobjectwascreatedinPowerPoint,thispropertyreturnsthehexadecimalnumber50575054.Read-only.
expression.Creator
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1259: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1259.jpg)
Remarks
TheCreatorpropertyisdesignedtobeusedinMicrosoftOfficeapplicationsfortheMacintosh.
![Page 1260: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1260.jpg)
Example
ThisexampledisplaysamessageaboutthecreatorofmyObject.
SetmyObject=Application.ActivePresentation.Slides(1).Shapes(1)
IfmyObject.Creator=&h50575054Then
MsgBox"ThisisaPowerPointobject"
Else
MsgBox"ThisisnotaPowerPointobject"
EndIf
![Page 1261: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1261.jpg)
CropBottomPropertyReturnsorsetsthenumberofpointsthatarecroppedoffthebottomofthespecifiedpictureorOLEobject.Read/writeSingle.
NoteCroppingiscalculatedrelativetotheoriginalsizeofthepicture.Forexample,ifyouinsertapicturethatisoriginally100pointshigh,rescaleitsothatit's200pointshigh,andthensettheCropBottompropertyto50,100points(not50)willbecroppedoffthebottomofyourpicture.
![Page 1262: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1262.jpg)
Example
Thisexamplecrops20pointsoffthebottomofshapethreeonmyDocument.Fortheexampletowork,shapethreemustbeeitherapictureoranOLEobject.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(3).PictureFormat.CropBottom=20
Thisexamplecropsthepercentagespecifiedbytheuseroffthebottomoftheselectedshape,regardlessofwhethertheshapehasbeenscaled.Fortheexampletowork,theselectedshapemustbeeitherapictureoranOLEobject.
percentToCrop=InputBox("Whatpercentagedoyou"&_
"wanttocropoffthebottomofthispicture?")
SetshapeToCrop=ActiveWindow.Selection.ShapeRange(1)
WithshapeToCrop.Duplicate
.ScaleHeight1,True
origHeight=.Height
.Delete
EndWith
cropPoints=origHeight*percentToCrop/100
shapeToCrop.PictureFormat.CropBottom=cropPoints
![Page 1263: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1263.jpg)
CropLeftPropertyReturnsorsetsthenumberofpointsthatarecroppedofftheleftsideofthespecifiedpictureorOLEobject.Read/writeSingle.
NoteCroppingiscalculatedrelativetotheoriginalsizeofthepicture.Forexample,ifyouinsertapicturethatisoriginally100pointswide,rescaleitsothatit's200pointswide,andthensettheCropLeftpropertyto50,100points(not50)willbecroppedofftheleftsideofyourpicture.
![Page 1264: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1264.jpg)
Example
Thisexamplecrops20pointsofftheleftsideofshapethreeonmyDocument.Fortheexampletowork,shapethreemustbeeitherapictureoranOLEobject.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(3).PictureFormat.CropLeft=20
Thisexamplecropsthepercentagespecifiedbytheuserofftheleftsideoftheselectedshape,regardlessofwhethertheshapehasbeenscaled.Fortheexampletowork,theselectedshapemustbeeitherapictureoranOLEobject.
percentToCrop=InputBox("Whatpercentagedoyou"&_
"wanttocropofftheleftofthispicture?")
SetshapeToCrop=ActiveWindow.Selection.ShapeRange(1)
WithshapeToCrop.Duplicate
.ScaleWidth1,True
.Width=origWidth
.Delete
EndWith
cropPoints=origWidth*percentToCrop/100
shapeToCrop.PictureFormat.CropLeft=cropPoints
![Page 1265: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1265.jpg)
CropRightPropertyReturnsorsetsthenumberofpointsthatarecroppedofftherightsideofthespecifiedpictureorOLEobject.Read/writeSingle.
NoteCroppingiscalculatedrelativetotheoriginalsizeofthepicture.Forexample,ifyouinsertapicturethatisoriginally100pointswide,rescaleitsothatit's200pointswide,andthensettheCropRightpropertyto50,100points(not50)willbecroppedofftherightsideofyourpicture.
![Page 1266: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1266.jpg)
Example
Thisexamplecrops20pointsofftherightsideofshapethreeonmyDocument.Forthisexampletowork,shapethreemustbeeitherapictureoranOLEobject.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(3).PictureFormat.CropRight=20
Thisexamplecropsthepercentagespecifiedbytheuserofftherightsideoftheselectedshape,regardlessofwhethertheshapehasbeenscaled.Fortheexampletowork,theselectedshapemustbeeitherapictureoranOLEobject.
percentToCrop=InputBox("Whatpercentagedoyou"&_
"wanttocropofftherightofthispicture?")
SetshapeToCrop=ActiveWindow.Selection.ShapeRange(1)
WithshapeToCrop.Duplicate
.ScaleWidth1,True
origWidth=.Width
.Delete
EndWith
cropPoints=origWidth*percentToCrop/100
shapeToCrop.PictureFormat.CropRight=cropPoints
![Page 1267: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1267.jpg)
CropTopPropertyReturnsorsetsthenumberofpointsthatarecroppedoffthetopofthespecifiedpictureorOLEobject.Read/writeSingle.
NoteCroppingiscalculatedrelativetotheoriginalsizeofthepicture.Forexample,ifyouinsertapicturethatisoriginally100pointshigh,rescaleitsothatit's200pointshigh,andthensettheCropToppropertyto50,100points(not50)willbecroppedoffthetopofyourpicture.
![Page 1268: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1268.jpg)
Example
Thisexamplecrops20pointsoffthetopofshapethreeonmyDocument.Fortheexampletowork,shapethreemustbeeitherapictureoranOLEobject.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(3).PictureFormat.CropTop=20
Thisexamplecropsthepercentagespecifiedbytheuseroffthetopoftheselectedshape,regardlessofwhethertheshapehasbeenscaled.Fortheexampletowork,theselectedshapemustbeeitherapictureoranOLEobject.
percentToCrop=InputBox("Whatpercentagedoyou"&_
"wanttocropoffthetopofthispicture?")
SetshapeToCrop=ActiveWindow.Selection.ShapeRange(1)
WithshapeToCrop.Duplicate
.ScaleHeight1,True
origHeight=.Height
.Delete
EndWith
cropPoints=origHeight*percentToCrop/100
shapeToCrop.PictureFormat.CropTop=cropPoints
![Page 1269: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1269.jpg)
CurrentShowPositionPropertyReturnsthepositionofthecurrentslidewithintheslideshowthatisshowinginthespecifiedview.Read-onlyLong.
![Page 1270: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1270.jpg)
Remarks
Ifthespecifiedviewcontainsacustomshow,theCurrentShowPositionpropertyreturnsthepositionofthecurrentslidewithinthecustomshow,notthepositionofthecurrentslidewithintheentirepresentation.
![Page 1271: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1271.jpg)
Example
Thisexamplesetsavariabletothepositionofthecurrentslideintheslideshowrunninginslideshowwindowone.
lastSlideSeen=SlideShowWindows(1).View.CurrentShowPosition
![Page 1272: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1272.jpg)
CustomDocumentPropertiesPropertyReturnsaDocumentPropertiescollectionthatrepresentsallthecustomdocumentpropertiesforthespecifiedpresentation.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1273: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1273.jpg)
Remarks
UsetheBuiltInDocumentPropertiespropertytoreturnthecollectionofbuilt-indocumentproperties.
![Page 1274: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1274.jpg)
Example
Thisexampleaddsastaticcustompropertynamed"Complete"fortheactivepresentation.
Application.ActivePresentation.CustomDocumentProperties_
.AddName:="Complete",LinkToContent:=False,_
Type:=msoPropertyTypeBoolean,Value:=False
Thisexampleprintsouttheactivepresentationifthevalueofthe"Complete"custompropertyisTrue.
WithApplication.ActivePresentation
If.CustomDocumentProperties("complete")Then.PrintOut
EndWith
![Page 1275: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1275.jpg)
ShowAll
![Page 1276: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1276.jpg)
DashStylePropertyReturnsorsetsthedashstyleforthespecifiedline.Read/writeMsoLineDashStyle.
MsoLineDashStylecanbeoneoftheseMsoLineDashStyleconstants.msoLineDashmsoLineDashDotmsoLineDashDotDotmsoLineDashStyleMixedmsoLineLongDashmsoLineLongDashDotmsoLineRoundDotmsoLineSolidmsoLineSquareDot
expression.DashStyle
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1277: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1277.jpg)
Example
ThisexampleaddsabluedashedlinetomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(10,10,250,250).Line
.DashStyle=msoLineDashDotDot
.ForeColor.RGB=RGB(50,0,128)
EndWith
![Page 1278: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1278.jpg)
DateAndTimePropertyReturnsaHeaderFooterobjectthatrepresentsthedateandtimeitemthatappearsinthelower-leftcornerofaslideorintheupper-rightcornerofanotespage,handout,oroutline.Read-only.
![Page 1279: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1279.jpg)
Example
Thisexamplesetsthedateandtimeformatfortheslidemasterintheactivepresentation.Thissettingwillapplytoallslidesthatarebasedonthismaster.
SetmyPres=Application.ActivePresentation
WithmyPres.SlideMaster.HeadersFooters.DateAndTime
.Format=ppDateTimeMdyy
.UseFormat=True
EndWith
![Page 1280: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1280.jpg)
DateTimePropertyReturnsaDaterepresentingthedateandtimeacommentwascreated.
expression.DateTime
expressionRequired.AnexpressionthatreturnsaCommentobject.
![Page 1281: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1281.jpg)
Remarks
Don'tconfusethispropertywiththeDateAndTimeproperty,whichappliestotheheadersandfootersofaslide.
![Page 1282: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1282.jpg)
Example
Thefollowingexampleprovidesinformationaboutallthecommentsforagivenslide.
SubListComments()
DimcmtExistingAsComment
DimstrAuthorInfoAsString
ForEachcmtExistingInActivePresentation.Slides(1).Comments
WithcmtExisting
strAuthorInfo=strAuthorInfo&.Author&"'scomment#"&_
.AuthorIndex&"("&.Text&")wascreatedon"&_
.DateTime&vbCrLf
EndWith
Next
IfstrAuthorInfo<>""Then
MsgBoxstrAuthorInfo
Else
MsgBox"Therearenocommentsonthisslide."
EndIf
EndSub
![Page 1283: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1283.jpg)
DeceleratePropertySetsorreturnsaSinglethatrepresentsthepercentofthedurationoverwhichatimingdecelerationshouldtakeplace.Forexample,avalueof0.9meansthatandecelerationshouldstartatthedefaultspeed,andthenstarttoslowdownafterthefirsttenpercentoftheanimation.Read/write.
expression.Decelerate
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1284: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1284.jpg)
Example
Thisexampleaddsashapeandaddsananimationthatstartsatthedefaultspeedandslowsdownafter70%oftheanimationhasfinished.
SubAddShapeSetTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
'Addsrectangleandsetsanimationeffect
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine_
.MainSequence.AddEffect(Shape:=shpRectangle,_
effectId:=msoAnimEffectPathDiamond)
'Slowstheeffectafterseventypercentoftheanimationhasfinished
WitheffDiamond.Timing
.Decelerate=0.3
EndWith
EndSub
![Page 1285: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1285.jpg)
ShowAll
![Page 1286: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1286.jpg)
DefaultLanguageIDPropertyReturnsorsetsthedefaultlanguageofapresentation.WhenyousettheDefaultLanguageIDpropertyforapresentation,yousetitforallsubsequentnewpresentationsaswell.Read/writeMsoLanguageID.
MsoLanguageIDcanbeoneoftheseMsoLanguageIDconstants.msoLanguageIDAfrikaansmsoLanguageIDAlbanianmsoLanguageIDAmharicmsoLanguageIDArabicmsoLanguageIDArabicAlgeriamsoLanguageIDArabicBahrainmsoLanguageIDArabicEgyptmsoLanguageIDArabicIraqmsoLanguageIDArabicJordanmsoLanguageIDArabicKuwaitmsoLanguageIDArabicLebanonmsoLanguageIDArabicLibyamsoLanguageIDArabicMoroccomsoLanguageIDArabicOmanmsoLanguageIDArabicQatarmsoLanguageIDArabicSyriamsoLanguageIDArabicTunisiamsoLanguageIDArabicUAEmsoLanguageIDArabicYemenmsoLanguageIDArmenianmsoLanguageIDAssamesemsoLanguageIDAzeriCyrillicmsoLanguageIDAzeriLatinmsoLanguageIDBasquemsoLanguageIDBelgianDutch
![Page 1287: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1287.jpg)
msoLanguageIDBelgianFrenchmsoLanguageIDBengalimsoLanguageIDBrazilianPortuguesemsoLanguageIDBulgarianmsoLanguageIDBurmesemsoLanguageIDByelorussianmsoLanguageIDCatalanmsoLanguageIDCherokeemsoLanguageIDChineseHongKongmsoLanguageIDChineseMacaomsoLanguageIDChineseSingaporemsoLanguageIDCroatianmsoLanguageIDCzechmsoLanguageIDDanishmsoLanguageIDDutchmsoLanguageIDEnglishAUSmsoLanguageIDEnglishBelizemsoLanguageIDEnglishCanadianmsoLanguageIDEnglishCaribbeanmsoLanguageIDEnglishIrelandmsoLanguageIDEnglishJamaicamsoLanguageIDEnglishNewZealandmsoLanguageIDEnglishPhilippinesmsoLanguageIDEnglishSouthAfricamsoLanguageIDEnglishTrinidadmsoLanguageIDEnglishUKmsoLanguageIDEnglishUSmsoLanguageIDEnglishZimbabwemsoLanguageIDEstonianmsoLanguageIDFaeroesemsoLanguageIDFarsimsoLanguageIDFinnishmsoLanguageIDFrench
![Page 1288: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1288.jpg)
msoLanguageIDFrenchCameroonmsoLanguageIDFrenchCanadianmsoLanguageIDFrenchCotedIvoiremsoLanguageIDFrenchLuxembourgmsoLanguageIDFrenchMalimsoLanguageIDFrenchMonacomsoLanguageIDFrenchReunionmsoLanguageIDFrenchSenegalmsoLanguageIDFrenchWestIndiesmsoLanguageIDFrenchZairemsoLanguageIDFrisianNetherlandsmsoLanguageIDGaelicIrelandmsoLanguageIDGaelicScotlandmsoLanguageIDGalicianmsoLanguageIDGeorgianmsoLanguageIDGermanmsoLanguageIDGermanAustriamsoLanguageIDGermanLiechtensteinmsoLanguageIDGermanLuxembourgmsoLanguageIDGreekmsoLanguageIDGujaratimsoLanguageIDHebrewmsoLanguageIDHindimsoLanguageIDHungarianmsoLanguageIDIcelandicmsoLanguageIDIndonesianmsoLanguageIDInuktitutmsoLanguageIDItalianmsoLanguageIDJapanesemsoLanguageIDKannadamsoLanguageIDKashmirimsoLanguageIDKazakhmsoLanguageIDKhmer
![Page 1289: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1289.jpg)
msoLanguageIDKirghizmsoLanguageIDKonkanimsoLanguageIDKoreanmsoLanguageIDLaomsoLanguageIDLatvianmsoLanguageIDLithuanianmsoLanguageIDMacedonianmsoLanguageIDMalayalammsoLanguageIDMalayBruneiDarussalammsoLanguageIDMalaysianmsoLanguageIDMaltesemsoLanguageIDManipurimsoLanguageIDMarathimsoLanguageIDMexicanSpanishmsoLanguageIDMixedmsoLanguageIDMongolianmsoLanguageIDNepalimsoLanguageIDNonemsoLanguageIDNoProofingmsoLanguageIDNorwegianBokmolmsoLanguageIDNorwegianNynorskmsoLanguageIDOriyamsoLanguageIDPolishmsoLanguageIDPunjabimsoLanguageIDRhaetoRomanicmsoLanguageIDRomanianmsoLanguageIDRomanianMoldovamsoLanguageIDRussianmsoLanguageIDRussianMoldovamsoLanguageIDSamiLappishmsoLanguageIDSanskritmsoLanguageIDSerbianCyrillicmsoLanguageIDSerbianLatin
![Page 1290: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1290.jpg)
msoLanguageIDSesothomsoLanguageIDSimplifiedChinesemsoLanguageIDSindhimsoLanguageIDSlovakmsoLanguageIDSlovenianmsoLanguageIDSorbianmsoLanguageIDSpanishmsoLanguageIDSpanishArgentinamsoLanguageIDSpanishBoliviamsoLanguageIDSpanishChilemsoLanguageIDSpanishColombiamsoLanguageIDSpanishCostaRicamsoLanguageIDSpanishDominicanRepublicmsoLanguageIDSpanishEcuadormsoLanguageIDSpanishElSalvadormsoLanguageIDSpanishGuatemalamsoLanguageIDSpanishHondurasmsoLanguageIDSpanishModernSortmsoLanguageIDSpanishNicaraguamsoLanguageIDSpanishPanamamsoLanguageIDSpanishParaguaymsoLanguageIDSpanishPerumsoLanguageIDSpanishPuertoRicomsoLanguageIDSpanishUruguaymsoLanguageIDSpanishVenezuelamsoLanguageIDSutumsoLanguageIDSwahilimsoLanguageIDSwedishmsoLanguageIDSwedishFinlandmsoLanguageIDSwissFrenchmsoLanguageIDSwissGermanmsoLanguageIDSwissItalianmsoLanguageIDTajik
![Page 1291: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1291.jpg)
msoLanguageIDTamilmsoLanguageIDTatarmsoLanguageIDTelugumsoLanguageIDThaimsoLanguageIDTibetanmsoLanguageIDTraditionalChinesemsoLanguageIDTsongamsoLanguageIDTswanamsoLanguageIDTurkishmsoLanguageIDTurkmenmsoLanguageIDUkrainianmsoLanguageIDUrdumsoLanguageIDUzbekCyrillicmsoLanguageIDUzbekLatinmsoLanguageIDVendamsoLanguageIDVietnamesemsoLanguageIDWelshmsoLanguageIDXhosamsoLanguageIDZulumsoLanguageIDPortuguese
expression.DefaultLanguageID
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
Remarks
YoucanusetheLanguageIDpropertytosettextrangestodifferentlanguages.Anytextrangenotexplicitlysettoanotherlanguagewillbesettothisdefault.
![Page 1292: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1292.jpg)
Example
Thisexamplesetsthedefaultlanguagefortheactivepresentation,andallsubsequentnewpresentations,toGerman.
ActivePresentation.DefaultLanguageID=msoLanguageIDGerman
![Page 1293: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1293.jpg)
DefaultShapePropertyReturnsaShapeobjectthatrepresentsthedefaultshapeforthepresentation.Read-only.
![Page 1294: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1294.jpg)
Example
Thisexampleaddsashapetoslideoneintheactivepresentation,setsthedefaultfillcolortoredforshapesinthepresentation,andthenaddsanothershape.Thissecondshapewillautomaticallyhavethenewdefaultfillcolorappliedtoit.
WithApplication.ActivePresentation
Setsld1Shapes=.Slides(1).Shapes
sld1Shapes.AddShapemsoShape16pointStar,20,20,100,100
.DefaultShape.Fill.ForeColor.RGB=RGB(255,0,0)
sld1Shapes.AddShapemsoShape16pointStar,150,20,100,100
EndWith
![Page 1295: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1295.jpg)
DefaultSpacingPropertyReturnsorsetsthedefaulttab-stopspacingforthespecifiedtext,inpoints.Read/writeSingle.
![Page 1296: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1296.jpg)
Example
Thisexamplesetsthedefaulttab-stopspacingto0.5inch(36points)forthetextinshapetwoonslideoneintheactivepresentation.
Application.ActivePresentation.Slides(1).Shapes(2).TextFrame_
.Ruler.TabStops.DefaultSpacing=36
![Page 1297: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1297.jpg)
DefaultWebOptionsPropertyReturnstheDefaultWebOptionsobject,whichcontainsglobalapplication-levelattributesusedbyMicrosoftPowerPointwhenyoupublishorsaveacompleteorpartialpresentationasaWebpageoropenaWebpage.Read-only.
![Page 1298: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1298.jpg)
Example
ThisexamplecheckstoseewhetherthedefaultdocumentencodingisWestern.Ifitis,thestringstrDocEncodingissetaccordingly.
SetobjAppWebOptions=Application.DefaultWebOptions
WithobjAppWebOptions
If.Encoding=msoEncodingWesternThen
strDocEncoding="Western"
EndIf
EndWith
![Page 1299: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1299.jpg)
DepthPropertyReturnsorsetsthedepthoftheshape'sextrusion.Canbeavaluefrom–600through9600(positivevaluesproduceanextrusionwhosefrontfaceistheoriginalshape;negativevaluesproduceanextrusionwhosebackfaceistheoriginalshape).Read/writeSingle.
![Page 1300: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1300.jpg)
Example
ThisexampleaddsanovaltomyDocument,andthenspecifiesthattheovalbeextrudedtoadepthof50pointsandthattheextrusionbepurple.
SetmyDocument=ActivePresentation.Slides(1)
SetmyShape=myDocument.Shapes_
.AddShape(msoShapeOval,90,90,90,40)
WithmyShape.ThreeD
.Visible=True
.Depth=50
'RGBvalueforpurple
.ExtrusionColor.RGB=RGB(255,100,255)
EndWith
![Page 1301: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1301.jpg)
DesignPropertyReturnsaDesignobjectrepresentingadesign.
expression.Design
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 1302: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1302.jpg)
Example
Thefollowingexampleaddsatitlemaster.
SubAddDesignMaster
ActivePresentation.Slides(1).Design.AddTitleMaster
EndSub
![Page 1303: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1303.jpg)
DesignsPropertyReturnsaDesignsobject,representingacollectionofdesigns.
expression.Designs
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1304: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1304.jpg)
Example
Thefollowingexampledisplaysamessageforeachdesignintheactivepresentation.
SubAddDesignMaster()
DimdesNameAsDesign
WithActivePresentation
ForEachdesNameIn.Designs
MsgBox"Thedesignnameis"&.Designs.Item(desName.Index).Name
Next
EndWith
EndSub
![Page 1305: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1305.jpg)
DiagramPropertyReturnsaDiagramobjecttowhichadiagramnodebelongs.
expression.Diagram
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1306: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1306.jpg)
Example
Thefollowingexampleaddsadiagramtoaslide.
SubAddADiagram()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
'Addsdiagramandfirstchildnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes.AddDiagram_
(Type:=msoDiagramCycle,Left:=10,Top:=15,_
Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addsthreeadditionalchildnodes
ForintNodes=1To3
dgnNode.AddNode
NextintNodes
'Automaticallyformatsthediagram
dgnNode.Diagram.AutoFormat=msoTrue
EndSub
![Page 1307: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1307.jpg)
DiagramNodePropertyReturnsaDiagramNodeobjectthatrepresentsanodeinadiagram.
expression.DiagramNode
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1308: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1308.jpg)
Example
Thisexampleaddsapyramidcharttothefirstslideintheactivepresentation.
SubCreatePyramidDiagram()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintCountAsInteger
'Addpyramiddiagramtocurrentdocument
SetshpDiagram=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramPyramid,Left:=10,_
Top:=15,Width:=400,Height:=475)
'Addfirstdiagramnodechild
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addthreemorediagramchildnodes
ForintCount=1To3
dgnNode.AddNode
NextintCount
EndSub
![Page 1309: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1309.jpg)
DimPropertyReturnsaColorFormatobjectthatrepresentsthecolortodimtoafterananimationisfinished.
expression.Dim
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1310: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1310.jpg)
Example
Thisexampledisplaysthecolortodimtoaftertheanimation.
SubQueryDimColor()
DimeffDimAsEffect
SeteffDim=ActivePresentation.Slides(1).TimeLine.MainSequence(1)
MsgBoxeffDim.EffectInformation.Dim
EndSub
![Page 1311: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1311.jpg)
DimColorPropertyReturnsorsetsaColorFormatobjectthatrepresentsthecolorofthespecifiedshapeafterit'sbeenbuilt.Read-only.
![Page 1312: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1312.jpg)
Remarks
Ifyoudon'tgettheeffectyouexpect,checkyourotherbuildsettings.Youwon'tseetheeffectoftheDimColorpropertyunlesstheTextLevelEffectpropertyoftheAnimationSettingsobjectissettosomethingotherthanppAnimateLevelNone,theAfterEffectpropertyissettoppAfterEffectDim,andtheAnimatepropertyissettoTrue.Inaddition,ifthespecifiedshapeistheonlyitemorthelastitemtobebuiltontheslide,theshapewon'tbedimmed.Tochangethebuildorderoftheshapesonaslide,usetheAnimationOrderproperty.
![Page 1313: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1313.jpg)
Example
Thisexampleaddsaslidethatcontainsbothatitleandathree-itemlisttotheactivepresentation,setsthetitleandlisttobedimmedafterbeingbuilt,andsetsthecolorthateachofthemwillbedimmedto.
WithActivePresentation.Slides.Add(2,ppLayoutText).Shapes
With.Item(1)
.TextFrame.TextRange.Text="Sampletitle"
With.AnimationSettings
.TextLevelEffect=ppAnimateByAllLevels
.AfterEffect=ppAfterEffectDim
.DimColor.SchemeColor=ppShadow
.Animate=True
EndWith
EndWith
With.Item(2)
.TextFrame.TextRange.Text="Itemone"_
&Chr(13)&"Itemtwo"
With.AnimationSettings
.TextLevelEffect=ppAnimateByFirstLevel
.AfterEffect=ppAfterEffectDim
.DimColor.RGB=RGB(100,150,130)
.Animate=True
EndWith
EndWith
EndWith
![Page 1314: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1314.jpg)
ShowAll
![Page 1315: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1315.jpg)
DirectionPropertyReturnsanMsoAnimDirectionthatrepresentsthedirectionusedforananimationeffect.Thispropertycanbeusedonlyiftheeffectusesadirection.Read/write.
MsoAnimDirectioncanbeoneoftheseMsoAnimDirectionconstants.msoAnimDirectionAcrossmsoAnimDirectionBottommsoAnimDirectionBottomLeftmsoAnimDirectionBottomRightmsoAnimDirectionCentermsoAnimDirectionClockwisemsoAnimDirectionCounterclockwisemsoAnimDirectionCycleClockwisemsoAnimDirectionCycleCounterclockwisemsoAnimDirectionDownmsoAnimDirectionDownLeftmsoAnimDirectionDownRightmsoAnimDirectionFontAllCapsmsoAnimDirectionFontBoldmsoAnimDirectionFontItalicmsoAnimDirectionFontShadowmsoAnimDirectionFontStrikethroughmsoAnimDirectionFontUnderlinemsoAnimDirectionGradualmsoAnimDirectionHorizontalmsoAnimDirectionHorizontalInmsoAnimDirectionHorizontalOutmsoAnimDirectionInmsoAnimDirectionInBottommsoAnimDirectionInCenter
![Page 1316: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1316.jpg)
msoAnimDirectionInSlightlymsoAnimDirectionInstantmsoAnimDirectionLeftmsoAnimDirectionNonemsoAnimDirectionOrdinalMaskmsoAnimDirectionOutmsoAnimDirectionOutBottommsoAnimDirectionOutCentermsoAnimDirectionOutSlightlymsoAnimDirectionRightmsoAnimDirectionSlightlymsoAnimDirectionTopmsoAnimDirectionTopLeftmsoAnimDirectionTopRightmsoAnimDirectionUpmsoAnimDirectionUpLeftmsoAnimDirectionUpRightmsoAnimDirectionVerticalmsoAnimDirectionVerticalInmsoAnimDirectionVerticalOut
expression.Direction
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1317: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1317.jpg)
Example
Thefollowingexampleaddsashape,andanimatestheshapetoflyinfromtheleft.
SubAddShapeSetAnimFly()
DimeffFlyAsEffect
DimshpCubeAsShape
SetshpCube=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeCube,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffFly=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpCube,effectId:=msoAnimEffectFly)
effFly.Timing.Duration=3
effFly.EffectParameters.Direction=msoAnimDirectionLeft
EndSub
![Page 1318: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1318.jpg)
ShowAll
![Page 1319: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1319.jpg)
DisplayAlertsPropertySetsorreturnsaPpAlertLevelconstantthatrepresentswhetherMicrosoftPowerPointdisplaysalertswhilerunningamacro.Read/write.
PpAlertLevelcanbeoneofthesePpAlertLevelconstants.ppAlertsAllAllmessageboxesandalertsaredisplayed;errorsarereturnedtothemacro.ppAlertsNoneDefault.Noalertsormessageboxesaredisplayed.Ifamacroencountersamessagebox,thedefaultvalueischosenandthemacrocontinues.
expression.DisplayAlerts
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 1320: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1320.jpg)
Remarks
ThevalueoftheDisplayAlertspropertyisnotresetonceamacrostopsrunning;itismaintainedthroughoutasession.Itisnotstoredacrosssessions,sowhenPowerPointbegins,itresettoppAlertsNone.
![Page 1321: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1321.jpg)
Example
ThefollowinglineofcodeinstructsPowerPointtodisplayallmessageboxesandalerts,returningerrorstothemacro.
SubSetAlert
Application.DisplayAlerts=ppAlertsAll
EndSub
![Page 1322: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1322.jpg)
ShowAll
![Page 1323: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1323.jpg)
DisplayAutoCorrectOptionsPropertyMsoTrueforMicrosoftPowerPointtodisplaytheAutoCorrectOptionsbutton.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrue
expression.DisplayAutoCorrectOptions
expressionRequired.AnexpressionthatreturnsanAutoCorrectobject.
![Page 1324: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1324.jpg)
Example
ThisexampledisablesdisplayoftheAutoCorrectOptionsandAutoLayoutOptionsbuttons.
SubHideAutoCorrectOpButton()
WithApplication.AutoCorrect
.DisplayAutoCorrectOptions=msoFalse
.DisplayAutoLayoutOptions=msoFalse
EndWith
EndSub
![Page 1325: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1325.jpg)
ShowAll
![Page 1326: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1326.jpg)
DisplayAutoLayoutOptionsPropertyMsoTrueforMicrosoftPowerPointtodisplaytheAutoLayoutOptionsbutton.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrue
expression.DisplayAutoLayoutOptions
expressionRequired.AnexpressionthatreturnsanAutoCorrectobject.
![Page 1327: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1327.jpg)
Example
ThisexampledisablesdisplayoftheAutoCorrectOptionsandAutoLayoutOptionsbuttons.
SubHideAutoCorrectOpButton()
WithApplication.AutoCorrect
.DisplayAutoCorrectOptions=msoFalse
.DisplayAutoLayoutOptions=msoFalse
EndWith
EndSub
![Page 1328: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1328.jpg)
ShowAll
![Page 1329: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1329.jpg)
DisplayCommentsPropertyDetermineswhethercommentsaredisplayedinthespecifiedpresentation.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueCommentsaredisplayedinthespecifiedpresentation.
![Page 1330: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1330.jpg)
Example
Thisexamplehidescommentsintheactivepresentation.
ActivePresentation.DisplayComments=msoFalse
![Page 1331: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1331.jpg)
ShowAll
![Page 1332: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1332.jpg)
DisplayGridLinesPropertyMsoTruetodisplaygridlinesinMicrosoftPowerPoint.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrue
expression.DisplayGridLines
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 1333: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1333.jpg)
Example
ThisexampletogglesthedisplayofthegridlinesinPowerPoint.
SubToggleGridLines()
WithApplication
If.DisplayGridLines=msoTrueThen
.DisplayGridLines=msoFalse
Else
.DisplayGridLines=msoTrue
EndIf
EndWith
EndSub
![Page 1334: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1334.jpg)
ShowAll
![Page 1335: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1335.jpg)
DisplayMasterShapesPropertyDetermineswhetherthespecifiedslideorrangeofslidesdisplaysthebackgroundobjectsontheslidemaster.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedslideorrangeofslidesdisplaysthebackgroundobjectsontheslidemaster.Thesebackgroundobjectscanincludetext,drawings,OLEobjects,andclipartyouaddtotheslidemaster.Headersandfootersaren'tincluded.
![Page 1336: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1336.jpg)
Remarks
Whenyoucreateanewslide,thedefaultvalueforthispropertyismsoTrue.Ifyoucopyaslidefromanotherpresentation,itretainsthesettingithadintheoriginalpresentation.Thatis,iftheslideomittedslidemasterbackgroundobjectsintheoriginalpresentation,itwillomittheminthenewpresentationaswell.
Notethatthelookoftheslide'sbackgroundisdeterminedbythecolorschemeandbackgroundaswellasbythebackgroundobjects.IfsettingtheDisplayMasterShapespropertyalonedoesn'tgiveyoutheresultsyouwant,trysettingtheFollowMasterBackgroundandColorSchemepropertiesaswell.
![Page 1337: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1337.jpg)
Example
Thisexamplecopiesslideonefrompresentationtwo,pastesitattheendofpresentationone,andmatchestheslide'sbackground,colorscheme,andbackgroundobjectstotherestofpresentationone.
Presentations(2).Slides(1).Copy
WithPresentations(1).Slides.Paste
.FollowMasterBackground=True
.ColorScheme=Presentations(1).SlideMaster.ColorScheme
.DisplayMasterShapes=msoTrue
EndWith
![Page 1338: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1338.jpg)
DisplayNamePropertyReturnsaStringthatrepresentsthenameofananimationeffect.Read-only.
expression.DisplayName
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1339: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1339.jpg)
Example
Thisexampledisplaysthenameforthefirstanimationsequenceofthefirstslide'smainanimationsequencetimeline.
SubDisplayEffectName()
DimeffMainAsEffect
SeteffMain=ActivePresentation.Slides(1).TimeLine.MainSequence(1)
MsgBoxeffMain.DisplayName
EndSub
![Page 1340: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1340.jpg)
ShowAll
![Page 1341: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1341.jpg)
DisplayOnTitleSlidePropertyDetermineswhetherthefooter,dateandtime,andslidenumberappearonthetitleslide.Read/writeMsoTriState.Appliestoslidemasters.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThefooter,dateandtime,andslidenumberappearsonallslidesexceptthetitleslide.msoTriStateMixedmsoTriStateTogglemsoTrueThefooter,dateandtime,andslidenumberappearonthetitleslide.
![Page 1342: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1342.jpg)
Example
Thisexamplesetsthefooter,dateandtime,andslidenumbertonotappearonthetitleslide.
Application.ActivePresentation.SlideMaster.HeadersFooters_
.DisplayOnTitleSlide=msoFalse
![Page 1343: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1343.jpg)
ShowAll
![Page 1344: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1344.jpg)
DisplayPasteOptionsPropertyMsoTrueforMicrosoftPowerPointtodisplaythePasteOptionsbutton,whichdisplaysdirectlyundernewlypastedtext.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrue
expression.DisplayPasteOptions
expressionRequired.AnexpressionthatreturnsanOptionsobject.
![Page 1345: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1345.jpg)
Example
ThisexampleenablesthePasteOptionsbuttoniftheoptionhasbeendisabled.
SubShowPasteOptionsButton()
WithApplication.Options
If.DisplayPasteOptions=FalseThen
.DisplayPasteOptions=True
EndIf
EndWith
EndSub
![Page 1346: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1346.jpg)
ShowAll
![Page 1347: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1347.jpg)
DisplaySlideMiniaturePropertyDeterminesifandwhentheslideminiaturewindowisdisplayedautomatically.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseTheslideminiaturewindowisnotdisplayedautomatically.msoTriStateMixedmsoTriStateTogglemsoTrueTheslideminiaturewindowisdisplayedautomaticallywhenthedocumentwindowisinblack-and-whiteview,theslidepaneiszoomedtogreaterthan150%ofthefitpercentage,oramasterviewisvisible.
![Page 1348: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1348.jpg)
Remarks
Thispropertyisnotavailableinslideshowviewandslidesorterview.Theslideminiaturewindowisn'tamemberofeithertheWindowscollectionortheSlideShowWindowscollection.
Thefitpercentageisdeterminedbyacombinationofthesizeoftheslidepaneandthesizeofthepresentationwindow.Todeterminethefitpercentage,settheZoomToFitpropertytoTrueandthenreturnthevalueoftheZoomproperty.
![Page 1349: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1349.jpg)
Example
Ifdocumentwindowoneisinslideview,thisexampledisplaystheslideminiaturewindow.
WithWindows(1).View
If.Type=ppViewSlideThen.DisplaySlideMiniature=msoTrue
EndWith
![Page 1350: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1350.jpg)
DocumentLibraryVersionsPropertyReturnsaDocumentLibraryVersionscollectionthatrepresentsthecollectionofversionsofasharedpresentationthathasversioningenabledandthatisstoredinadocumentlibraryonaserver.
expression.DocumentLibraryVersions
expressionRequired.AnexpressionthatreturnsaPresentationobject.
![Page 1351: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1351.jpg)
Example
Thefollowingexamplereturnsthecollectionofversionsfortheactivepresentation.Thisexampleassumesthattheactivepresentationhasversioningenabledandisstoredinashareddocumentlibraryonaserver.
DimobjVersionsAsDocumentLibraryVersions
SetobjVersions=ActivePresentation.DocumentLibraryVersions
![Page 1352: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1352.jpg)
DropPropertyForcalloutswithanexplicitlysetdropvalue,thispropertyreturnstheverticaldistance(inpoints)fromtheedgeofthetextboundingboxtotheplacewherethecalloutlineattachestothetextbox.ThisdistanceismeasuredfromthetopofthetextboxunlesstheAutoAttachpropertyissettoTrueandthetextboxistotheleftoftheoriginofthecalloutline(theplacethatthecalloutpointsto).Inthiscasethedropdistanceismeasuredfromthebottomofthetextbox.Read-onlySingle.
![Page 1353: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1353.jpg)
Remarks
UsetheCustomDropmethodtosetthevalueofthisproperty.
Thevalueofthispropertyaccuratelyreflectsthepositionofthecalloutlineattachmenttothetextboxonlyifthecallouthasanexplicitlysetdropvalue—thatis,ifthevalueoftheDropTypepropertyismsoCalloutDropCustom.
![Page 1354: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1354.jpg)
Example
ThisexamplereplacesthecustomdropforshapeoneonmyDocumentwithoneoftwopresetdrops,dependingonwhetherthecustomdropvalueisgreaterthanorlessthanhalftheheightofthecallouttextbox.Fortheexampletowork,shapeonemustbeacallout.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).Callout
If.DropType=msoCalloutDropCustomThen
If.Drop<.Parent.Height/2Then
.PresetDropmsoCalloutDropTop
Else
.PresetDropmsoCalloutDropBottom
EndIf
EndIf
EndWith
![Page 1355: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1355.jpg)
ShowAll
![Page 1356: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1356.jpg)
DropTypePropertyReturnsavaluethatindicateswherethecalloutlineattachestothecallouttextbox.Read-onlyMsoCalloutDropType.
MsoCalloutDropTypecanbeoneoftheseMsoCalloutDropTypeconstants.msoCalloutDropBottommsoCalloutDropCentermsoCalloutDropCustommsoCalloutDropMixedmsoCalloutDropTop
expression.DropType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1357: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1357.jpg)
Remarks
IfthecalloutdroptypeismsoCalloutDropCustom,thevaluesoftheDropandAutoAttachpropertiesandtherelativepositionsofthecallouttextboxandcalloutlineorigin(theplacethatthecalloutpointsto)areusedtodeterminewherethecalloutlineattachestothetextbox.
Thispropertyisread-only.UsethePresetDropmethodtosetthevalueofthisproperty.
![Page 1358: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1358.jpg)
Example
ThisexamplecheckstodeterminewhethershapethreeonmyDocumentisacalloutwithacustomdrop.Ifitis,thecodereplacesthecustomdropwithoneoftwopresetdrops,dependingonwhetherthecustomdropvalueisgreaterthanorlessthanhalftheheightofthecallouttextbox.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3)
If.Type=msoCalloutThen
With.Callout
If.DropType=msoCalloutDropCustomThen
If.Drop<.Parent.Height/2Then
.PresetDropmsoCalloutDropTop
Else
.PresetDropmsoCalloutDropBottom
EndIf
EndIf
EndWith
EndIf
EndWith
![Page 1359: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1359.jpg)
DurationPropertyReturnsorsetsaSinglethatrepresentsthelengthofananimationinseconds.Read/write.
expression.Duration
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1360: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1360.jpg)
Example
Thefollowingexampleaddsashapeandananimationtothatshape,thensetsitsanimationduration.
SubAddShapeSetTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
'Addsshapeandsetsanimationeffect
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=sh,effectId:=msoAnimEffectPathDiamond)
'Setsdurationofeffect
effDiamond.Timing.Duration=5
EndSub
![Page 1361: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1361.jpg)
ShowAll
![Page 1362: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1362.jpg)
EditingTypePropertyIfthespecifiednodeisavertex,thispropertyreturnsavaluethatindicateshowchangesmadetothenodeaffectthetwosegmentsconnectedtothenode.Ifthenodeisacontrolpointforacurvedsegment,thispropertyreturnstheeditingtypeoftheadjacentvertex.Read-onlyMsoEditingType.
MsoEditingTypecanbeoneoftheseMsoEditingTypeconstants.msoEditingAutomsoEditingCornermsoEditingSmoothmsoEditingSymmetric
expression.EditingType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1363: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1363.jpg)
Remarks
Thispropertyisread-only.UsetheSetEditingTypemethodtosetthevalueofthisproperty.
![Page 1364: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1364.jpg)
Example
ThisexamplechangesallcornernodestosmoothnodesinshapethreeonmyDocument.Shapethreemustbeafreeformdrawing.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Nodes
Forn=1to.Count
If.Item(n).EditingType=msoEditingCornerThen
.SetEditingTypen,msoEditingSmooth
EndIf
Next
EndWith
![Page 1365: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1365.jpg)
EffectInformationPropertyReturnsanEffectInformationobjectrepresentinginformationforaspecifiedanimationeffect.
expression.EffectInformation
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1366: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1366.jpg)
Example
Thisexampleaddsasoundeffecttothemainanimationsequenceforagivenshape.
SubAddSoundEffect()
DimeffMainAsEffect
SeteffMain=ActivePresentation.Slides(1).TimeLine.MainSequence(1)
MsgBoxeffMain.EffectInformation.AfterEffect
EndSub
![Page 1367: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1367.jpg)
EffectParametersPropertyReturnsanEffectParametersobjectrepresentinganimationeffectproperties.
expression.EffectParameters
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1368: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1368.jpg)
Example
Thisexampleaddsaneffecttothemainanimationsequenceonthefirstslide.ThiseffectchangesthefontforthefirstshapetoBroadway.
SubChangeFontName()
DimshpTextAsShape
DimeffNewAsEffect
SetshpText=ActivePresentation.Slides(1).Shapes(1)
SeteffNew=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpText,EffectId:=msoAnimEffectChangeFont)
effNew.EffectParameters.FontName="Broadway"
EndSub
![Page 1369: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1369.jpg)
ShowAll
![Page 1370: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1370.jpg)
EffectTypePropertySetsorreturnsanMsoAnimEffectconstantthatrepresentsananimationeffecttype.Read/write.
MsoAnimEffectcanbeoneoftheseMsoAnimEffectconstants.msoAnimEffectAppearmsoAnimEffectArcUpmsoAnimEffectAscendmsoAnimEffectBlastmsoAnimEffectBlindsmsoAnimEffectBoldFlashmsoAnimEffectBoldRevealmsoAnimEffectBoomerangmsoAnimEffectBouncemsoAnimEffectBoxmsoAnimEffectBrushOnColormsoAnimEffectBrushOnUnderlinemsoAnimEffectCenterRevolvemsoAnimEffectChangeFillColormsoAnimEffectChangeFontmsoAnimEffectChangeFontColormsoAnimEffectChangeFontSizemsoAnimEffectChangeFontStylemsoAnimEffectChangeLineColormsoAnimEffectCheckerboardmsoAnimEffectCirclemsoAnimEffectColorBlendmsoAnimEffectColorRevealmsoAnimEffectColorWavemsoAnimEffectComplementaryColormsoAnimEffectComplementaryColor2
![Page 1371: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1371.jpg)
msoAnimEffectContrastingColormsoAnimEffectCrawlmsoAnimEffectCreditsmsoAnimEffectCustommsoAnimEffectDarkenmsoAnimEffectDesaturatemsoAnimEffectDescendmsoAnimEffectDiamondmsoAnimEffectDissolvemsoAnimEffectEaseInmsoAnimEffectExpandmsoAnimEffectFademsoAnimEffectFadedAscendmsoAnimEffectFadedSwivelmsoAnimEffectFadedZoommsoAnimEffectFlashBulbmsoAnimEffectFlashOncemsoAnimEffectFlickermsoAnimEffectFlipmsoAnimEffectFloatmsoAnimEffectFlymsoAnimEffectFoldmsoAnimEffectGlidemsoAnimEffectGrowAndTurnmsoAnimEffectGrowShrinkmsoAnimEffectGrowWithColormsoAnimEffectLightenmsoAnimEffectMediaPausemsoAnimEffectMediaPlaymsoAnimEffectMediaStopmsoAnimEffectPath4PointStarmsoAnimEffectPath5PointStarmsoAnimEffectPath6PointStar
![Page 1372: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1372.jpg)
msoAnimEffectPath8PointStarmsoAnimEffectPathArcDownmsoAnimEffectPathArcLeftmsoAnimEffectPathArcRightmsoAnimEffectPathArcUpmsoAnimEffectPathBeanmsoAnimEffectPathBounceLeftmsoAnimEffectPathBounceRightmsoAnimEffectPathBuzzsawmsoAnimEffectPathCirclemsoAnimEffectPathCrescentMoonmsoAnimEffectPathCurvedSquaremsoAnimEffectPathCurvedXmsoAnimEffectPathCurvyLeftmsoAnimEffectPathCurvyRightmsoAnimEffectPathCurvyStarmsoAnimEffectPathDecayingWavemsoAnimEffectPathDiagonalDownRightmsoAnimEffectPathDiagonalUpRightmsoAnimEffectPathDiamondmsoAnimEffectPathDownmsoAnimEffectPathEqualTrianglemsoAnimEffectPathFigure8FourmsoAnimEffectPathFootballmsoAnimEffectPathFunnelmsoAnimEffectPathHeartmsoAnimEffectPathHeartbeatmsoAnimEffectPathHexagonmsoAnimEffectPathHorizontalFigure8msoAnimEffectPathInvertedSquaremsoAnimEffectPathInvertedTrianglemsoAnimEffectPathLeftmsoAnimEffectPathLoopdeLoop
![Page 1373: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1373.jpg)
msoAnimEffectPathNeutronmsoAnimEffectPathOctagonmsoAnimEffectPathParallelogrammsoAnimEffectPathPeanutmsoAnimEffectPathPentagonmsoAnimEffectPathPlusmsoAnimEffectPathPointyStarmsoAnimEffectPathRightTrianglemsoAnimEffectPathSCurve1msoAnimEffectPathSCurve2msoAnimEffectPathSineWavemsoAnimEffectPathSpiralLeftmsoAnimEffectPathSpiralRightmsoAnimEffectPathSpringmsoAnimEffectPathSquaremsoAnimEffectPathStairsDownmsoAnimEffectPathSwooshmsoAnimEffectPathTeardropmsoAnimEffectPathTrapezoidmsoAnimEffectPathTurnDownmsoAnimEffectPathTurnRightmsoAnimEffectPathTurnUpmsoAnimEffectPathTurnUpRightmsoAnimEffectPathVerticalFigure8msoAnimEffectPathWavemsoAnimEffectPathZigzagmsoAnimEffectPeekmsoAnimEffectPinwheelmsoAnimEffectPlusmsoAnimEffectRandomBarsmsoAnimEffectRandomEffectsmsoAnimEffectRiseUpmsoAnimEffectShimmer
![Page 1374: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1374.jpg)
msoAnimEffectSlingmsoAnimEffectSpinmsoAnimEffectSpinnermsoAnimEffectSpiralmsoAnimEffectSplitmsoAnimEffectStretchmsoAnimEffectStretchymsoAnimEffectStripsmsoAnimEffectStyleEmphasismsoAnimEffectSwishmsoAnimEffectSwivelmsoAnimEffectTeetermsoAnimEffectThinLinemsoAnimEffectTransparencymsoAnimEffectUnfoldmsoAnimEffectVerticalGrowmsoAnimEffectWavemsoAnimEffectWedgemsoAnimEffectWheelmsoAnimEffectWhipmsoAnimEffectWipemsoAnimEffectZipmsoAnimEffectZoommsoAnimEffectLightSpeed
expression.EffectType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1375: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1375.jpg)
Example
Thisexamplechangesananimationeffecttoarandombaranimation.
SubChangeEffectType()
DimeffRandomAsEffect
SeteffRandom=ActivePresentation.Slides(1).TimeLine.MainSequence(1)
effRandom.EffectType=msoAnimEffectRandomBars
EndSub
![Page 1376: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1376.jpg)
EmailSubjectPropertyReturnsorsetsthetextstringofthehyperlinksubjectline.ThesubjectlineisappendedtotheInternetaddress(URL)ofthehyperlink.Read/writeString.
![Page 1377: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1377.jpg)
Remarks
Thispropertyiscommonlyusedwithe-mailhyperlinks.Thevalueofthispropertytakesprecedenceoveranye-mailsubjectspecifiedintheAddresspropertyofthesameHyperlinkobject.
![Page 1378: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1378.jpg)
Example
Thisexamplesetsthee-mailsubjectlineofthefirsthyperlinkonslideoneintheactivepresentation.
ActivePresentation.Slides(1).Hyperlinks(1)_
.EmailSubject="QuoteRequest"
![Page 1379: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1379.jpg)
ShowAll
![Page 1380: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1380.jpg)
EmbeddablePropertyDetermineswhetherthespecifiedfontcanbeembeddedinthepresentation.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedfontcanbeembeddedinthepresentation.
expression.Embeddable
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1381: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1381.jpg)
Example
Thisexamplecheckseachfontusedintheactivepresentationtodeterminewhetherit'sembeddableinthepresentation.
ForEachusedFontInPresentations(1).Fonts
IfusedFont.EmbeddableThen
MsgBoxusedFont.Name&":Embeddable"
Else
MsgBoxusedFont.Name&":Notembeddable"
EndIf
NextusedFont
![Page 1382: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1382.jpg)
ShowAll
![Page 1383: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1383.jpg)
EmbeddedPropertyDetermineswhetherthespecifiedfontisembeddedinthepresentation.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedfontisembeddedinthepresentation.
expression.Embedded
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1384: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1384.jpg)
Example
Thisexamplecheckseachfontusedintheactivepresentationtodeterminewhetherit'sembeddedinthepresentation.
ForEachusedFontInPresentations(1).Fonts
IfusedFont.EmbeddedThen
MsgBoxusedFont.Name&":Embedded"
Else
MsgBoxusedFont.Name&":Notembedded"
EndIf
NextusedFont
![Page 1385: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1385.jpg)
ShowAll
![Page 1386: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1386.jpg)
EmbossPropertyDetermineswhetherthecharacterformatisembossed.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThecharacterformatisnotembossed.msoTriStateMixedThespecifiedtextrangecontainsbothembossedandunembossedcharacters.msoTriStateTogglemsoTrueThecharacterformatisembossed.
expression.Emboss
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1387: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1387.jpg)
Example
Thisexamplesetsthetitletextonslideonetoembossed.
Application.ActivePresentation.Slides(1).Shapes.Title_
.TextFrame.TextRange.Font.Emboss=msoTrue
![Page 1388: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1388.jpg)
ShowAll
![Page 1389: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1389.jpg)
EncodingPropertyReturnsorsetsthedocumentencoding(codepageorcharacterset)tobeusedbytheWebbrowserwhenyouviewthesaveddocument.Thedefaultisthesystemcodepage.Read/writeMsoEncoding.
AlthoughMsoEncodingcanbeoneoftheseMsoEncodingconstants,youcannotnotuseanyoftheconstantsthathavethesuffixAutoDetect.ThoseconstantsareusedbytheReloadAsmethod.msoEncodingArabicmsoEncodingArabicASMOmsoEncodingArabicAutoDetectmsoEncodingArabicTransparentASMOmsoEncodingAutoDetectmsoEncodingBalticmsoEncodingCentralEuropeanmsoEncodingCyrillicmsoEncodingCyrillicAutoDetectmsoEncodingEBCDICArabicmsoEncodingEBCDICDenmarkNorwaymsoEncodingEBCDICFinlandSwedenmsoEncodingEBCDICFrancemsoEncodingEBCDICGermanymsoEncodingEBCDICGreekmsoEncodingEBCDICGreekModernmsoEncodingEBCDICHebrewmsoEncodingEBCDICIcelandicmsoEncodingEBCDICInternationalmsoEncodingEBCDICItalymsoEncodingEBCDICJapaneseKatakanaExtendedmsoEncodingEBCDICJapaneseKatakanaExtendedAndJapanesemsoEncodingEBCDICJapaneseLatinExtendedAndJapanese
![Page 1390: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1390.jpg)
msoEncodingEBCDICKoreanExtendedmsoEncodingEBCDICKoreanExtendedAndKoreanmsoEncodingEBCDICLatinAmericaSpainmsoEncodingEBCDICMultilingualROECELatin2msoEncodingEBCDICRussianmsoEncodingEBCDICSerbianBulgarianmsoEncodingEBCDICSimplifiedChineseExtendedAndSimplifiedChinesemsoEncodingEBCDICThaimsoEncodingEBCDICTurkishmsoEncodingEBCDICTurkishLatin5msoEncodingEBCDICUnitedKingdommsoEncodingEBCDICUSCanadamsoEncodingEBCDICUSCanadaAndJapanesemsoEncodingEBCDICUSCanadaAndTraditionalChinesemsoEncodingEUCChineseSimplifiedChinesemsoEncodingEUCJapanesemsoEncodingEUCKoreanmsoEncodingEUCTaiwaneseTraditionalChinesemsoEncodingEuropa3msoEncodingExtAlphaLowercasemsoEncodingGreekmsoEncodingGreekAutoDetectmsoEncodingHebrewmsoEncodingHZGBSimplifiedChinesemsoEncodingIA5GermanmsoEncodingIA5IRVmsoEncodingIA5NorwegianmsoEncodingIA5SwedishmsoEncodingISO2022CNSimplifiedChinesemsoEncodingISO2022CNTraditionalChinesemsoEncodingISO2022JPJISX02011989msoEncodingISO2022JPJISX02021984msoEncodingISO2022JPNoHalfwidthKatakana
![Page 1391: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1391.jpg)
msoEncodingISO2022KR
msoEncodingISO6937NonSpacingAccentmsoEncodingISO885915Latin9msoEncodingISO88591Latin1msoEncodingISO88592CentralEuropemsoEncodingISO88593Latin3msoEncodingISO88594BalticmsoEncodingISO88595CyrillicmsoEncodingISO88596ArabicmsoEncodingISO88597GreekmsoEncodingISO88598HebrewmsoEncodingISO88599TurkishmsoEncodingJapaneseAutoDetectmsoEncodingJapaneseShiftJISmsoEncodingKOI8RmsoEncodingKOI8UmsoEncodingKoreanmsoEncodingKoreanAutoDetectmsoEncodingKoreanJohabmsoEncodingMacCroatiamsoEncodingMacCyrillicmsoEncodingMacGreek1msoEncodingMacHebrewmsoEncodingMacIcelandicmsoEncodingMacJapanesemsoEncodingMacKoreanmsoEncodingMacLatin2msoEncodingMacRomanmsoEncodingMacRomaniamsoEncodingMacSimplifiedChineseGB2312msoEncodingMacTraditionalChineseBig5msoEncodingMacTurkishmsoEncodingMacUkraine
![Page 1392: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1392.jpg)
msoEncodingOEMArabicmsoEncodingOEMBalticmsoEncodingOEMCanadianFrenchmsoEncodingOEMCyrillicmsoEncodingOEMCyrillicIImsoEncodingOEMGreek437GmsoEncodingOEMHebrewmsoEncodingOEMIcelandicmsoEncodingOEMModernGreekmsoEncodingOEMMultilingualLatinImsoEncodingOEMMultilingualLatinIImsoEncodingOEMNordicmsoEncodingOEMPortuguesemsoEncodingOEMTurkishmsoEncodingOEMUnitedStatesmsoEncodingSimplifiedChineseAutoDetectmsoEncodingSimplifiedChineseGBKmsoEncodingT61msoEncodingTaiwanCNSmsoEncodingTaiwanEtenmsoEncodingTaiwanIBM5550msoEncodingTaiwanTCAmsoEncodingTaiwanTeleTextmsoEncodingTaiwanWangmsoEncodingThaimsoEncodingTraditionalChineseAutoDetectmsoEncodingTraditionalChineseBig5msoEncodingTurkishmsoEncodingUnicodeBigEndianmsoEncodingUnicodeLittleEndianmsoEncodingUSASCIImsoEncodingUTF7msoEncodingUTF8
![Page 1393: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1393.jpg)
msoEncodingVietnamesemsoEncodingWestern
msoEncodingMacArabic
expression.Encoding
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1394: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1394.jpg)
Example
ThisexamplecheckstoseewhetherthedefaultdocumentencodingisWestern,andthenitsetsthestringstrDocEncodingaccordingly.
IfApplication.DefaultWebOptions.Encoding=msoEncodingWesternThen
strDocEncoding="Western"
Else
strDocEncoding="Other"
EndIf
![Page 1395: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1395.jpg)
EndPropertyReturnsthenumberofthelastslideinthespecifiedprintrange.Read-onlyLong.
![Page 1396: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1396.jpg)
Example
Thisexampledisplaysamessagethatindicatesthestartingandendingslidenumbersforprintrangeoneintheactivepresentation.
WithActivePresentation.PrintOptions.Ranges
If.Count>0Then
With.Item(1)
MsgBox"Printrange1startsonslide"&.Start&_
"andendsonslide"&.End
EndWith
EndIf
EndWith
![Page 1397: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1397.jpg)
ShowAll
![Page 1398: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1398.jpg)
EndArrowheadLengthPropertyReturnsorsetsthelengthofthearrowheadattheendofthespecifiedline.Read/writeMsoArrowheadLength.
MsoArrowheadLengthcanbeoneoftheseMsoArrowheadLengthconstants.msoArrowheadLengthMediummsoArrowheadLengthMixedmsoArrowheadLongmsoArrowheadShort
expression.EndArrowheadLength
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1399: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1399.jpg)
Example
ThisexampleaddsalinetomyDocument.There'sashort,narrowovalontheline'sstartingpointandalong,widetriangleonitsendpoint.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(100,100,200,300).Line
.BeginArrowheadLength=msoArrowheadShort
.BeginArrowheadStyle=msoArrowheadOval
.BeginArrowheadWidth=msoArrowheadNarrow
.EndArrowheadLength=msoArrowheadLong
.EndArrowheadStyle=msoArrowheadTriangle
.EndArrowheadWidth=msoArrowheadWide
EndWith
![Page 1400: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1400.jpg)
ShowAll
![Page 1401: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1401.jpg)
EndArrowheadStylePropertyReturnsorsetsthestyleofthearrowheadattheendofthespecifiedline.Read/writeMsoArrowheadStyle.
MsoArrowheadStylecanbeoneoftheseMsoArrowheadStyleconstants.msoArrowheadDiamondmsoArrowheadNonemsoArrowheadOpenmsoArrowheadOvalmsoArrowheadStealthmsoArrowheadStyleMixedmsoArrowheadTriangle
expression.EndArrowheadStyle
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1402: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1402.jpg)
Example
ThisexampleaddsalinetomyDocument.There'sashort,narrowovalontheline'sstartingpointandalong,widetriangleonitsendpoint.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(100,100,200,300).Line
.BeginArrowheadLength=msoArrowheadShort
.BeginArrowheadStyle=msoArrowheadOval
.BeginArrowheadWidth=msoArrowheadNarrow
.EndArrowheadLength=msoArrowheadLong
.EndArrowheadStyle=msoArrowheadTriangle
.EndArrowheadWidth=msoArrowheadWide
EndWith
![Page 1403: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1403.jpg)
ShowAll
![Page 1404: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1404.jpg)
EndArrowheadWidthPropertyReturnsorsetsthewidthofthearrowheadattheendofthespecifiedline.Read/writeMsoArrowheadWidth.
MsoArrowheadWidthcanbeoneoftheseMsoArrowheadWidthconstants.msoArrowheadNarrowmsoArrowheadWidemsoArrowheadWidthMediummsoArrowheadWidthMixed
expression.EndArrowheadWidth
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1405: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1405.jpg)
Example
ThisexampleaddsalinetomyDocument.There'sashort,narrowovalontheline'sstartingpointandalong,widetriangleonitsendpoint.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(100,100,200,300).Line
.BeginArrowheadLength=msoArrowheadShort
.BeginArrowheadStyle=msoArrowheadOval
.BeginArrowheadWidth=msoArrowheadNarrow
.EndArrowheadLength=msoArrowheadLong
.EndArrowheadStyle=msoArrowheadTriangle
.EndArrowheadWidth=msoArrowheadWide
EndWith
![Page 1406: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1406.jpg)
ShowAll
![Page 1407: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1407.jpg)
EndConnectedPropertyDetermineswhethertheendofthespecifiedconnectorisconnectedtoashape.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueTheendofthespecifiedconnectorisconnectedtoashape.
expression.EndConnected
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1408: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1408.jpg)
Example
Iftheendoftheconnectorrepresentedbyshapethreeonthefirstslideintheactivepresentationisconnectedtoashape,thisexamplestorestheconnectionsitenumberinthevariableoldEndConnSite,storesareferencetotheconnectedshapeintheobjectvariableoldEndConnShape,andthendisconnectstheendoftheconnectorfromtheshape.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3)
If.ConnectorThen
With.ConnectorFormat
If.EndConnectedThen
oldEndConnSite=.EndConnectionSite
SetoldEndConnShape=.EndConnectedShape
.EndDisconnect
EndIf
EndWith
EndIf
EndWith
![Page 1409: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1409.jpg)
EndConnectedShapePropertyReturnsaShapeobjectthatrepresentstheshapethattheendofthespecifiedconnectorisattachedto.Read-only.
NoteIftheendofthespecifiedconnectorisn'tattachedtoashape,thispropertygeneratesanerror.
![Page 1410: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1410.jpg)
Example
Thisexampleassumesthatthefistslideintheactivepresentationalreadycontainstwoshapesattachedbyaconnectornamed"Conn1To2."Thecodeaddsarectangleandaconnectortothefirstslide.Theendofthenewconnectorwillbeattachedtothesameconnectionsiteastheendoftheconnectornamed"Conn1To2,"andthebeginningofthenewconnectorwillbeattachedtoconnectionsiteoneonthenewrectangle.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
Setr3=.AddShape(msoShapeRectangle,100,420,200,100)
.AddConnector(msoConnectorCurve,0,0,10,10)_
.Name="Conn1To3"
With.Item("Conn1To2").ConnectorFormat
endConnSite1=.EndConnectionSite
SetendConnShape1=.EndConnectedShape
EndWith
With.Item("Conn1To3").ConnectorFormat
.BeginConnectr3,1
.EndConnectendConnShape1,endConnSite1
EndWith
EndWith
![Page 1411: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1411.jpg)
EndConnectionSitePropertyReturnsanintegerthatspecifiestheconnectionsitethattheendofaconnectorisconnectedto.Read-onlyLong.
NoteIftheendofthespecifiedconnectorisn'tattachedtoashape,thispropertygeneratesanerror.
![Page 1412: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1412.jpg)
Example
Thisexampleassumesthatthefirstslideintheactivepresentationalreadycontainstwoshapesattachedbyaconnectornamed"Conn1To2."Thecodeaddsarectangleandaconnectortothefirstslide.Theendofthenewconnectorwillbeattachedtothesameconnectionsiteastheendoftheconnectornamed"Conn1To2,"andthebeginningofthenewconnectorwillbeattachedtoconnectionsiteoneonthenewrectangle.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
Setr3=.AddShape(msoShapeRectangle,100,420,200,100)
.AddConnector(msoConnectorCurve,0,0,10,10)_
.Name="Conn1To3"
With.Item("Conn1To2").ConnectorFormat
endConnSite1=.EndConnectionSite
SetendConnShape1=.EndConnectedShape
EndWith
With.Item("Conn1To3").ConnectorFormat
.BeginConnectr3,1
.EndConnectendConnShape1,endConnSite1
EndWith
EndWith
![Page 1413: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1413.jpg)
EndingSlidePropertyReturnsorsetsthelastslidetobedisplayedinthespecifiedslideshow.Read/writeLong.
![Page 1414: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1414.jpg)
Example
Thisexamplerunsaslideshowoftheactivepresentation,startingwithslidetwoandendingwithslidefour.
WithActivePresentation.SlideShowSettings
.RangeType=ppShowSlideRange
.StartingSlide=2
.EndingSlide=4
.Run
EndWith
![Page 1415: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1415.jpg)
ShowAll
![Page 1416: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1416.jpg)
EntryEffectPropertyFortheAnimationSettingsobject,thispropertyreturnsorsetsthespecialeffectappliedtotheanimationforthespecifiedshape.FortheSlideShowTransitionobject,thispropertyreturnsorsetsthespecialeffectappliedtothespecifiedslidetransition.Read/writePpEntryEffect.
PpEntryEffectcanbeoneofthesePpEntryEffectconstants.ppEffectAppearppEffectBlindsHorizontalppEffectBlindsVerticalppEffectBoxInppEffectBoxOutppEffectCheckerboardAcrossppEffectCheckerboardDownppEffectCoverDownppEffectCoverLeftppEffectCoverLeftDownppEffectCoverLeftUpppEffectCoverRightppEffectCoverRightDownppEffectCoverRightUpppEffectCoverUpppEffectCrawlFromDownppEffectCrawlFromLeftppEffectCrawlFromRightppEffectCrawlFromUpppEffectCutppEffectCutThroughBlackppEffectDissolveppEffectFadeppEffectFlashOnceFast
![Page 1417: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1417.jpg)
ppEffectFlashOnceMediumppEffectFlashOnceSlowppEffectFlyFromBottomppEffectFlyFromBottomLeftppEffectFlyFromBottomRightppEffectFlyFromLeftppEffectFlyFromRightppEffectFlyFromTopppEffectFlyFromTopLeftppEffectFlyFromTopRightppEffectMixedppEffectNoneppEffectPeekFromDownppEffectPeekFromLeftppEffectPeekFromRightppEffectPeekFromUpppEffectRandomppEffectRandomBarsHorizontalppEffectRandomBarsVerticalppEffectSpiralppEffectSplitHorizontalInppEffectSplitHorizontalOutppEffectSplitVerticalInppEffectSplitVerticalOutppEffectStretchAcrossppEffectStretchDownppEffectStretchLeftppEffectStretchRightppEffectStretchUpppEffectStripsDownLeftppEffectStripsDownRightppEffectStripsLeftDownppEffectStripsLeftUp
![Page 1418: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1418.jpg)
ppEffectStripsRightDownppEffectStripsRightUpppEffectStripsUpLeftppEffectStripsUpRightppEffectSwivelppEffectUncoverDownppEffectUncoverLeftppEffectUncoverLeftDownppEffectUncoverLeftUpppEffectUncoverRightppEffectUncoverRightDownppEffectUncoverRightUpppEffectUncoverUpppEffectWipeDownppEffectWipeLeftppEffectWipeRightppEffectWipeUpppEffectZoomBottomppEffectZoomCenterppEffectZoomInppEffectZoomInSlightlyppEffectZoomOutppEffectZoomOutSlightly
expression.EntryEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1419: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1419.jpg)
Remarks
IftheTextLevelEffectpropertyforthespecifiedshapeissettoppAnimateLevelNone(thedefaultvalue)ortheAnimatepropertyissettoFalse,youwon'tseethespecialeffectyou'veappliedwiththeEntryEffectproperty.
![Page 1420: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1420.jpg)
Example
Thisexampleaddsatitleslidetotheactivepresentationandsetsthetitletoflyinfromtherightwheneverit'sanimatedduringaslideshow.
WithActivePresentation.Slides.Add(1,ppLayoutTitleOnly).Shapes(1)
.TextFrame.TextRange.Text="Sampletitle"
With.AnimationSettings
.TextLevelEffect=ppAnimateByAllLevels
.EntryEffect=ppEffectFlyFromRight
.Animate=True
EndWith
EndWith
![Page 1421: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1421.jpg)
ShowAll
![Page 1422: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1422.jpg)
EnvelopeVisiblePropertyDetermineswhetherthee-mailmessageheaderisvisibleinthedocumentwindow.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.msoTriStateMixedmsoTriStateTogglemsoTrueThee-mailmessageheaderisvisibleinthedocumentwindow.
expression.EnvelopeVisible
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1423: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1423.jpg)
Example
Thisexampledisplaysthee-mailmessageheader.
ActivePresentation.EnvelopeVisible=msoTrue
![Page 1424: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1424.jpg)
ShowAll
![Page 1425: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1425.jpg)
ExitPropertyReturnsorsetsanMsoTriStatethatrepresentswhethertheanimationeffectisanexiteffect.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseTheeffectisnotanexiteffect.msoTriStateMixedmsoTriStateTogglemsoTrueTheeffectisanexiteffect.
expression.Exit
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1426: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1426.jpg)
Example
Thisexampledisplayswhetherthespecifiedanimationisanexitanimationeffect.
SubEffectExit()
DimeffMainAsEffect
SeteffMain=ActivePresentation.Slides(1).TimeLine.MainSequence(1)
IfeffMain.Exit=msoTrueThen
MsgBox"Thisisanexitanimationeffect."
Else
MsgBox"Thisisnotanexitanimationeffect."
EndIf
EndSub
![Page 1427: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1427.jpg)
ShowAll
![Page 1428: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1428.jpg)
ExtraColorsPropertyReturnsanExtraColorsobjectthatrepresentstheextracolorsavailableinthespecifiedpresentation.Read-only.
![Page 1429: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1429.jpg)
Example
Thefollowingexampleaddsarectangletoslideoneintheactivepresentationandsetsitsfillforegroundcolortothefirstextracolor.Iftherehasn'tbeenatleastoneextracolordefinedforthepresentation,thisexamplewillfail.
WithActivePresentation
Setrect=.Slides(1).Shapes_
.AddShape(msoShapeRectangle,50,50,100,200)
rect.Fill.ForeColor.RGB=.ExtraColors(1)
EndWith
![Page 1430: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1430.jpg)
ExtrusionColorPropertyReturnsaColorFormatobjectthatrepresentsthecoloroftheshape'sextrusion.Read-only.
![Page 1431: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1431.jpg)
Example
ThisexampleaddsanovaltomyDocument,andthenspecifiesthattheovalbeextrudedtoadepthof50pointsandthattheextrusionbepurple.
SetmyDocument=ActivePresentation.Slides(1)
SetmyShape=myDocument.Shapes_
.AddShape(msoShapeOval,90,90,90,40)
WithmyShape.ThreeD
.Visible=True
.Depth=50
'RGBvalueforpurple
.ExtrusionColor.RGB=RGB(255,100,255)
EndWith
![Page 1432: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1432.jpg)
ShowAll
![Page 1433: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1433.jpg)
ExtrusionColorTypePropertyReturnsorsetsavaluethatindicateswhethertheextrusioncolorisbasedontheextrudedshape'sfill(thefrontfaceoftheextrusion)andautomaticallychangeswhentheshape'sfillchanges,orwhethertheextrusioncolorisindependentoftheshape'sfill.Read/writeMsoExtrusionColorType.
MsoExtrusionColorTypecanbeoneoftheseMsoExtrusionColorTypeconstants.msoExtrusionColorAutomaticExtrusioncolorisbasedonshapefill.msoExtrusionColorCustomExtrusioncolorisindependentofshapefill.msoExtrusionColorTypeMixed
expression.ExtrusionColorType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1434: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1434.jpg)
Example
IfshapeoneonmyDocumenthasanautomaticextrusioncolor,thisexamplegivestheextrusionacustomyellowcolor.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).ThreeD
If.ExtrusionColorType=msoExtrusionColorAutomaticThen
.ExtrusionColor.RGB=RGB(240,235,16)
EndIf
EndWith
![Page 1435: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1435.jpg)
ShowAll
![Page 1436: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1436.jpg)
FarEastLineBreakControlPropertyReturnsorsetsthelinebreakcontroloptionifyouhaveanAsianlanguagesettingspecifiedTrueifthelinebreakcontroloptionisselected.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrue
![Page 1437: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1437.jpg)
Example
Thisexampleselectsthelinebreakoptionforthetextinshapeoneonthefirstslideoftheactivepresentation.
ActivePresentation.Slides(1).Shapes(1).TextFrame_
.TextRange.ParagraphFormat.FarEastLineBreakControl=msoTrue
![Page 1438: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1438.jpg)
ShowAll
![Page 1439: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1439.jpg)
FarEastLineBreakLanguagePropertyReturnsorsetsthelanguageusedtodeterminewhichlinebreaklevelisusedwhenthelinebreakcontroloptionisturnedon.Read/writeMsoFarEastLineBreakLanguageID.
MsoFarEastLineBreakLanguageIDcanbeoneoftheseMsoFarEastLineBreakLanguageIDconstants.MsoFarEastLineBreakLanguageJapaneseMsoFarEastLineBreakLanguageKoreanMsoFarEastLineBreakLanguageSimplifiedChineseMsoFarEastLineBreakLanguageTraditionalChinese
expression.FarEastLineBreakLanguage
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1440: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1440.jpg)
Example
ThefollowingexamplesetsthelinebreaklanguagetoJapanese.
ActivePresentation.FarEastLineBreakLanguage=_
MsoFarEastLineBreakLanguageJapanese
![Page 1441: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1441.jpg)
ShowAll
![Page 1442: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1442.jpg)
FarEastLineBreakLevelPropertyReturnsorsetsthelinebreakbaseduponAsiancharacterlevel.Read/writeLong.Read/writePpFarEastLineBreakLevel.
PpFarEastLineBreakLevelcanbeoneofthesePpFarEastLineBreakLevelconstants.ppFarEastLineBreakLevelCustomppFarEastLineBreakLevelNormalppFarEastLineBreakLevelStrict
expression.FarEastLineBreakLevel
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1443: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1443.jpg)
Example
Thisexamplesetslinebreakcontroltouselevelonekinsokucharacters.
ActivePresentation.FarEastLineBreakLevel=_
ppFarEastLineBreakLevelNormal
![Page 1444: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1444.jpg)
ShowAll
![Page 1445: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1445.jpg)
FeatureInstallPropertyReturnsorsetshowMicrosoftPowerPointhandlescallstomethodsandpropertiesthatrequirefeaturesnotyetinstalled.Read/writeMsoFeatureInstall.
MsoFeatureInstallcanbeoneoftheseMsoFeatureInstallconstants.msoFeatureInstallNoneDefault.Atrappablerun-timeautomationerrorisgeneratedwhenuninstalledfeaturesarecalled.msoFeatureInstallOnDemandAdialogboxisdisplayedpromptingtheusertoinstallnewfeatures.msoFeatureInstallOnDemandWithUIAprogressmeterisdisplayedduringinstallation.Theuserisn'tpromptedtoinstallnewfeatures.
expression.FeatureInstall
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1446: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1446.jpg)
Remarks
YoucanusethemsoFeatureInstallOnDemandWithUIconstanttopreventusersfrombelievingthattheapplicationisn'trespondingwhileafeatureisbeinginstalled.UsethemsoFeatureInstallNoneconstantwitherrortrappingroutinestoexcludeend-userfeatureinstallation.
NoteIfyourefertoanuninstalledpresentationdesigntemplateinastring,arun-timeerrorisgenerated.ThetemplateisnotinstalledautomaticallyregardlessofyourFeatureInstallpropertysetting.TousetheApplyTemplatemethodforatemplatethatisnotcurrentlyinstalled,youfirstmustinstalltheadditionaldesigntemplates.Todoso,installtheAdditionalDesignTemplatesforPowerPointbyrunningtheMicrosoftOfficeinstallationprogram(availablethroughtheAdd/RemoveProgramsiconinWindowsControlPanel).
![Page 1447: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1447.jpg)
Example
ThisexamplechecksthevalueoftheFeatureInstallproperty.IfthepropertyissettomsoFeatureInstallNone,thecodedisplaysamessageboxthataskstheuserwhethertheywanttochangethepropertysetting.Iftheuserresponds"Yes",thepropertyissettomsoFeatureInstallOnDemand.
WithApplication
If.FeatureInstall=msoFeatureInstallNoneThen
Reply=MsgBox("Uninstalledfeaturesforthis"_
&"application"&vbCrLf_
&"maycausearun-timeerrorwhencalled."&vbCrLf_
&vbCrLf_
&"Wouldyouliketochangethissetting"&vbCrLf_
&"toautomaticallyinstallmissingfeatureswhencalled?"_
,52,"FeatureInstallSetting")
IfReply=6Then
.FeatureInstall=msoFeatureInstallOnDemand
EndIf
EndIf
EndWith
![Page 1448: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1448.jpg)
ShowAll
![Page 1449: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1449.jpg)
FileDialogPropertyReturnsaFileDialogobjectthatrepresentsasingleinstanceofafiledialogbox.
expression.FileDialog(Type)
expressionRequired.AnexpressionthatreturnsanApplicationobject.
TypeRequiredMsoFileDialogType.Thetypeofdialogtoreturn.
MsoFileDialogTypecanbeoneoftheseMsoFileDialogTypeconstants.msoFileDialogFilePickermsoFileDialogFolderPickermsoFileDialogOpenmsoFileDialogSaveAs
![Page 1450: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1450.jpg)
Example
ThisexampledisplaystheSaveAsdialogbox.
SubShowSaveAsDialog()
DimdlgSaveAsAsFileDialog
SetdlgSaveAs=Application.FileDialog(_
Type:=msoFileDialogSaveAs)
dlgSaveAs.Show
EndSub
ThisexampledisplaystheOpendialogboxandallowsausertoselectmultiplefilestoopen.
SubShowFileDialog()
DimdlgOpenAsFileDialog
SetdlgOpen=Application.FileDialog(_
Type:=msoFileDialogOpen)
WithdlgOpen
.AllowMultiSelect=True
.Show
EndWith
EndSub
![Page 1451: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1451.jpg)
FileFindPropertyReturnsanIFindobjectthatcanbeusedtolocatefiles.Read-only.
expression.FileFind
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1452: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1452.jpg)
Example
ThisexampledisplaysthenamesofallfilesintheMyDocumentsfolderthatbeginwith"New."
WithApplication.FileFind
.Name="New*.*"
.SearchPath="C:\MyDocuments"
.Execute
ForI=1To.Results.Count
MsgBox.Results(I)
Next
EndWith
![Page 1453: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1453.jpg)
FileNamePropertyReturnsorsetsthepathandfilenameoftheWebpresentationcreatedwhenallorpartoftheactivepresentationispublished.Read/writeString.
![Page 1454: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1454.jpg)
Remarks
TheFileNamepropertygeneratesanerrorifafolderinthespecifiedpathdoesnotexist.
![Page 1455: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1455.jpg)
Example
ThisexamplepublishesslidesthreethroughfiveoftheactivepresentationtoHTML.ItnamesthepublishedpresentationMallard.htmandsavesitintheTestfolder.
WithActivePresentation.PublishObjects(1)
.FileName="C:\Test\Mallard.htm"
.SourceType=ppPublishSlideRange
.RangeStart=3
.RangeEnd=5
.Publish
EndWith
![Page 1456: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1456.jpg)
FileSearchPropertyReturnsaFileSearchobjectthatcanbeusedtosearchforfilesusingeitheranabsoluteorrelativepath.Read-only.
![Page 1457: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1457.jpg)
Example
ThisexampledisplaysthenamesofallfilesintheMyDocumentsfolderthatbeginwith"New."
WithApplication.FileSearch
.FileName="New*.*"
.LookIn="C:\MyDocuments"
.Execute
ForI=1To.FoundFiles.Count
MsgBox.FoundFiles(I)
Next
EndWith
![Page 1458: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1458.jpg)
FillPropertyReturnsaFillFormatobjectthatcontainsfillformattingpropertiesforthespecifiedshape.Read-only.
![Page 1459: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1459.jpg)
Example
ThisexampleaddsarectangletomyDocumentandthensetstheforegroundcolor,backgroundcolor,andgradientfortherectangle'sfill.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes_
.AddShape(msoShapeRectangle,90,90,90,50).Fill
.ForeColor.RGB=RGB(128,0,0)
.BackColor.RGB=RGB(170,170,170)
.TwoColorGradientmsoGradientHorizontal,1
EndWith
![Page 1460: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1460.jpg)
FilterEffectPropertyReturnsaFilterEffectobjectthatrepresentsafiltereffectforananimationbehavior.Read-only.
expression.FilterEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1461: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1461.jpg)
Example
Thefollowingexampleaddsashapetothefirstslideoftheactivepresentationandsetsafiltereffectanimationbehavior.
SubChangeFilterEffect()
DimsldFirstAsSlide
DimshpHeartAsShape
DimeffNewAsEffect
DimbhvEffectAsAnimationBehavior
SetsldFirst=ActivePresentation.Slides(1)
SetshpHeart=sldFirst.Shapes.AddShape(Type:=msoShapeHeart,_
Left:=100,Top:=100,Width:=100,Height:=100)
SeteffNew=sldFirst.TimeLine.MainSequence.AddEffect_
(Shape:=shpHeart,EffectID:=msoAnimEffectChangeFillColor,_
Trigger:=msoAnimTriggerAfterPrevious)
SetbhvEffect=effNew.Behaviors.Add(msoAnimTypeFilter)
WithbhvEffect.FilterEffect
.Type=msoAnimFilterEffectTypeWipe
.Subtype=msoAnimFilterEffectSubtypeUp
.Reveal=msoTrue
EndWith
EndSub
![Page 1462: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1462.jpg)
FirstChildPropertyReturnsaDiagramNodeobjectrepresentingthefirstdiagramnodeinacollectionofdiagramnodes.
expression.FirstChild
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1463: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1463.jpg)
Example
Thefollowingexamplecreatesanewdiagramandidentifiesthefirstchilddiagramnode.
SubFirstChildNodeHello()
DimdgnNodeAsDiagramNode
DimdgnFirstAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
SetshpDiagram=ActivePresentation.Slides(1).Shapes.AddDiagram_
(Type:=msoDiagramOrgChart,Left:=10,Top:=15,_
Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
ForintNodes=1To3
dgnNode.Children.AddNode
NextintNodes
SetdgnFirst=dgnNode.Children.FirstChild
dgnFirst.Shape.TextFrame.TextRange.Text="HereIam!"
EndSub
![Page 1464: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1464.jpg)
FirstMarginPropertyReturnsorsetsthefirst-lineindentforthespecifiedoutlinelevel,inpoints.Read/writeSingle.
![Page 1465: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1465.jpg)
Remarks
Ifaparagraphbeginswithabullet,thebulletpositionisdeterminedbytheFirstMarginproperty,andthepositionofthefirsttextcharacterintheparagraphisdeterminedbytheLeftMarginproperty.
NoteTheRulerLevelscollectioncontainsfiveRulerLevelobjects,eachofwhichcorrespondstooneofthepossibleoutlinelevels.TheFirstMarginpropertyvaluefortheRulerLevelobjectthatcorrespondstothefirstoutlinelevelhasavalidrangeof(-9.0to4095.875).ThevalidrangefortheFirstMarginpropertyvaluesfortheRulerLevelobjectsthatcorrespondtothesecondthroughthefifthoutlinelevelsaredeterminedasfollows:
Themaximumvalueisalways4095.875.TheminimumvalueisthemaximumassignedvaluebetweentheFirstMarginpropertyandLeftMarginpropertyofthepreviouslevelplus9.
YoucanusethefollowingequationstodeterminetheminimumvaluefortheFirstMarginproperty.Index,theindexnumberoftheRulerLevelobject,indicatestheobject’scorrespondingoutlinelevel.TodeterminetheminimumFirstMarginpropertyvaluesfortheRulerLevelobjectsthatcorrespondtothesecondthroughthefifthoutlinelevels,substitute2,3,4,or5fortheindexplaceholder.
Minimum(RulerLevel(index).FirstMargin)=Maximum(RulerLevel(index-1).FirstMargin,RulerLevel(index-1).LeftMargin)+9
Minimum(RulerLevel(index).LeftMargin)=Maximum(RulerLevel(index-1).FirstMargin,RulerLevel(index-1).LeftMargin)+9
![Page 1466: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1466.jpg)
Example
Thisexamplesetsthefirst-lineindentandhangingindentforoutlineleveloneinbodytextontheslidemasterfortheactivepresentation.
WithApplication.ActivePresentation_
.SlideMaster.TextStyles(ppBodyStyle)
With.Ruler.Levels(1)
.FirstMargin=9
.LeftMargin=54
EndWith
EndWith
![Page 1467: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1467.jpg)
FirstSlideNumberPropertyReturnsorsetstheslidenumberforthefirstslideinthepresentation.Read/writeLong.
![Page 1468: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1468.jpg)
Remarks
Theslidenumberistheactualnumberthatwillappearinthelower-rightcorneroftheslidewhenyoudisplayslidenumbers.Thisnumberisdeterminedbythenumber(order)oftheslidewithinthepresentation(theSlideIndexpropertyvalue)andthestartingslidenumberforthepresentation(theFirstSlideNumberpropertyvalue).Theslidenumberwillalwaysbeequaltothestartingslidenumber+theslideindexnumber–1.TheSlideNumberpropertyreturnstheslidenumber.
![Page 1469: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1469.jpg)
Example
Thisexampleshowshowchangingthefirstslidenumberintheactivepresentationaffectstheslidenumberofaspecificslide.
WithApplication.ActivePresentation
.PageSetup.FirstSlideNumber=1'startsslidenumberingat1
MsgBox.Slides(2).SlideNumber'returns2
.PageSetup.FirstSlideNumber=10'startsslidenumberingat10
MsgBox.Slides(2).SlideNumber'returns11
EndWith
![Page 1470: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1470.jpg)
ShowAll
![Page 1471: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1471.jpg)
FitToPagePropertyDetermineswhethertheslideswillbescaledtofillthepagethey'reprintedon.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.TheslideswillhavethedimensionsspecifiedinthePageSetupdialogbox,whetherornotthosedimensionsmatchthepagethey'reprintedon.msoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedslideswillbescaledtofillthepagethey'reprintedon,regardlessofthevaluesintheHeightandWidthboxesinthePageSetupdialogbox(Filemenu)
![Page 1472: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1472.jpg)
Example
Thisexampleprintstheactivepresentationandscaleseachslidetofittheprintedpage.
WithActivePresentation
.PrintOptions.FitToPage=msoTrue
.PrintOut
EndWith
![Page 1473: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1473.jpg)
FolderSuffixPropertyReturnsthefoldersuffixthatMicrosoftPowerPointuseswhenyousaveorpublishacompleteorpartialpresentationasaWebpage,uselongfilenames,andchoosetosavesupportingfilesinaseparatefolder(thatis,iftheUseLongFileNamesandOrganizeInFolderpropertiesaresettoTrue).Read-onlyString.
![Page 1474: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1474.jpg)
Remarks
NewlycreatedpresentationsusethesuffixreturnedbytheFolderSuffixpropertyoftheDefaultWebOptionsobject.ThevalueoftheFolderSuffixpropertyoftheWebOptionsobjectmaydifferfromthatoftheDefaultWebOptionsobjectifthepresentationwaspreviouslyeditedinadifferentlanguageversionofMicrosoftPowerPoint.YoucanusetheUseDefaultFolderSuffixmethodtochangethesuffixtothatofthelanguageyouarecurrentlyusinginMicrosoftOffice.
Bydefault,thenameofthesupportingfolderisthenameoftheWebpageplusanunderscore(_),aperiod(.),orahyphen(-)andtheword"files"(appearinginthelanguageoftheversionofPowerPointinwhichthefilewassavedasaWebpage).Forexample,supposethatyouusetheDutchlanguageversionofPowerPointtosaveafilecalled"Page1"asaWebpage.ThedefaultnameofthesupportingfolderwouldbePage1_bestanden.
ThefollowingtablelistseachlanguageversionofOffice,andgivesitscorrespondingfoldersuffix.Forthelanguagesthatarenotlistedinthetable,thesuffix".files"isused.
Language
Language FoldersuffixArabic .filesBasque _fitxategiakBrazilian _arquivosBulgarian .filesCatalan _fitxersChinese-Simplified .filesChinese-Traditional .filesCroatian _datotekeCzech _souboryDanish -filerDutch _bestanden
![Page 1475: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1475.jpg)
English _filesEstonian _failidFinnish _tiedostotFrench _fichiersGerman -DateienGreek .filesHebrew .filesHungarian _elemeiItalian -fileJapanese .filesKorean .filesLatvian _failsLithuanian _bylosNorwegian -filerPolish _plikiPortuguese _ficheirosRomanian .filesRussian .filesSerbian(Cyrillic) .filesSerbian(Latin) _fajloviSlovakian .filesSlovenian _datotekeSpanish _archivosSwedish -filerThai .filesTurkish _dosyalarUkranian .filesVietnamese .files
![Page 1476: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1476.jpg)
Example
Thisexamplereturnsthefoldersuffixusedbypresentationone.ThesuffixisreturnedinthestringvariablestrFolderSuffix.
strFolderSuffix=Presentations(1).WebOptions.FolderSuffix
![Page 1477: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1477.jpg)
ShowAll
![Page 1478: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1478.jpg)
FollowColorsPropertyReturnsorsetstheextenttowhichthecolorsinthespecifiedobjectfollowtheslide'scolorscheme.ThespecifiedobjectmustbeachartcreatedineitherMicrosoftGraphorMicrosoftOrganizationChart.Read/writePpFollowColors.
PpFollowColorscanbeoneofthesePpFollowColorsconstants.ppFollowColorsNoneThechartcolorsdon'tfollowtheslide'scolorscheme.ppFollowColorsMixedppFollowColorsSchemeAllthecolorsinthechartfollowtheslide'scolorscheme.ppFollowColorsTextAndBackgroundOnlythetextandbackgroundfollowtheslide'scolorscheme.
expression.FollowColors
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1479: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1479.jpg)
Example
Thisexamplespecifiesthatthetextandbackgroundofshapetwoonslideoneintheactivepresentationfollowtheslide'scolorscheme.ShapetwomustbeachartcreatedineitherMicrosoftGraphorMicrosoftOrganizationChart.
ActivePresentation.Slides(1).Shapes(2).OLEFormat.FollowColors=_
ppFollowColorsTextAndBackground
![Page 1480: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1480.jpg)
ShowAll
![Page 1481: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1481.jpg)
FollowMasterBackgroundPropertyDetermineswhethertheslideorrangeofslidesfollowstheslidemasterbackground.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThespecifiedslideorrangeofslideshasacustombackground.msoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedslideorrangeofslidesfollowstheslidemasterbackground.
![Page 1482: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1482.jpg)
Remarks
Whenyoucreateanewslide,thedefaultvalueforthispropertyisTrue.Ifyoucopyaslidefromanotherpresentation,itretainsthesettingithadintheoriginalpresentation.Thatis,iftheslidefollowedtheslidemasterbackgroundintheoriginalpresentation,itwillautomaticallyfollowtheslidemasterbackgroundinthenewpresentation;or,iftheslidehadacustombackground,itwillretainthatcustombackground.
Notethatthelookoftheslide'sbackgroundisdeterminedbythecolorschemeandbackgroundobjectsaswellasbythebackgrounditself.IfsettingtheFollowMasterBackgroundpropertyalonedoesn'tgiveyoutheresultsyouwant,trysettingtheColorSchemeandDisplayMasterShapespropertiesaswell.
![Page 1483: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1483.jpg)
Example
Thisexamplecopiesslideonefrompresentationtwo,pastestheslideattheendofpresentationone,andmatchestheslide'sbackground,colorscheme,andbackgroundobjectstotherestofpresentationone.
Presentations(2).Slides(1).Copy
WithPresentations(1).Slides.Paste
.FollowMasterBackground=msoTrue
.ColorScheme=Presentations(1).SlideMaster.ColorScheme
.DisplayMasterShapes=True
EndWith
![Page 1484: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1484.jpg)
FontPropertyReturnsaFontobjectthatrepresentscharacterformatting.Read-only.
![Page 1485: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1485.jpg)
Example
Thisexamplesetstheformattingforthetextinshapeoneonslideoneintheactivepresentation.
WithActivePresentation.Slides(1).Shapes(1)
With.TextFrame.TextRange.Font
.Size=48
.Name="Palatino"
.Bold=True
.Color.RGB=RGB(255,127,255)
EndWith
EndWith
Thisexamplesetsthecolorandfontnameforbulletsinshapetwoonslideone.
WithActivePresentation.Slides(1).Shapes(2)
With.TextFrame.TextRange.ParagraphFormat.Bullet
.Visible=True
With.Font
.Name="Palatino"
.Color.RGB=RGB(0,0,255)
EndWith
EndWith
EndWith
![Page 1486: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1486.jpg)
ShowAll
![Page 1487: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1487.jpg)
FontBoldPropertyDetermineswhetherthefontinthespecifiedWordArtisbold.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThefontinthespecifiedWordArtisbold.
![Page 1488: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1488.jpg)
Example
ThisexamplesetsthefonttoboldforshapethreeonmyDocumentiftheshapeisWordArt.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3)
If.Type=msoTextEffectThen
.TextEffect.FontBold=msoTrue
EndIf
EndWith
![Page 1489: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1489.jpg)
ShowAll
![Page 1490: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1490.jpg)
FontItalicPropertyDetermineswhetherthefontinthespecifiedWordArtisitalic.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThefontinthespecifiedWordArtisitalic.
![Page 1491: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1491.jpg)
Example
Thisexamplesetsthefonttoitalicfortheshapenamed"WordArt4"onmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes("WordArt4").TextEffect.FontItalic=msoTrue
![Page 1492: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1492.jpg)
FontNamePropertyReturnsorsetsthenameofthefontinthespecifiedWordArt.Read/writeString.
![Page 1493: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1493.jpg)
Example
Thisexamplesetsthefontnameto"CourierNew"forshapethreeonmyDocumentiftheshapeisWordArt.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3)
If.Type=msoTextEffectThen
.TextEffect.FontName="CourierNew"
EndIf
EndWith
![Page 1494: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1494.jpg)
ShowAll
![Page 1495: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1495.jpg)
FontsPropertyFontspropertyasitappliestothePresentationobject.
ReturnsaFontscollectionthatrepresentsallfontsusedinthespecifiedpresentation.Read-only.
expression.Fonts
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
FontspropertyasitappliestotheDefaultWebOptionsobject.
ReturnsaWebPageFontscollectionrepresentingthesetofavailablefontsforsavingapresentationasaWebpage.Read-only.
expression.Fonts
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 1496: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1496.jpg)
Example
AsitappliestothePresentationobject.
ThisexamplereplacestheTimesNewRomanfontwiththeCourierfontintheactivepresentation.
Application.ActivePresentation.Fonts_
.Replace"TimesNewRoman","Courier"
AsitappliestotheDefaultWebOptionsobject.
Thisexamplesetsthefixed-widthfontdefaultWeboption,specifiedbythecharactersetconstantmsoCharacterSetEnglishWesternEuropeanOtherLatinScript,tobeCourierNew10points.
WithApplication.DefaultWebOptions_
.Fonts(msoCharacterSetEnglishWesternEuropeanOtherLatinScript)
.FixedWidthFont="CourierNew"
.FixedWidthFontSize=10
EndWith
![Page 1497: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1497.jpg)
FontSizePropertyReturnsorsetsthefontsizeforthespecifiedWordArt,inpoints.Read/writeSingle.
![Page 1498: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1498.jpg)
Example
Thisexamplesetsthefontsizeto16pointsfortheshapenamed"WordArt4"inmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes("WordArt4").TextEffect.FontSize=16
![Page 1499: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1499.jpg)
FooterPropertyReturnsaHeaderFooterobjectthatrepresentsthefooterthatappearsatthebottomofaslideorinthelower-leftcornerofanotespage,handout,oroutline.Read-only.
![Page 1500: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1500.jpg)
Example
Thisexamplesetsthetextforthefooterontheslidemasterintheactivepresentationandsetsthefooter,dateandtime,andslidenumbertoappearonthetitleslide.
WithApplication.ActivePresentation.SlideMaster.HeadersFooters
.Footer.Text="Introduction"
.DisplayOnTitleSlide=True
EndWith
![Page 1501: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1501.jpg)
ForeColorPropertyReturnsorsetsaColorFormatobjectthatrepresentstheforegroundcolorforthefill,line,orshadow.Read/write.
![Page 1502: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1502.jpg)
Example
ThisexampleaddsarectangletomyDocumentandthensetstheforegroundcolor,backgroundcolor,andgradientfortherectangle'sfill.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes_
.AddShape(msoShapeRectangle,90,90,90,50).Fill
.ForeColor.RGB=RGB(128,0,0)
.BackColor.RGB=RGB(170,170,170)
.TwoColorGradientmsoGradientHorizontal,1
EndWith
ThisexampleaddsapatternedlinetomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(10,100,250,0).Line
.Weight=6
.ForeColor.RGB=RGB(0,0,255)
.BackColor.RGB=RGB(128,0,0)
.Pattern=msoPatternDarkDownwardDiagonal
EndWith
![Page 1503: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1503.jpg)
ShowAll
![Page 1504: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1504.jpg)
FormatPropertyReturnsorsetstheformatfortheautomaticallyupdateddateandtime.AppliesonlytoHeaderFooterobjectsthatrepresentadateandtime(returnedfromtheHeadersFooterscollectionbytheDateAndTimeproperty).Read/writePpDateTimeFormat.
PpDateTimeFormatcanbeoneofthesePpDateTimeFormatconstants.ppDateTimeddddMMMMddyyyyppDateTimedMMMMyyyyppDateTimedMMMyyppDateTimeFormatMixedppDateTimeHmmppDateTimehmmAMPMppDateTimeHmmssppDateTimehmmssAMPMppDateTimeMdyyppDateTimeMMddyyHmmppDateTimeMMddyyhmmAMPMppDateTimeMMMMdyyyyppDateTimeMMMMyyppDateTimeMMyy
expression.Format
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1505: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1505.jpg)
Remarks
Makesurethatthedateandtimearesettobeupdatedautomatically(notdisplayedasfixedtext)bysettingtheUseFormatpropertytoTrue.
![Page 1506: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1506.jpg)
Example
Thisexamplesetsthedateandtimefortheslidemasteroftheactivepresentationtobeupdatedautomaticallyandthenitsetsthedateandtimeformattoshowhours,minutes,andseconds.
SetmyPres=Application.ActivePresentation
WithmyPres.SlideMaster.HeadersFooters.DateAndTime
.UseFormat=True
.Format=ppDateTimeHmmss
EndWith
![Page 1507: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1507.jpg)
FormulaPropertyReturnsorsetsaStringthatrepresentsaformulatouseforcalculatingananimation.Read/write.
expression.Formula
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1508: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1508.jpg)
Example
Thefollowingexampleaddsashape,andaddsathree-secondfillanimationtothatshape.
SubAddShapeSetAnimFill()
DimeffBlindsAsEffect
DimshpRectangleAsShape
DimanimBlindsAsAnimationBehavior
'Addsrectangleandsetsanimiationeffect
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffBlinds=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectBlinds)
'Setsthedurationoftheanimation
effBlinds.Timing.Duration=3
'Addsabehaviortotheanimation
SetanimBlinds=effBlinds.Behaviors.Add(msoAnimTypeProperty)
'Setstheanimationcoloreffectandtheformulatouse
WithanimBlinds.PropertyEffect
.Property=msoAnimColor
.Formula=RGB(Red:=255,Green:=255,Blue:=255)
EndWith
EndSub
![Page 1509: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1509.jpg)
ShowAll
![Page 1510: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1510.jpg)
FrameColorsPropertyReturnsorsetsthetextcolorfortheoutlinepaneandthebackgroundcolorfortheoutlineandslidepanesforWebpresentations.Read/writePpFrameColors.
PpFrameColorscanbeoneofthesePpFrameColorsconstants.ppFrameColorsBlackTextOnWhiteppFrameColorsBrowserColorsppFrameColorsPresentationSchemeAccentColorppFrameColorsPresentationSchemeTextColorppFrameColorsWhiteTextOnBlack
expression.FrameColors
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1511: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1511.jpg)
Example
ThisexamplespecifiesthatwhensavingorpublishingtheactivepresentationasaWebpage,thetextcolorfortheoutlinepaneiswhiteandthebackgroundcolorfortheoutlineandslidepanesisblack,andPortableNetworkGraphics(PNG)areallowedasanimageformat.
WithActivePresentation.WebOptions
.FrameColors=ppFrameColorsWhiteTextOnBlack
.AllowPNG=True
EndWith
![Page 1512: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1512.jpg)
ShowAll
![Page 1513: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1513.jpg)
FrameSlidesPropertyDetermineswhetherathinframeisplacedaroundtheborderoftheprintedslides.Read/writeMsoTriState.Appliestoprintedslides,handouts,andnotespages.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.msoTriStateMixedmsoTriStateTogglemsoTrueAthinframeisplacedaroundtheborderoftheprintedslides.
![Page 1514: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1514.jpg)
Example
Thisexampleprintstheactivepresentationwithaframearoundeachslide.
WithActivePresentation
.PrintOptions.FrameSlides=msoTrue
.PrintOut
EndWith
![Page 1515: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1515.jpg)
ShowAll
![Page 1516: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1516.jpg)
FromPropertyFrompropertyasitappliestotheColorEffectobject.
SetsorreturnsaColorFormatobjectthatrepresentsthestartingRGBcolorvalueofananimationbehavior.
expression.From
expressionRequired.AnexpressionthatreturnsaColorEffectobject.
![Page 1517: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1517.jpg)
Remarks
UsethispropertyinconjunctionwiththeTopropertytotransitionfromonecolortoanother.
FrompropertyasitappliestotheRotationEffectobject.
SetsorreturnsaSinglethatrepresentsthestartingangleindegrees,specifiedrelativetothescreen(forexample,90degreesiscompletelyhorizontal).Read/write.
expression.From
expressionRequired.AnexpressionthatreturnsaRotationEffectobject.
![Page 1518: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1518.jpg)
Remarks
UsethispropertyinconjunctionwiththeTopropertytotransitionfromonerotationangletoanother.
ThedefaultvalueisEmptyinwhichcasethecurrentpositionoftheobjectisused.
FrompropertyasitappliestothePropertyEffectobject.
SetsorreturnsaVariantthatrepresentsthestartingvalueofanobject’sproperty.Read/write.
expression.From
expressionRequired.AnexpressionthatreturnsaPropertyEffectobject.
![Page 1519: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1519.jpg)
Remarks
TheFrompropertyissimilartothePointsproperty,butusingtheFrompropertyiseasierforsimpletasks.
ThedefaultvalueisEmpty,inwhichcasethecurrentpositionoftheobjectisused.
![Page 1520: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1520.jpg)
Remarks
DonotconfusethispropertywiththeFromXorFromYpropertiesoftheScaleEffectandMotionEffectobjects,whichareonlyusedforscalingormotioneffects.
![Page 1521: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1521.jpg)
Example
AsitappliestotheColorEffectobject.
Thefollowingexampleaddsacoloreffectandimmediatelychangesitscolor.
SubAddAndChangeColorEffect()
DimeffBlindsAsEffect
DimtlnTimingAsTimeLine
DimshpRectangleAsShape
DimanimColorEffectAsAnimationBehavior
DimclrEffectAsColorEffect
'Addsrectangleandsetseffectandanimation
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffBlinds=t.MainSequence.AddEffect(Shape:=shpRectangle,_
effectId:=msoAnimEffectBlinds)
SetanimColorEffect=tlnTimming.MainSequence(1).Behaviors_
.Add(Type:=msoAnimTypeColor)
SetclrEffect=animColorEffect.ColorEffect
'Setstheanimationeffectstartingandendingcolors
clrEffect.From.RGB=RGB(Red:=255,Green:=255,Blue:=0)
clrEffect.To.RGB=RGB(Red:=0,Green:=255,Blue:=255)
EndSub
AsitappliestotheRotationEffectobject.
Thefollowingexampleaddsarotationeffectandimmediatelychangesitsrotationangle.
SubAddAndChangeRotationEffect()
DimeffBlindsAsEffect
DimtlnTimingAsTimeLine
DimshpRectangleAsShape
DimanimRotationAsAnimationBehavior
DimrtnEffectAsRotationEffect
'Addsrectangleandsetseffectandanimation
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
![Page 1522: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1522.jpg)
Top:=100,Width:=50,Height:=50)
SettlnTiming=ActivePresentation.Slides(1).TimeLine
SeteffBlinds=tlnTiming.MainSequence.AddEffect(Shape:=shpRectangle,_
effectId:=msoAnimEffectBlinds)
SetanimRotation=tlnTiming.MainSequence(1).Behaviors_
.Add(Type:=msoAnimTypeRotation)
SetrtnEffect=animRotation.RotationEffect
'Setstherotationeffectstartingandendingpositions
rtnEffect.From=90
rtnEffect.To=270
EndSub
![Page 1523: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1523.jpg)
FromXPropertySetsorreturnsaSinglethatrepresentsthestartingwidthorhorizontalpositionofaScaleEffectorMotionEffectobject,respectively,specifiedasapercentofthescreenwidth.Read/write.
expression.FromX
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1524: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1524.jpg)
Remarks
ThedefaultvalueofthispropertyisEmpty,inwhichcasethecurrentpositionoftheobjectisused.
UsethispropertyinconjunctionwiththeToXpropertytoresizeorjumpfromonepositiontoanother.
DonotconfusethispropertywiththeFrompropertyoftheColorEffect,RotationEffect,orPropertyEffectobjects,whichisusedtosetorchangecolors,rotations,orotherpropertiesofananimationbehavior,respectively.
![Page 1525: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1525.jpg)
Example
Thefollowingexampleaddsamotionpathandsetsthestartingandendinghorizontalandverticalpositions.
SubAddMotionPath()
DimeffCustomAsEffect
DimanimMotionAsAnimationBehavior
DimshpRectangleAsShape
'Addsshapeandsetseffectandanimationproperties
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffCustom=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectCustom)
SetanimMotion=effCustom.Behaviors.Add(msoAnimTypeMotion)
'Setsstartingandendinghorizontalandverticalpositions
WithanimMotion.MotionEffect
.FromX=0
.FromY=0
.ToX=50
.ToY=50
EndWith
EndSub
![Page 1526: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1526.jpg)
FromYPropertyReturnsorsetsaSinglethatrepresentsthestartingheightorverticalpositionofaScaleEffectorMotionEffectobject,respectively,specifiedasapercentageofthescreenwidth.Read/write.
expression.FromY
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1527: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1527.jpg)
Remarks
ThedefaultvalueofthispropertyisEmpty,inwhichcasethecurrentpositionoftheobjectisused.
UsethispropertyinconjunctionwiththeToYpropertytoresizeorjumpfromonepositiontoanother.
DonotconfusethispropertywiththeFrompropertyoftheColorEffect,RotationEffect,orPropertyEffectobjects,whichisusedtosetorchangecolors,rotations,orotherpropertiesofananimationbehavior,respectively.
![Page 1528: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1528.jpg)
Example
Thefollowingexampleaddsananimationpathandsetsthestartingandendinghorizontalandverticalpositions.
SubAddMotionPath()
DimeffCustomAsEffect
DimanimMotionAsAnimationBehavior
DimshpRectangleAsShape
'Addsshapeandsetseffectandanimationproperties
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffCustom=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectCustom)
SetanimMotion=effCustom.Behaviors.Add(msoAnimTypeMotion)
'Setsstartingandendinghorizontalandverticalpositions
WithanimMotion.MotionEffect
.FromX=0
.FromY=0
.ToX=50
.ToY=50
EndWith
EndSub
![Page 1529: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1529.jpg)
FullNamePropertyReturnsthenameofthespecifiedadd-inorsavedpresentation,includingthepath,thecurrentfilesystemseparator,andthefilenameextension.Read-onlyString.
![Page 1530: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1530.jpg)
Remarks
ThispropertyisequivalenttothePathproperty,followedbythecurrentfilesystemseparator,followedbytheNameproperty.
![Page 1531: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1531.jpg)
Example
Thisexampledisplaysthepathandfilenameofeveryavailableadd-in.
ForEachaInApplication.AddIns
MsgBoxa.FullName
Nexta
Thisexampledisplaysthepathandfilenameoftheactivepresentation(assumingthatthepresentationhasbeensaved).
MsgBoxApplication.ActivePresentation.FullName
![Page 1532: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1532.jpg)
GapPropertyReturnsorsetsthehorizontaldistance(inpoints)betweentheendofthecalloutlineandthetextboundingbox.Read/writeSingle.
![Page 1533: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1533.jpg)
Example
Thisexamplesetsthedistancebetweenthecalloutlineandthetextboundingboxto3pointsforshapeoneonmyDocument.Fortheexampletowork,shapeonemustbeacallout.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(1).Callout.Gap=3
![Page 1534: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1534.jpg)
ShowAll
![Page 1535: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1535.jpg)
GradientColorTypePropertyReturnsthegradientcolortypeforthespecifiedfill.Thispropertyisread-only.UsetheOneColorGradient,PresetGradient,orTwoColorGradientmethodtosetthegradienttypeforthefill.Read-onlyMsoGradientColorType.
MsoGradientColorTypecanbeoneoftheseMsoGradientColorTypeconstants.msoGradientColorMixedmsoGradientOneColormsoGradientPresetColorsmsoGradientTwoColors
expression.GradientColorType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1536: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1536.jpg)
Example
ThisexamplechangesthefillforallshapesinmyDocumentthathaveatwo-colorgradientfilltoapresetgradientfill.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Withs.Fill
If.GradientColorType=msoGradientTwoColorsThen
.PresetGradientmsoGradientHorizontal,_
1,msoGradientBrass
EndIf
EndWith
Next
![Page 1537: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1537.jpg)
GradientDegreePropertyReturnsavaluethatindicateshowdarkorlightaone-colorgradientfillis.Avalueof0(zero)meansthatblackismixedinwiththeshape'sforegroundcolortoformthegradient;avalueof1meansthatwhiteismixedin;andvaluesbetween0and1meanthatadarkerorlightershadeoftheforegroundcolorismixedin.Read-onlySingle.
Thispropertyisread-only.UsetheOneColorGradientmethodtosetthegradientdegreeforthefill.
![Page 1538: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1538.jpg)
Example
ThisexampleaddsarectangletomyDocumentandsetsthedegreeofitsfillgradienttomatchthatoftheshapenamed"Rectangle2."IfRectangle2doesn'thaveaone-colorgradientfill,thisexamplefails.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
gradDegree1=.Item("Rectangle2").Fill.GradientDegree
With.AddShape(msoShapeRectangle,0,0,40,80).Fill
.ForeColor.RGB=RGB(128,0,0)
.OneColorGradientmsoGradientHorizontal,1,gradDegree1
EndWith
EndWith
![Page 1539: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1539.jpg)
ShowAll
![Page 1540: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1540.jpg)
GradientStylePropertyReturnsthegradientstyleforthespecifiedfill.UsetheOneColorGradient,PresetGradient,orTwoColorGradientmethodtosetthegradientstyleforthefill.Attemptingtoreturnthispropertyforafillthatdoesn'thaveagradientgeneratesanerror.UsetheTypepropertytodeterminewhetherthefillhasagradient.Read-onlyMsoGradientStyle.
MsoGradientStylecanbeoneoftheseMsoGradientStyleconstants.msoGradientDiagonalDownmsoGradientDiagonalUpmsoGradientFromCentermsoGradientFromCornermsoGradientFromTitlemsoGradientHorizontalmsoGradientMixedmsoGradientVertical
expression.GradientStyle
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1541: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1541.jpg)
Example
ThisexampleaddsarectangletomyDocumentandsetsitsfillgradientstyletomatchthatoftheshapenamed"rect1."Fortheexampletowork,rect1musthaveagradientfill.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
gradStyle1=.Item("rect1").Fill.GradientStyle
With.AddShape(msoShapeRectangle,0,0,40,80).Fill
.ForeColor.RGB=RGB(128,0,0)
.OneColorGradientgradStyle1,1,1
EndWith
EndWith
![Page 1542: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1542.jpg)
GradientVariantPropertyReturnsthegradientvariantforthespecifiedfillasanintegervaluefrom1to4formostgradientfills.IfthegradientstyleismsoGradientFromTitleormsoGradientFromCenter,thispropertyreturnseither1or2.Thevaluesforthispropertycorrespondtothegradientvariants(numberedfromlefttorightandfromtoptobottom)ontheGradienttabintheFillEffectsdialogbox.Read-onlyLong.
Thispropertyisread-only.UsetheOneColorGradient,PresetGradient,orTwoColorGradientmethodtosetthegradientvariantforthefill.
![Page 1543: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1543.jpg)
Example
ThisexampleaddsarectangletomyDocumentandsetsitsfillgradientvarianttomatchthatoftheshapenamed"rect1."Fortheexampletowork,rect1musthaveagradientfill.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
gradVar1=.Item("rect1").Fill.GradientVariant
With.AddShape(msoShapeRectangle,0,0,40,80).Fill
.ForeColor.RGB=RGB(128,0,0)
.OneColorGradientmsoGradientHorizontal,gradVar1,1
EndWith
EndWith
![Page 1544: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1544.jpg)
GridDistancePropertySetsorreturnsaSinglethatrepresentsthedistancebetweengridlines.Read/write.
expression.GridDistance
expressionRequired.AnexpressionthatreturnsanPresentationobject.
![Page 1545: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1545.jpg)
Example
Thisexampledisplaysthegridlines,andthenspecifiesthedistancebetweengridlinesandenablesthesnaptogridsetting.
SubSetGridLines()
Application.DisplayGridLines=msoTrue
WithActivePresentation
.GridDistance=18
.SnapToGrid=msoTrue
EndWith
EndSub
![Page 1546: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1546.jpg)
GroupItemsPropertyReturnsaGroupShapesobjectthatrepresentstheindividualshapesinthespecifiedgroup.UsetheItemmethodoftheGroupShapesobjecttoreturnasingleshapefromthegroup.AppliestoShapeorShapeRangeobjectsthatrepresentgroupedshapes.Read-only.
![Page 1547: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1547.jpg)
Example
ThisexampleaddsthreetrianglestomyDocument,groupsthem,setsacolorfortheentiregroup,andthenchangesthecolorforthesecondtriangleonly.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
.AddShape(msoShapeIsoscelesTriangle,10,_
10,100,100).Name="shpOne"
.AddShape(msoShapeIsoscelesTriangle,150,_
10,100,100).Name="shpTwo"
.AddShape(msoShapeIsoscelesTriangle,300,_
10,100,100).Name="shpThree"
With.Range(Array("shpOne","shpTwo","shpThree")).Group
.Fill.PresetTexturedmsoTextureBlueTissuePaper
.GroupItems(2).Fill.PresetTexturedmsoTextureGreenMarble
EndWith
EndWith
![Page 1548: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1548.jpg)
HandoutMasterPropertyReturnsaMasterobjectthatrepresentsthehandoutmaster.Read-only.
![Page 1549: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1549.jpg)
Example
Thisexamplesetsthebackgroundpatternonthehandoutmasterintheactivepresentation.
Application.ActivePresentation.HandoutMaster.Background.Fill_
.PatternedmsoPatternDarkHorizontal
![Page 1550: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1550.jpg)
ShowAll
![Page 1551: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1551.jpg)
HandoutOrderPropertyReturnsorsetsthepagelayoutorderinwhichslidesappearonprintedhandoutsthatshowmultipleslidesononepage.Read/writePpPrintHandoutOrder.
PpPrintHandoutOrdercanbeoneofthesePpPrintHandoutOrderconstants.ppPrintHandoutHorizontalFirstSlidesareorderedhorizontally,withthefirstslideintheupper-leftcornerandthesecondslidetotherightofit.Ifyourlanguagesettingspecifiesaright-to-leftlanguage,thefirstslideisintheupper-rightcornerwiththesecondslidetotheleftofit.ppPrintHandoutVerticalFirstSlidesareorderedvertically,withthefirstslideintheupper-leftcornerandthesecondslidebelowit.Ifyourlanguagesettingspecifiesaright-to-leftlanguage,thefirstslideisintheupper-rightcornerwiththesecondslidebelowit.
expression.HandoutOrder
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1552: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1552.jpg)
Example
Thisexamplesetshandoutsoftheactivepresentationtocontainsixslidesperpage,orderstheslideshorizontallyonthehandouts,andprintsthem.
WithActivePresentation
.PrintOptions.OutputType=ppPrintOutputSixSlideHandouts
.PrintOptions.HandoutOrder=ppPrintHandoutHorizontalFirst
.PrintOut
EndWith
![Page 1553: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1553.jpg)
ShowAll
![Page 1554: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1554.jpg)
HangingPunctuationPropertyReturnsorsetsthehangingpunctuationoptionifyouhaveanAsianlanguagesettingspecified.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThehangingpunctuationoptionisselected.
![Page 1555: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1555.jpg)
Example
Thisexampleselectshangingpunctuationforthefirstparagraphoftheactivepresentation.
ActivePresentation.Paragraphs(1).HangingPunctuation=msoTrue
![Page 1556: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1556.jpg)
HasChildShapeRangePropertyTrueiftheselectioncontainschildshapes.Read-onlyBoolean.
expression.HasChildShapeRange
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1557: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1557.jpg)
Example
Thisexamplecreatesanewslidewithadrawingcanvas,populatesthedrawingcanvaswithshapes,andselectstheshapesaddedtothecanvas.Thenaftercheckingthattheshapesselectedarechildshapes,itfillsthechildshapeswithapattern.
SubChildShapes()
DimsldNewAsSlide
DimshpCanvasAsShape
'Createanewslidewithadrawingcanvasandshapes
SetsldNew=Presentations(1).Slides_
.Add(Index:=1,Layout:=ppLayoutBlank)
SetshpCanvas=sldNew.Shapes.AddCanvas(_
Left:=100,Top:=100,Width:=200,Height:=200)
WithshpCanvas.CanvasItems
.AddShapemsoShapeRectangle,Left:=0,Top:=0,_
Width:=100,Height:=100
.AddShapemsoShapeOval,Left:=0,Top:=50,_
Width:=100,Height:=100
.AddShapemsoShapeDiamond,Left:=0,Top:=100,_
Width:=100,Height:=100
EndWith
'Selectallshapesinthecanvas
shpCanvas.CanvasItems.SelectAll
'Fillcanvaschildshapeswithapattern
WithActiveWindow.Selection
If.HasChildShapeRange=TrueThen
.ChildShapeRange.Fill.PatternedPattern:=msoPatternDivot
Else
MsgBox"Thisisnotarangeofchildshapes."
EndIf
EndWith
EndSub
![Page 1558: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1558.jpg)
![Page 1559: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1559.jpg)
ShowAll
![Page 1560: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1560.jpg)
HasDiagramPropertyMsoTrueifashapeisadiagram.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseShapeisnotadiagram.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueShapeisadiagram.
expression.HasDiagram
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1561: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1561.jpg)
Example
Thisexamplesearchesthecurrentdocumentfordiagramswithnodesandifitfindsboth,createsablackballoonwithboldwhitetext.
SubHasDiagramProperties()
DimshpDiagramAsShape
DimshpNodeAsDiagramNode
DimshpBalloonAsShape
DimsldFirstAsSlide
SetsldFirst=ActivePresentation.Slides(1)
'Looksthroughthecurrentdocumentandwhenitfindsadiagram
'withoneormorediagramnodes,createsaballoonwithtext
ForEachshpDiagramInsldFirst.Shapes
IfshpDiagram.HasDiagram=msoTrueAnd_
shpDiagram.HasDiagramNode=msoTrueThen
SetshpBalloon=sldFirst.Shapes.AddShape(_
Type:=msoShapeBalloon,Left:=350,_
Top:=75,Width:=150,Height:=150)
WithshpBalloon
With.TextFrame
.WordWrap=msoTrue
With.TextRange
.Text="Thisisadiagramwithnodes."
.Font.Color.RGB=RGB(Red:=255,_
Green:=255,Blue:=255)
.Font.Bold=True
.Font.Name="Tahoma"
.Font.Size=15
EndWith
EndWith
.Line.BackColor.RGB=RGB(_
Red:=0,Green:=25,Blue:=25)
.Fill.ForeColor.RGB=RGB(_
Red:=0,Green:=25,Blue:=25)
EndWith
EndIf
NextshpDiagram
EndSub
![Page 1562: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1562.jpg)
![Page 1563: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1563.jpg)
ShowAll
![Page 1564: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1564.jpg)
HasDiagramNodePropertyMsoTrueifashapeisadiagramnode.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseShapeisnotadiagramnode.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueShapeisadiagramnode.
expression.HasDiagramNode
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1565: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1565.jpg)
Example
Thisexamplesearchesthecurrentdocumentfordiagramswithnodes,andifitfindsboth,createsablackballoonwithboldwhitetext.
SubHasDiagramProperties()
DimshpDiagramAsShape
DimshpNodeAsDiagramNode
DimshpBalloonAsShape
DimsldFirstAsSlide
SetsldFirst=ActivePresentation.Slides(1)
'Looksthroughthecurrentdocumentandwhenitfindsadiagram
'withoneormorediagramnodes,createsaballoonwithtext
ForEachshpDiagramInsldFirst.Shapes
IfshpDiagram.HasDiagram=msoTrueAnd_
shpDiagram.HasDiagramNode=msoTrueThen
SetshpBalloon=sldFirst.Shapes.AddShape(_
Type:=msoShapeBalloon,Left:=350,_
Top:=75,Width:=150,Height:=150)
WithshpBalloon
With.TextFrame
.WordWrap=msoTrue
With.TextRange
.Text="Thisisadiagramwithnodes."
.Font.Color.RGB=RGB(Red:=255,_
Green:=255,Blue:=255)
.Font.Bold=True
.Font.Name="Tahoma"
.Font.Size=15
EndWith
EndWith
.Line.BackColor.RGB=RGB(_
Red:=0,Green:=25,Blue:=25)
.Fill.ForeColor.RGB=RGB(_
Red:=0,Green:=25,Blue:=25)
EndWith
EndIf
NextshpDiagram
EndSub
![Page 1566: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1566.jpg)
![Page 1567: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1567.jpg)
ShowAll
![Page 1568: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1568.jpg)
HasRevisionInfoPropertyReturnsaPpRevisionInfoconstantthatrepresentswhetherapresentationisamergedauthordocument,areviewerdocumentwithbaselines,oraregularMicrosoftPowerPointdocument.Read-only.
PpRevisionInfocanbeoneofthesePpRevisionInfoconstants.ppRevisionInfoBaselineThepresentationhasabaseline.ppRevisionInfoMergedThepresentationisamergedauthorpresentation.ppRevisionInfoNoneThepresentationhasnoreviewerinformation.
expression.HasRevisionInfo
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1569: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1569.jpg)
Remarks
Commentsarenotconsideredreviewerinformation.
![Page 1570: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1570.jpg)
Example
Thefollowingexampleaddsandremovesbaselines,reportingstatustotheuseralongtheway.
SubAddABaseline()
ActivePresentation.AddBaseline
CallReportRevisionInfo(ActivePresentation)
ActivePresentation.RemoveBaseline
CallReportRevisionInfo(ActivePresentation)
EndSub
SubReportRevisionInfo(preAsPresentation)
SelectCasepre.HasRevisionInfo
CaseppRevisionInfoBaseline
MsgBox"Thepresentationhasabaseline."
CaseppRevisionInfoMerged
MsgBox"Thepresentationisamergedauthorpresentation."
CaseppRevisionInfoNone
MsgBox"Thepresentationhasnoreviewerinformation."
CaseElse
MsgBox"Couldn'tdeterminerevisioninformation."
EndSelect
EndSub
![Page 1571: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1571.jpg)
ShowAll
![Page 1572: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1572.jpg)
HasTablePropertyReturnswhetherthespecifiedshapeisatable.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedshapeisatable.
![Page 1573: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1573.jpg)
Example
Thisexamplechecksthecurrentlyselectedshapetoseeifitisatable.Ifitis,thecodesetsthewidthofcolumnonetooneinch(72points).
WithActiveWindow.Selection.ShapeRange
If.HasTable=msoTrueThen
.Table.Columns(1).Width=72
EndIf
EndWith
![Page 1574: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1574.jpg)
ShowAll
![Page 1575: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1575.jpg)
HasTextPropertyReturnswhetherthespecifiedshapehastextassociatedwithit.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedshapehastextassociatedwithit.
![Page 1576: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1576.jpg)
Example
IfshapetwoonmyDocumentcontainstext,thisexampleresizestheshapetofitthetext.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(2).TextFrame
If.HasTextThen.AutoSize=ppAutoSizeShapeToFitText
EndWith
![Page 1577: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1577.jpg)
ShowAll
![Page 1578: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1578.jpg)
HasTextFramePropertyReturnswhetherthespecifiedshapehasatextframe.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedshapehasatextframeandcanthereforecontaintext.
![Page 1579: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1579.jpg)
Example
Thisexampleextractstextfromallshapesonthefirstslidethatcontaintextframes,andthenitstoresthenamesoftheseshapesandthetexttheycontaininanarray.
DimshpTextArray()AsVariant
DimnumShapes,numAutoShapes,iAsLong
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
numShapes=.Count
IfnumShapes>1Then
numTextShapes=0
ReDimshpTextArray(1To2,1TonumShapes)
Fori=1TonumShapes
If.Item(i).HasTextFrameThen
numTextShapes=numTextShapes+1
shpTextArray(numTextShapes,1)=.Item(i).Name
shpTextArray(numTextShapes,2)=.Item(i)_
.TextFrame.TextRange.Text
EndIf
Next
ReDimPreserveshpTextArray(1To2,1TonumTextShapes)
EndIf
EndWith
![Page 1580: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1580.jpg)
ShowAll
![Page 1581: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1581.jpg)
HasTitlePropertyReturnswhetherthecollectionofobjectsonthespecifiedslidecontainsatitleplaceholder.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThecollectionofobjectsonthespecifiedslidecontainsatitleplaceholder.
![Page 1582: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1582.jpg)
Example
Thisexamplerestoresthetitleplaceholdertoslideoneintheactivepresentationifthisplaceholderhasbeendeleted.Thetextoftherestoredtitleis"Restoredtitle."
WithActivePresentation.Slides(1)
If.Layout<>ppLayoutBlankThen
With.Shapes
IfNot.HasTitleThen
.AddTitle.TextFrame.TextRange_
.Text="Restoredtitle"
EndIf
EndWith
EndIf
EndWith
![Page 1583: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1583.jpg)
ShowAll
![Page 1584: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1584.jpg)
HasTitleMasterPropertyMsoTrueifthespecifiedpresentationhasatitlemaster.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedpresentationhasatitlemaster.
expression.HasTitleMaster
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1585: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1585.jpg)
Example
Thisexampleaddsatitlemastertotheactivepresentationifitdoesn'talreadyhaveone.
WithApplication.ActivePresentation
IfNot.HasTitleMasterThen.AddTitleMaster
EndWith
![Page 1586: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1586.jpg)
HeaderPropertyReturnsaHeaderFooterobjectthatrepresentstheheaderthatappearsatthetopofaslideorintheupper-leftcornerofanotespage,handout,oroutline.Read-only.
![Page 1587: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1587.jpg)
Example
Thisexamplesetstheheadertextforthehandoutmasterfortheactivepresentation.Thistextwillappearintheupper-leftcornerofthepagewhenyouprintyourpresentationasanoutlineorahandout.
SetmyHandHF=Application.ActivePresentation.HandoutMaster_
.HeadersFooters
myHandHF.Header.Text="ThirdQuarterReport"
![Page 1588: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1588.jpg)
HeadersFootersPropertyReturnsaHeadersFooterscollectionthatrepresentstheheader,footer,dateandtime,andslidenumberassociatedwiththeslide,slidemaster,orrangeofslides.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1589: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1589.jpg)
Example
Thisexamplesetsthefootertextandthedateandtimeformatforthenotesmasterintheactivepresentationandsetsthedateandtimetobeupdatedautomatically.
WithActivePresentation.NotesMaster.HeadersFooters
.Footer.Text="RegionalSales"
With.DateAndTime
.UseFormat=True
.Format=ppDateTimeHmmss
EndWith
EndWith
![Page 1590: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1590.jpg)
HeightPropertyReturnsorsetstheheightofthespecifiedobject,inpoints.Read-onlySinglefortheMasterobject,read/writeSingleforallotherobjects.
![Page 1591: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1591.jpg)
Remarks
TheHeightpropertyofaShapeobjectreturnsorsetstheheightoftheforward-facingsurfaceofthespecifiedshape.Thismeasurementdoesn'tincludeshadowsor3-Deffects.
![Page 1592: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1592.jpg)
Example
Thisexamplesetstheheightofdocumentwindowtwotohalftheheightoftheapplicationwindow.
Windows(2).Height=Application.Height/2
Thisexamplesetstheheightforrowtwointhespecifiedtableto100points(72pointsperinch).
ActivePresentation.Slides(2).Shapes(5).Table.Rows(2).Height=100
![Page 1593: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1593.jpg)
ShowAll
![Page 1594: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1594.jpg)
HiddenPropertyDetermineswhetherthespecifiedslideishiddenduringaslideshow.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedslideishiddenduringaslideshow.
![Page 1595: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1595.jpg)
Example
Thisexamplemakesslidetwointheactivepresentationahiddenslide.
ActivePresentation.Slides(2).SlideShowTransition.Hidden=msoTrue
![Page 1596: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1596.jpg)
ShowAll
![Page 1597: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1597.jpg)
HideWhileNotPlayingPropertyDetermineswhetherthespecifiedmediaclipishiddenduringaslideshowexceptwhenit'splaying.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedmediaclipishiddenduringaslideshowexceptwhenit'splaying.
![Page 1598: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1598.jpg)
Example
Thisexampleinsertsamovienamed"Clock.avi"ontoslideoneintheactivepresentation,setsittoplayautomaticallyaftertheslidetransition,andspecifiesthatthemovieobjectbehiddenduringaslideshowexceptwhenit'splaying.
WithActivePresentation.Slides(1).Shapes_
.AddOLEObject(Left:=10,Top:=10,_
Width:=250,Height:=250,_
FileName:="c:\winnt\clock.avi")
With.AnimationSettings.PlaySettings
.PlayOnEntry=True
.HideWhileNotPlaying=msoTrue
EndWith
EndWith
![Page 1599: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1599.jpg)
ShowAll
![Page 1600: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1600.jpg)
HorizontalAnchorPropertyReturnsorsetsthehorizontalalignmentoftextinatextframe.Read/writeMsoHorizontalAnchor.
MsoHorizontalAnchorcanbeoneoftheseMsoHorizontalAnchorconstants.msoAnchorNonemsoHorizontalAnchorMixedmsoAnchorCenter
expression.HorizontalAnchor
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1601: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1601.jpg)
Example
ThisexamplesetsthealignmentofthetextinshapeoneonmyDocumenttotopcentered.
SetmyDocument=ActivePresentation.SlideMaster
WithmyDocument.Shapes(1)
.TextFrame.HorizontalAnchor=msoAnchorCenter
.TextFrame.VerticalAnchor=msoAnchorTop
EndWith
![Page 1602: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1602.jpg)
ShowAll
![Page 1603: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1603.jpg)
HorizontalFlipPropertyReturnswhetherthespecifiedshapeisflippedaroundthehorizontalaxis.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedshapeisflippedaroundthehorizontalaxis.
![Page 1604: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1604.jpg)
Example
ThisexamplerestoreseachshapeonmyDocumenttoitsoriginalstate,ifit'sbeenflippedhorizontallyorvertically.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Ifs.HorizontalFlipThens.FlipmsoFlipHorizontal
Ifs.VerticalFlipThens.FlipmsoFlipVertical
Next
![Page 1605: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1605.jpg)
HTMLProjectPropertyReturnstheHTMLProjectobject,whichisaWebpresentation(HTMLformat)accessedthroughtheMicrosoftScriptEditor.Read-only.
![Page 1606: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1606.jpg)
Remarks
TheHTMLProjectobjectcanbeinterpretedasthetop-levelprojectbranchintheProjectExplorerwindowoftheScriptEditor,foraloadedpresentation.ItcontainstheHTMLProjectItemscollection.MembersoftheHTMLProjectItemscollectionrepresentaslide,master,orthehandoutfortheWebpresentation.
![Page 1607: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1607.jpg)
Example
ThisexamplechecksthenameofeachmemberintheHTMLProjectItemscollectionfortheloadedHTMLProject.IfthenameisSlide2,itthenopensthegeneratedHTMLforthatslideintheMicrosoftScriptEditor.
DimiAsInteger
WithActivePresentation.HTMLProject
Fori=1To.HTMLProjectItems.Count
If.HTMLProjectItems(i).Name="Slide2"Then
.HTMLProjectItems(i).Open
EndIf
Next
EndWith
![Page 1608: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1608.jpg)
ShowAll
![Page 1609: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1609.jpg)
HTMLVersionPropertyReturnsorsetstheversionofHTMLforapublishedpresentation.Read/writePpHTMLVersion.
PpHTMLVersioncanbeoneofthesePpHTMLVersionconstants.ppHTMLAutodetectppHTMLDualppHTMLv3ppHTMLv4Default.
expression.HTMLVersion
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1610: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1610.jpg)
Example
ThisexamplepublishesslidesthreethroughfiveoftheactivepresentationinHTMLversion3.0.ItnamesthepublishedpresentationMallard.htm.
WithActivePresentation.PublishObjects(1)
.FileName="C:\Test\Mallard.htm"
.SourceType=ppPublishSlideRange
.RangeStart=3
.RangeEnd=5
.HTMLVersion=ppHTMLv3
.Publish
EndWith
![Page 1611: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1611.jpg)
HyperlinkPropertyReturnsaHyperlinkobjectthatrepresentsthehyperlinkforthespecifiedshape.Forthehyperlinktobeactiveduringaslideshow,theActionpropertymustbesettoppActionHyperlink.Read-only.
![Page 1612: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1612.jpg)
Example
ThisexamplesetsshapeoneonslideoneintheactivepresentationtojumptotheMicrosoftWebsitewhentheshapeisclickedduringaslideshow.
WithActivePresentation.Slides(1).Shapes(1)_
.ActionSettings(ppMouseClick)
.Action=ppActionHyperlink
.Hyperlink.Address="http://www.microsoft.com/"
EndWith
![Page 1613: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1613.jpg)
HyperlinksPropertyReturnsaHyperlinkscollectionthatrepresentsallthehyperlinksonthespecifiedslide.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1614: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1614.jpg)
Example
Thisexampleallowstheusertoupdateanoutdatedinternetaddressforallhyperlinksintheactivepresentation.
oldAddr=InputBox("Oldinternetaddress")
newAddr=InputBox("Newinternetaddress")
ForEachsInActivePresentation.Slides
ForEachhIns.Hyperlinks
IfLCase(h.Address)=oldAddrThenh.Address=newAddr
Next
Next
![Page 1615: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1615.jpg)
IdPropertyReturnsaLongthatidentifiestheshapeorrangeofshapes.Read-only.
expression.Id
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1616: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1616.jpg)
Example
Thisexampleaddsanewshapetotheactivepresentation,thenfillstheshapeaccordingtothevalueoftheIDproperty.
SubShapeID()
WithActivePresentation.Slides(1).Shapes.AddShape_
(Type:=msoShape5pointStar,Left:=100,_
Top:=100,Width:=100,Height:=100)
SelectCase.Id
Case0To500
.Fill.ForeColor.RGB=RGB(Red:=255,Green:=0,Blue:=0)
Case500To1000
.Fill.ForeColor.RGB=RGB(Red:=255,Green:=255,Blue:=0)
Case1000To1500
.Fill.ForeColor.RGB=RGB(Red:=255,Green:=0,Blue:=255)
Case1500To2000
.Fill.ForeColor.RGB=RGB(Red:=0,Green:=255,Blue:=0)
Case2000To2500
.Fill.ForeColor.RGB=RGB(Red:=0,Green:=255,Blue:=255)
CaseElse
.Fill.ForeColor.RGB=RGB(Red:=0,Green:=0,Blue:=255)
EndSelect
EndWith
EndSub
![Page 1617: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1617.jpg)
ShowAll
![Page 1618: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1618.jpg)
IncludeNavigationPropertyDetermineswhetherthelinkbarforWebpresentationsisvisible.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThenavigationbarforWebpresentationsisnotvisible,whichenlargestheslide.msoTriStateMixedmsoTriStateTogglemsoTrueDefault.ThenavigationbarforWebpresentationsisvisibleatthebottomofthepage.
![Page 1619: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1619.jpg)
Example
ThisexamplespecifiesthatthelinkbarisnottobeincludedinthespecifiedWebpresentation.ItthenpreviewsthepresentationintheactiveWebbrowser.
WithPresentations(2)
.WebOptions.IncludeNavigation=msoFalse
.WebPagePreview
EndWith
![Page 1620: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1620.jpg)
IndentLevelPropertyReturnsorsetsthetheindentlevelforthespecifiedtextasanintegerfrom1to5,where1indicatesafirst-levelparagraphwithnoindentation.Read/writeLong.
![Page 1621: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1621.jpg)
Example
Thisexampleindentsthesecondparagraphinshapetwoonslidetwointheactivepresentation.
Application.ActivePresentation.Slides(2).Shapes(2).TextFrame_
.TextRange.Paragraphs(2).IndentLevel=2
![Page 1622: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1622.jpg)
IndexPropertyReturnsaLongthatrepresentstheindexnumberforananimationeffectordesign.Read-only.
expression.Index
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1623: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1623.jpg)
Example
Thefollowingexampledisplaysthenameandindexnumberforalleffectsinthemainanimationsequenceofthefirstslide.
SubEffectInfo()
DimeffIndexAsEffect
DimseqMainAsSequence
SetseqMain=ActivePresentation.Slides(1).TimeLine.MainSequence
ForEacheffIndexInseqMain
WitheffIndex
MsgBox"EffectName:"&.DisplayName&vbLf&_
"EffectIndex:"&.Index
EndWith
Next
EndSub
![Page 1624: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1624.jpg)
ShowAll
![Page 1625: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1625.jpg)
InsetPenPropertyMsoTruetodrawlinesontheinsideofaspecifiedshape.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseDefault.Aninsetpenisnotenabled.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueAninsetpenisenabled.
expression.InsetPen
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1626: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1626.jpg)
Remarks
AnerroroccursifthispropertyattemptstosetinsetpendrawingonanyMicrosoftOfficeAutoShapewhichdoesnotsupportinsetpendrawing.
![Page 1627: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1627.jpg)
Example
Thefollowinglineofcodeenablesaninsetpenforashape.Thisexampleassumesthatthefirstslideoftheactivepresentationcontainsashapeandtheshapesupportsinsetpendrawing.
SubDrawLinesInsideShape
ActivePresentation.Slides(1).Shapes(1).Line.InsetPen=msoTrue
EndSub
![Page 1628: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1628.jpg)
InteractiveSequencesPropertyReturnsaSequencesobjectthatrepresentsanimationsthataretriggeredbyclickingonaspecifiedshape.
expression.InteractiveSequences
expressionRequired.AnexpressionthatreturnsaTimeLineobject.
![Page 1629: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1629.jpg)
Remarks
ThedefaultvalueoftheInteractiveSequencespropertyisanemptySequencescollection.
![Page 1630: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1630.jpg)
Example
Thefollowingexampleaddsaninteractivesequencetothefirstslideandsetsthetexteffectpropertiesforthenewanimationsequence.
SubNewInteractiveSeqence()
DimseqInteractiveAsSequence
DimshpTextAsShape
DimeffTextAsEffect
SetseqInteractive=ActivePresentation.Slides(1).TimeLine_
.InteractiveSequences.Add(1)
SetshpText=ActivePresentation.Slides(1).Shapes(1)
SeteffText=ActivePresentation.Slides(1).TimeLine_
.MainSequence.AddEffect(Shape:=shpText,_
EffectId:=msoAnimEffectChangeFont,_
Trigger:=msoAnimTriggerOnPageClick)
effText.EffectParameters.FontName="Broadway"
seqInteractive.ConvertToTextUnitEffectEffect:=effText,_
UnitEffect:=msoAnimTextUnitEffectByWord
EndSub
![Page 1631: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1631.jpg)
ShowAll
![Page 1632: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1632.jpg)
IsFullScreenPropertyReturnswhetherthespecifiedslideshowwindowoccupiesthefullscreen.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedslideshowwindowoccupiesthefullscreen.
![Page 1633: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1633.jpg)
Example
Thisexamplereducestheheightofafull-screenslideshowwindowjustenoughsothatyoucanseethetaskbar.
WithApplication.SlideShowWindows(1)
If.IsFullScreenThen
.Height=.Height-20
EndIf
EndWith
![Page 1634: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1634.jpg)
ShowAll
![Page 1635: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1635.jpg)
IsNamedShowPropertyDetermineswhetheracustom(named)slideshowisdisplayedinthespecifiedslideshowview.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueAcustom(named)slideshowisdisplayedinthespecifiedslideshowview.
![Page 1636: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1636.jpg)
Example
Iftheslideshowrunninginslideshowwindowoneisacustomslideshow,thisexampledisplaysitsname.
WithSlideShowWindows(1).View
If.IsNamedShowThen
MsgBox"Nowshowinginslideshowwindow1:"_
&.SlideShowName
EndIf
EndWith
![Page 1637: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1637.jpg)
ShowAll
![Page 1638: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1638.jpg)
ItalicPropertyDetermineswhetherthecharacterformatisitalic.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThecharacterformatisnotitalic.msoTriStateMixedThespecifiedtextrangecontainsbothitalicandnonitaliccharacters.msoTriStateTogglemsoTrueThecharacterformatisitalic.
![Page 1639: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1639.jpg)
Example
Thisexamplesetsthetitletextonslideoneandmakesthetitleblueanditalic.
WithApplication.ActivePresentation.Slides(1)_
.Shapes.Title.TextFrame.TextRange
.Text="VolcanoCoffee"
With.Font
.Italic=msoTrue
.Name="palatino"
.Color.RGB=RGB(0,0,255)
EndWith
EndWith
![Page 1640: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1640.jpg)
ItemPropertyReturnsorsetstheadjustmentvaluespecifiedbytheIndexargument.Forlinearadjustments,anadjustmentvalueof0.0generallycorrespondstotheleftortopedgeoftheshape,andavalueof1.0generallycorrespondstotherightorbottomedgeoftheshape.However,adjustmentscanpassbeyondshapeboundariesforsomeshapes.Forradialadjustments,anadjustmentvalueof1.0correspondstothewidthoftheshape.Forangularadjustments,theadjustmentvalueisspecifiedindegrees.TheItempropertyappliesonlytoshapesthathaveadjustments.Read/writeSingle.
expression.Item(Index)
expressionRequired.AnexpressionthatreturnsanAdjustmentsobject.
IndexRequiredLong.Theindexnumberoftheadjustment.
![Page 1641: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1641.jpg)
Remarks
AutoShapes,connectors,andWordArtobjectscanhaveuptoeightadjustments.
![Page 1642: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1642.jpg)
Example
ThisexampleaddstwocrossestomyDocumentandthensetsthevalueforadjustmentone(theonlyoneonthistypeofAutoShape)oneachcross.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
.AddShape(msoShapeCross,10,10,100,100)_
.Adjustments.Item(1)=0.4
.AddShape(msoShapeCross,150,10,100,100)_
.Adjustments.Item(1)=0.2
EndWith
Thisexamplehasthesameresultasthepreviousexampleeventhoughitdoesn'texplicitlyusetheItemproperty.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
.AddShape(msoShapeCross,10,10,100,100)_
.Adjustments(1)=0.4
.AddShape(msoShapeCross,150,10,100,100)_
.Adjustments(1)=0.2
EndWith
![Page 1643: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1643.jpg)
ShowAll
![Page 1644: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1644.jpg)
KernedPairsPropertyDetermineswhetherthecharacterpairsinthespecifiedWordArtarekerned.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueCharacterpairsinthespecifiedWordArtarekerned.
![Page 1645: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1645.jpg)
Example
ThisexampleturnsoncharacterpairkerningforshapethreeonmyDocumentiftheshapeisWordArt.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3)
If.Type=msoTextEffectThen
.TextEffect.KernedPairs=msoTrue
EndIf
EndWith
![Page 1646: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1646.jpg)
ShowAll
![Page 1647: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1647.jpg)
LanguageIDPropertyReturnsorsetsthelanguageforthespecifiedtextrange.UsedfortaggingportionsoftextwritteninadifferentlanguagethantheDefaultLanguageIDpropertyspecifies.ThisallowsMicrosoftPowerPointtocheckspellingandgrammaraccordingtothelanguageforeachtextrange.Thispropertyisnotrelatedtotheapplicationinterfacelanguage.Read/writeMsoLanguageID.
MsoLanguageIDcanbeoneoftheseMsoLanguageIDconstants.msoLanguageIDAfrikaansmsoLanguageIDAlbanianmsoLanguageIDAmharicmsoLanguageIDArabicmsoLanguageIDArabicAlgeriamsoLanguageIDArabicBahrainmsoLanguageIDArabicEgyptmsoLanguageIDArabicIraqmsoLanguageIDArabicJordanmsoLanguageIDArabicKuwaitmsoLanguageIDArabicLebanonmsoLanguageIDArabicLibyamsoLanguageIDArabicMoroccomsoLanguageIDArabicOmanmsoLanguageIDArabicQatarmsoLanguageIDArabicSyriamsoLanguageIDArabicTunisiamsoLanguageIDArabicUAEmsoLanguageIDArabicYemenmsoLanguageIDArmenianmsoLanguageIDAssamesemsoLanguageIDAzeriCyrillicmsoLanguageIDAzeriLatin
![Page 1648: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1648.jpg)
msoLanguageIDBasquemsoLanguageIDBelgianDutchmsoLanguageIDBelgianFrenchmsoLanguageIDBengalimsoLanguageIDBrazilianPortuguesemsoLanguageIDBulgarianmsoLanguageIDBurmesemsoLanguageIDByelorussianmsoLanguageIDCatalanmsoLanguageIDCherokeemsoLanguageIDChineseHongKongmsoLanguageIDChineseMacaomsoLanguageIDChineseSingaporemsoLanguageIDCroatianmsoLanguageIDCzechmsoLanguageIDDanishmsoLanguageIDDutchmsoLanguageIDEnglishAUSmsoLanguageIDEnglishBelizemsoLanguageIDEnglishCanadianmsoLanguageIDEnglishCaribbeanmsoLanguageIDEnglishIrelandmsoLanguageIDEnglishJamaicamsoLanguageIDEnglishNewZealandmsoLanguageIDEnglishPhilippinesmsoLanguageIDEnglishSouthAfricamsoLanguageIDEnglishTrinidadmsoLanguageIDEnglishUKmsoLanguageIDEnglishUSmsoLanguageIDEnglishZimbabwemsoLanguageIDEstonianmsoLanguageIDFaeroesemsoLanguageIDFarsi
![Page 1649: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1649.jpg)
msoLanguageIDFinnishmsoLanguageIDFrenchmsoLanguageIDFrenchCameroonmsoLanguageIDFrenchCanadianmsoLanguageIDFrenchCotedIvoiremsoLanguageIDFrenchLuxembourgmsoLanguageIDFrenchMalimsoLanguageIDFrenchMonacomsoLanguageIDFrenchReunionmsoLanguageIDFrenchSenegalmsoLanguageIDFrenchWestIndiesmsoLanguageIDFrenchZairemsoLanguageIDFrisianNetherlandsmsoLanguageIDGaelicIrelandmsoLanguageIDGaelicScotlandmsoLanguageIDGalicianmsoLanguageIDGeorgianmsoLanguageIDGermanmsoLanguageIDGermanAustriamsoLanguageIDGermanLiechtensteinmsoLanguageIDGermanLuxembourgmsoLanguageIDGreekmsoLanguageIDGujaratimsoLanguageIDHebrewmsoLanguageIDHindimsoLanguageIDHungarianmsoLanguageIDIcelandicmsoLanguageIDIndonesianmsoLanguageIDInuktitutmsoLanguageIDItalianmsoLanguageIDJapanesemsoLanguageIDKannadamsoLanguageIDKashmiri
![Page 1650: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1650.jpg)
msoLanguageIDKazakhmsoLanguageIDKhmermsoLanguageIDKirghizmsoLanguageIDKonkanimsoLanguageIDKoreanmsoLanguageIDLaomsoLanguageIDLatvianmsoLanguageIDLithuanianmsoLanguageIDMacedonianmsoLanguageIDMalayalammsoLanguageIDMalayBruneiDarussalammsoLanguageIDMalaysianmsoLanguageIDMaltesemsoLanguageIDManipurimsoLanguageIDMarathimsoLanguageIDMexicanSpanishmsoLanguageIDMixedmsoLanguageIDMongolianmsoLanguageIDNepalimsoLanguageIDNonemsoLanguageIDNoProofingmsoLanguageIDNorwegianBokmolmsoLanguageIDNorwegianNynorskmsoLanguageIDOriyamsoLanguageIDPolishmsoLanguageIDPunjabimsoLanguageIDRhaetoRomanicmsoLanguageIDRomanianmsoLanguageIDRomanianMoldovamsoLanguageIDRussianmsoLanguageIDRussianMoldovamsoLanguageIDSamiLappishmsoLanguageIDSanskrit
![Page 1651: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1651.jpg)
msoLanguageIDSerbianCyrillicmsoLanguageIDSerbianLatinmsoLanguageIDSesothomsoLanguageIDSimplifiedChinesemsoLanguageIDSindhimsoLanguageIDSlovakmsoLanguageIDSlovenianmsoLanguageIDSorbianmsoLanguageIDSpanishmsoLanguageIDSpanishArgentinamsoLanguageIDSpanishBoliviamsoLanguageIDSpanishChilemsoLanguageIDSpanishColombiamsoLanguageIDSpanishCostaRicamsoLanguageIDSpanishDominicanRepublicmsoLanguageIDSpanishEcuadormsoLanguageIDSpanishElSalvadormsoLanguageIDSpanishGuatemalamsoLanguageIDSpanishHondurasmsoLanguageIDSpanishModernSortmsoLanguageIDSpanishNicaraguamsoLanguageIDSpanishPanamamsoLanguageIDSpanishParaguaymsoLanguageIDSpanishPerumsoLanguageIDSpanishPuertoRicomsoLanguageIDSpanishUruguaymsoLanguageIDSpanishVenezuelamsoLanguageIDSutumsoLanguageIDSwahilimsoLanguageIDSwedishmsoLanguageIDSwedishFinlandmsoLanguageIDSwissFrenchmsoLanguageIDSwissGerman
![Page 1652: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1652.jpg)
msoLanguageIDSwissItalianmsoLanguageIDTajikmsoLanguageIDTamilmsoLanguageIDTatarmsoLanguageIDTelugumsoLanguageIDThaimsoLanguageIDTibetanmsoLanguageIDTraditionalChinesemsoLanguageIDTsongamsoLanguageIDTswanamsoLanguageIDTurkishmsoLanguageIDTurkmenmsoLanguageIDUkrainianmsoLanguageIDUrdumsoLanguageIDUzbekCyrillicmsoLanguageIDUzbekLatinmsoLanguageIDVendamsoLanguageIDVietnamesemsoLanguageIDWelshmsoLanguageIDXhosamsoLanguageIDZulumsoLanguageIDPortuguese
expression.LanguageID
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1653: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1653.jpg)
Example
ThisexamplesetsthelanguageforthespecifiedtextinshapeonetoUSEnglish.
ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange_
.LanguageID=msoLanguageIDEnglishUS
![Page 1654: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1654.jpg)
LanguageSettingsPropertyReturnsaLanguageSettingsobjectwhichcontainsinformationaboutthelanguagesettingsinMicrosoftPowerPoint.Read-only.
![Page 1655: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1655.jpg)
LastChildPropertyReturnsaDiagramNodeobjectrepresentingthelastdiagramnodeinacollectionofdiagramnodes.
expression.LastChild
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1656: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1656.jpg)
Example
Thefollowingexamplecreatesanewdiagramandidentifiesthelastchilddiagramnode.
SubLastChildNodeHello()
DimshpDiagramAsShape
DimdgnNodeAsDiagramNode
DimdgnLastAsDiagramNode
DimintNodesAsInteger
'Addorgcharttofirstslideandfirstchildnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes.AddDiagram_
(Type:=msoDiagramOrgChart,Left:=10,Top:=15,_
Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addthreeadditionalnodes
ForintNodes=1To3
dgnNode.Children.AddNode
NextintNodes
'Entertextintolastchildnode
SetdgnLast=dgnNode.Children.LastChild
dgnLast.Shape.TextFrame.TextRange.Text="HereIam!"
EndSub
![Page 1657: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1657.jpg)
LastSlideViewedPropertyReturnsaSlideobjectthatrepresentstheslideviewedimmediatelybeforethecurrentslideinthespecifiedslideshowview.
![Page 1658: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1658.jpg)
Example
Thisexampletakesyoutotheslideviewedimmediatelybeforethecurrentslideinslideshowwindowone.
WithSlideShowWindows(1).View
.GotoSlide(.LastSlideViewed.SlideIndex)
EndWith
![Page 1659: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1659.jpg)
ShowAll
![Page 1660: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1660.jpg)
LayoutPropertyLayoutpropertyasitappliestotheDiagramNodeobject.
ReturnsorsetsanMsoOrgChartLayoutTypeconstantthatrepresentsthelayouttypeforthediagramnodesinanorganizationchart.Read/write.
MsoOrgChartLayoutTypecanbeoneoftheseMsoOrgChartLayoutTypeconstants.msoOrgChartLayoutAssistantmsoOrgChartLayoutBothHangingmsoOrgChartLayoutLeftHangingmsoOrgChartLayoutMixedmsoOrgChartLayoutRightHangingmsoOrgChartLayoutStandard
expression.Layout
expressionRequired.AnexpressionthatreturnsaDiagramNodeobject.
![Page 1661: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1661.jpg)
Remarks
Thispropertygeneratesanerrorunlessthediagram'sTypepropertyismsoDiagramTypeOrgChart.
LayoutpropertyasitappliestotheSlideandSlideRangeobjects.
ReturnsorsetsaPpSlideLayoutconstantthatrepresentstheslidelayout.Read/write.
PpSlideLayoutcanbeoneofthesePpSlideLayoutconstants.ppLayoutBlankppLayoutChartppLayoutChartAndTextppLayoutClipartAndTextppLayoutClipArtAndVerticalTextppLayoutFourObjectsppLayoutLargeObjectppLayoutMediaClipAndTextppLayoutMixedppLayoutObjectppLayoutObjectAndTextppLayoutObjectOverTextppLayoutOrgchartppLayoutTableppLayoutTextppLayoutTextAndChartppLayoutTextAndClipartppLayoutTextAndMediaClipppLayoutTextAndObjectppLayoutTextAndTwoObjectsppLayoutTextOverObjectppLayoutTitle
![Page 1662: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1662.jpg)
ppLayoutTitleOnlyppLayoutTwoColumnTextppLayoutTwoObjectsAndTextppLayoutTwoObjectsOverTextppLayoutVerticalTextppLayoutVerticalTitleAndTextppLayoutVerticalTitleAndTextOverChart
expression.Layout
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 1663: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1663.jpg)
Example
AsitappliestotheDiagramNodeobject.
Thefollowingexamplechangesthelayoutofanewly-crateddiagram.
SubChangeDiagramLayout()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
SetshpDiagram=ActivePresentation.Slides(1).Shapes.AddDiagram_
(Type:=msoDiagramOrgChart,Left:=10,Top:=15,_
Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
ForintNodes=1To3
dgnNode.Children.AddNode
NextintNodes
dgnNode.Layout=msoOrgChartLayoutRightHanging
EndSub
AsitappliestotheSlideobject.
Thisexamplechangesthelayoutofslideoneintheactivepresentationtoincludeatitleandsubtitleifitinitiallyhasonlyatitle.
WithActivePresentation.Slides(1)
If.Layout=ppLayoutTitleOnlyThen
.Layout=ppLayoutTitle
EndIf
EndWith
![Page 1664: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1664.jpg)
![Page 1665: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1665.jpg)
ShowAll
![Page 1666: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1666.jpg)
LayoutDirectionPropertyReturnsorsetsthelayoutdirectionfortheuserinterface.CanbeoneofthefollowingThedefaultvaluedependsonthelanguagesupportyouhaveselectedorinstalled.Read/writePpDirection.
PpDirectioncanbeoneofthesePpDirectionconstants.ppDirectionLeftToRightppDirectionMixedppDirectionRightToLeft
expression.LayoutDirection
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1667: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1667.jpg)
Example
Thisexamplesetsthelayoutdirectiontoright-to-left.
Application.ActivePresentation.LayoutDirection=_
ppDirectionRightToLeft
![Page 1668: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1668.jpg)
ShowAll
![Page 1669: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1669.jpg)
LeftPropertyLeftpropertyasitappliestotheApplication,DocumentWindow,Shape,
ShapeRange,andSlideShowWindowobjects.
Application,DocumentWindowandSlideShowWindowobjects:ReturnsorsetsaSinglethatrepresentsthedistanceinpointsfromtheleftedgeofthedocument,application,andslideshowwindowstotheleftedgeoftheapplicationwindow'sclientarea.Settingthispropertytoaverylargepositiveornegativevaluemaypositionthewindowcompletelyoffthedesktop.Read/write.
Shapeobject:ReturnsorsetsaSinglethatrepresentsthedistanceinpointsfromtheleftedgeoftheshape'sboundingboxtotheleftedgeoftheslide.Read/write.
ShapeRangeobject:ReturnsorsetsaSinglethatrepresentsthedistanceinpointsfromtheleftedgeoftheleftmostshapeintheshaperangetotheleftedgeoftheslide.Read/write.
expression.Left
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
LeftpropertyasitappliestotheCommentobject.
ReturnsaSinglethatrepresentsthedistanceinpointsfromtheleftedgeofthecommenttotheleftedgeoftheslide.Read-only.
expression.Left
expressionRequired.AnexpressionthatreturnsaCommentobject.
![Page 1670: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1670.jpg)
Example
AsitappliestotheDocumentWindowsobject.
Thisexamplearrangeswindowsoneandtwohorizontally;inotherwords,eachwindowoccupieshalftheavailableverticalspaceandalltheavailablehorizontalspaceintheapplicationwindow'sclientarea.Forthisexampletowork,theremustbeonlytwodocumentwindowsopen.
Windows.ArrangeppArrangeTiled
sngHeight=Windows(1).Height'availableheight
sngWidth=Windows(1).Width+Windows(2).Width'availablewidth
WithWindows(1)
.Width=sngWidth
.Height=sngHeight/2
.Left=0
EndWith
WithWindows(2)
.Width=sngWidth
.Height=sngHeight/2
.Top=sngHeight/2
.Left=0
EndWith
![Page 1671: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1671.jpg)
LeftMarginPropertyReturnsorsetstheleftindentforthespecifiedoutlinelevel,inpoints.Read/writeSingle.
![Page 1672: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1672.jpg)
Remarks
Ifaparagraphbeginswithabullet,thebulletpositionisdeterminedbytheFirstMarginproperty,andthepositionofthefirsttextcharacterintheparagraphisdeterminedbytheLeftMarginproperty.
NoteTheRulerLevelscollectioncontainsfiveRulerLevelobjects,eachofwhichcorrespondstooneofthepossibleoutlinelevels.TheLeftMarginpropertyvaluefortheRulerLevelobjectthatcorrespondstothefirstoutlinelevelhasavalidrangeof(-9.0to4095.875).ThevalidrangefortheLeftMarginpropertyvaluesfortheRulerLevelobjectsthatcorrespondtothesecondthroughthefifthoutlinelevelsaredeterminedasfollows:
Themaximumvalueisalways4095.875.TheminimumvalueisthemaximumassignedvaluebetweentheFirstMarginpropertyandLeftMarginpropertyofthepreviouslevelplus9.
YoucanusethefollowingequationstodeterminetheminimumvaluefortheLeftMarginproperty.Index,theindexnumberoftheRulerLevelobject,indicatestheobject’scorrespondingoutlinelevel.TodeterminetheminimumLeftMarginpropertyvaluesfortheRulerLevelobjectsthatcorrespondtothesecondthroughthefifthoutlinelevels,substitute2,3,4,or5fortheindexplaceholder.
Minimum(RulerLevel(index).FirstMargin)=Maximum(RulerLevel(index-1).FirstMargin,RulerLevel(index-1).LeftMargin)+9
Minimum(RulerLevel(index).LeftMargin)=Maximum(RulerLevel(index-1).FirstMargin,RulerLevel(index-1).LeftMargin)+9
![Page 1673: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1673.jpg)
Example
Thisexamplesetsthefirst-lineindentandhangingindentforoutlineleveloneinbodytextontheslidemasterfortheactivepresentation.
WithApplication.ActivePresentation_
.SlideMaster.TextStyles(ppBodyStyle)
With.Ruler.Levels(1)
.FirstMargin=9
.LeftMargin=54
EndWith
EndWith
![Page 1674: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1674.jpg)
ShowAll
![Page 1675: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1675.jpg)
LengthPropertyLengthpropertyasitappliestotheCalloutFormatobject.
WhentheAutoLengthpropertyofthespecifiedcalloutissettoFalse,theLengthpropertyreturnsthelength(inpoints)ofthefirstsegmentofthecalloutline(thesegmentattachedtothetextcalloutbox).Appliesonlytocalloutswhoselinesconsistofmorethanonesegment(typesmsoCalloutThreeandmsoCalloutFour).Read-onlyFloat.UsetheCustomLengthmethodtosetthevalueofthispropertyfortheCalloutFormatobject.
expression.Length
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
LengthpropertyasitappliestotheTextRangeobject.
Returnsthelengthofthespecifiedtextrange,incharacters.Read-onlyLong.
expression.Length
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 1676: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1676.jpg)
Example
AsitappliestotheCalloutFormatobject.
Ifthefirstlinesegmentinthecalloutnamed"co1"hasafixedlength,thisexamplespecifiesthatthelengthofthefirstlinesegmentinthecalloutnamed"co2"willalsobefixedatthatlength.Fortheexampletowork,bothcalloutsmusthavemultiple-segmentlines.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
With.Item("co1").Callout
IfNot.AutoLengthThenlen1=.Length
EndWith
Iflen1Then.Item("co2").Callout.CustomLengthlen1
EndWith
AsitappliestotheTextRangeobject.
Thisexamplesetsthetitlefontsizeto48pointsifthetitleofslidetwocontainsmorethanfivecharacters,oritsetsthefontsizeto72pointsifthetitlehasfiveorfewercharacters.
SetmyDocument=ActivePresentation.Slides(2)
WithmyDocument.Shapes(1).TextFrame.TextRange
If.Length>5Then
.Font.Size=48
Else
.Font.Size=72
EndIf
EndWith
![Page 1677: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1677.jpg)
ShowAll
![Page 1678: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1678.jpg)
LevelsPropertyLevelspropertyasitappliestotheRulerobject.
ReturnsaRulerLevelsobjectthatrepresentsoutlineindentformatting.Read-only.
expression.Levels
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
LevelspropertyasitappliestotheTextStyleobject.
ReturnsaTextStyleLevelsobjectthatrepresentsoutlinetextformatting.Read-only.
expression.Levels
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 1679: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1679.jpg)
Example
Thisexamplesetsthefirst-lineindentandhangingindentforoutlineleveloneinbodytextontheslidemasterfortheactivepresentation,andthenitsetsthefontnameandfontsizefortextatthatlevel.
WithApplication.ActivePresentation_
.SlideMaster.TextStyles(ppBodyStyle)
With.Ruler.Levels(1)'setsindentsforlevel1
.FirstMargin=9
.LeftMargin=54
EndWith
With.Levels(1).Font'setstextformattingforlevel1
.Name="arial"
.Size=36
EndWith
EndWith
![Page 1680: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1680.jpg)
LinePropertyReturnsaLineFormatobjectthatcontainslineformattingpropertiesforthespecifiedshape.(Foraline,theLineFormatobjectrepresentsthelineitself;forashapewithaborder,theLineFormatobjectrepresentstheborder.)Read-only.
![Page 1681: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1681.jpg)
Example
ThisexampleaddsabluedashedlinetomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(10,10,250,250).Line
.DashStyle=msoLineDashDotDot
.ForeColor.RGB=RGB(50,0,128)
EndWith
Thisexampleaddsacrosstothefirstslideandthensetsitsbordertobe8pointsthickandred.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(msoShapeCross,10,10,50,70).Line
.Weight=8
.ForeColor.RGB=RGB(255,0,0)
EndWith
![Page 1682: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1682.jpg)
ShowAll
![Page 1683: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1683.jpg)
LineRuleAfterPropertyDetermineswhetherlinespacingafterthelastlineineachparagraphissettoaspecificnumberofpointsorlines.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseLinespacingafterthelastlineineachparagraphissettoaspecificnumberofpoints.msoTriStateMixedmsoTriStateTogglemsoTrueLinespacingafterthelastlineineachparagraphissettoaspecificnumberoflines.
![Page 1684: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1684.jpg)
Example
Thisexampledisplaysamessageboxthatshowsthesettingforspaceafterparagraphsforthetextinshapetwoonslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Shapes(2).TextFrame
With.TextRange.ParagraphFormat
sa=.SpaceAfter
If.LineRuleAfterThen
saUnits="lines"
Else
saUnits="points"
EndIf
EndWith
EndWith
MsgBox"Currentspacingafterparagraphs:"&sa&saUnits
![Page 1685: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1685.jpg)
ShowAll
![Page 1686: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1686.jpg)
LineRuleBeforePropertyDetermineswhetherlinespacingbeforethefirstlineineachparagraphissettoaspecificnumberofpointsorlines.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseLinespacingbeforethefirstlineineachparagraphissettoaspecificnumberofpoints.msoTriStateMixedmsoTriStateTogglemsoTrueLinespacingbeforethefirstlineineachparagraphissettoaspecificnumberoflines.
![Page 1687: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1687.jpg)
Example
Thisexampledisplaysamessageboxthatshowsthesettingforspacebeforeparagraphsfortextinshapetwoonslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Shapes(2).TextFrame
With.TextRange.ParagraphFormat
sb=.SpaceBefore
If.LineRuleBeforeThen
sbUnits="lines"
Else
sbUnits="points"
EndIf
EndWith
EndWith
MsgBox"Currentspacingbeforeparagraphs:"&sb&sbUnits
![Page 1688: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1688.jpg)
ShowAll
![Page 1689: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1689.jpg)
LineRuleWithinPropertyDetermineswhetherlinespacingbetweenbaselinesissettoaspecificnumberofpointsorlines.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseLinespacingbetweenbaselinesissettoaspecificnumberofpoints.msoTriStateMixedmsoTriStateTogglemsoTrueLinespacingbetweenbaselinesissettoaspecificnumberoflines.
![Page 1690: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1690.jpg)
Example
Thisexampledisplaysamessageboxthatshowsthesettingforlinespacingfortextinshapetwoonslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Shapes(2).TextFrame
With.TextRange.ParagraphFormat
ls=.SpaceWithin
If.LineRuleWithinThen
lsUnits="lines"
Else
lsUnits="points"
EndIf
EndWith
EndWith
MsgBox"Currentlinespacing:"&ls&lsUnits
![Page 1691: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1691.jpg)
LinkFormatPropertyReturnsaLinkFormatobjectthatcontainsthepropertiesthatareuniquetolinkedOLEobjects.Read-only.
![Page 1692: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1692.jpg)
Example
ThisexampleupdatesthelinksbetweenanyOLEobjectsonslideoneintheactivepresentationandtheirsourcefiles.
ForEachshInActivePresentation.Slides(1).Shapes
Ifsh.Type=msoLinkedOLEObjectThen
Withsh.LinkFormat
.Update
EndWith
EndIf
Next
![Page 1693: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1693.jpg)
ShowAll
![Page 1694: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1694.jpg)
LoadedPropertyDetermineswhetherthespecifiedadd-inisloaded.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedadd-inisloaded.IntheAdd-Insdialogbox(Toolsmenu),thecheckboxesnexttoloadedadd-insareselected.
![Page 1695: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1695.jpg)
Example
ThisexampleaddsMyTools.ppatothelistintheAdd-Insdialogbox(Toolsmenu)andthenloadsit.
Addins.Add("c:\mydocuments\mytools.ppa").Loaded=msoTrue
Thisexampleunloadstheadd-innamed"MyTools."
Application.Addins("mytools").Loaded=msoFalse
![Page 1696: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1696.jpg)
ShowAll
![Page 1697: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1697.jpg)
LockAspectRatioPropertyDetermineswhetherthespecifiedshaperetainsitsoriginalproportionswhenyouresizeit.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseYoucanchangetheheightandwidthoftheshapeindependentlyofoneanotherwhenyouresizeit.msoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedshaperetainsitsoriginalproportionswhenyouresizeit.
![Page 1698: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1698.jpg)
Example
ThisexampleaddsacubetomyDocument.Thecubecanbemovedandresized,butnotreproportioned.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddShape(msoShapeCube,50,50,100,200)_
.LockAspectRatio=msoTrue
![Page 1699: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1699.jpg)
ShowAll
![Page 1700: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1700.jpg)
LoopSoundUntilNextPropertyRead/writeMsoTriState.Specifieswhetherthesoundthat'sbeensetforthespecifiedslidetransitionloopsuntilthenextsoundstarts.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThesoundthat'sbeensetforthespecifiedslidetransitionloopsuntilthenextsoundstarts.
![Page 1701: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1701.jpg)
Example
ThisexamplespecifiesthatthefileDudududu.wavwillstarttoplayatthetransitiontoslidetwointheactivepresentationandwillcontinuetoplayuntilthenextsoundstarts.
WithActivePresentation.Slides(2).SlideShowTransition
.SoundEffect.ImportFromFile"c:\sndsys\dudududu.wav"
.LoopSoundUntilNext=msoTrue
EndWith
![Page 1702: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1702.jpg)
ShowAll
![Page 1703: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1703.jpg)
LoopUntilStoppedPropertyAsitappliestothePlaySettingsobject.
Determineswhetherthespecifiedmovieorsoundloopscontinuouslyuntileitherthenextmovieorsoundstarts,theuserclickstheslide,oraslidetransitionoccurs.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedmovieorsoundloopscontinuouslyuntileitherthenextmovieorsoundstarts,theuserclickstheslide,oraslidetransitionoccurs.
expression.LoopUntilStopped
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
AsitappliestotheSlideShowSettingsobject.
DetermineswhetherspecifiedslideshowloopscontinuouslyuntiltheuserpressesESC.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedslideshowloopscontinuouslyuntiltheuserpressesESC.
![Page 1704: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1704.jpg)
expression.LoopUntilStopped
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1705: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1705.jpg)
Example
AsitappliestothePlaySettingsobject.
Thisexamplespecifiesthatshapethreeonslideoneintheactivepresentationwillstarttoplayintheanimationorderandwillcontinuetoplayuntilthenextmediaclipstarts.Shapethreemustbeasoundormovieobject.
ActivePresentation.Slides(1).Shapes(3)_
.AnimationSettings.PlaySettings.LoopUntilStopped=msoTrue
AsitappliestotheSlideShowSettingsobject.
Thisexamplestartsaslideshowoftheactivepresentationthatwillautomaticallyadvancetheslides(usingthestoredtimings)andwillloopcontinuouslythroughthepresentationuntiltheuserpressesESC.
WithActivePresentation.SlideShowSettings
.AdvanceMode=ppSlideShowUseSlideTimings
.LoopUntilStopped=msoTrue
.Run
EndWith
![Page 1706: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1706.jpg)
MainSequencePropertyReturnsaSequenceobjectthatrepresentsthecollectionofEffectobjectsinthemainanimationsequenceofaslide.
expression.MainSequence
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1707: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1707.jpg)
Remarks
ThedefaultvalueoftheMainSequencepropertyisanemptySequencecollection.AnyattempttoreturnavaluefromthispropertywithoutaddingoneormoreEffectobjectstothemainanimationsequencewillresultinarun-timeerror.
![Page 1708: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1708.jpg)
Example
Thefollowingexampleaddsaboomeranganimationtoanewshapeonanewslideaddedtotheactivepresentation.
SubNewSequence()
DimsldNewAsSlide
DimshpnewAsShape
SetsldNew=ActivePresentation.Slides.Add(Index:=1,Layout:=ppLayoutBlank)
Setshpnew=sldNew.Shapes.AddShape(Type:=msoShape5pointStar,_
Left:=25,Top:=25,Width:=100,Height:=100)
WithsldNew.TimeLine.MainSequence.AddEffect(Shape:=shpnew,_
EffectId:=msoAnimEffectBoomerang)
.Timing.Speed=0.5
.Timing.Accelerate=0.2
EndWith
EndSub
![Page 1709: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1709.jpg)
MarginBottomPropertyReturnsorsetsthedistance(inpoints)betweenthebottomofthetextframeandthebottomoftheinscribedrectangleoftheshapethatcontainsthetext.Read/writeSingle.
![Page 1710: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1710.jpg)
Example
ThisexampleaddsarectangletomyDocument,addstexttotherectangle,andthensetsthemarginsforthetextframe.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(msoShapeRectangle,_
0,0,250,140).TextFrame
.TextRange.Text="Hereissometesttext"
.MarginBottom=0
.MarginLeft=10
.MarginRight=0
.MarginTop=20
EndWith
![Page 1711: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1711.jpg)
MarginLeftPropertyReturnsorsetsthedistance(inpoints)betweentheleftedgeofthetextframeandtheleftedgeoftheinscribedrectangleoftheshapethatcontainsthetext.Read/writeSingle.
![Page 1712: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1712.jpg)
Example
ThisexampleaddsarectangletomyDocument,addstexttotherectangle,andthensetsthemarginsforthetextframe.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(msoShapeRectangle,_
0,0,250,140).TextFrame
.TextRange.Text="Hereissometesttext"
.MarginBottom=0
.MarginLeft=10
.MarginRight=0
.MarginTop=20
EndWith
![Page 1713: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1713.jpg)
MarginRightPropertyReturnsorsetsthedistance(inpoints)betweentherightedgeofthetextframeandtherightedgeoftheinscribedrectangleoftheshapethatcontainsthetext.Read/writeSingle.
![Page 1714: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1714.jpg)
Example
ThisexampleaddsarectangletomyDocument,addstexttotherectangle,andthensetsthemarginsforthetextframe.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(msoShapeRectangle,_
0,0,250,140).TextFrame
.TextRange.Text="Hereissometesttext"
.MarginBottom=0
.MarginLeft=10
.MarginRight=5
.MarginTop=20
EndWith
![Page 1715: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1715.jpg)
MarginTopPropertyReturnsorsetsthedistance(inpoints)betweenthetopofthetextframeandthetopoftheinscribedrectangleoftheshapethatcontainsthetext.Read/writeSingle.
![Page 1716: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1716.jpg)
Example
ThisexampleaddsarectangletomyDocument,addstexttotherectangle,andthensetsthemarginsforthetextframe.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(msoShapeRectangle,_
0,0,250,140).TextFrame
.TextRange.Text="Hereissometesttext"
.MarginBottom=0
.MarginLeft=10
.MarginRight=0
.MarginTop=20
EndWith
![Page 1717: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1717.jpg)
MasterPropertyReturnsaMasterobjectthatrepresentstheslidemaster.Read-only.
![Page 1718: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1718.jpg)
Example
Thisexamplesetsthebackgroundfillfortheslidemasterforslideoneintheactivepresentation.
ActivePresentation.Slides(1).Master.Background.Fill_
.PresetGradientmsoGradientDiagonalUp,1,msoGradientDaybreak
![Page 1719: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1719.jpg)
ShowAll
![Page 1720: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1720.jpg)
MediaTypePropertyReturnstheOLEmediatype.Read-onlyPpMediaType.
PpMediaTypecanbeoneofthesePpMediaTypeconstants.ppMediaTypeMixedppMediaTypeMovieppMediaTypeOtherppMediaTypeSound
expression.MediaType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1721: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1721.jpg)
Example
Thisexamplesetsallnativesoundobjectsonslideoneintheactivepresentationtoloopuntilmanuallystoppedduringaslideshow.
ForEachsoInActivePresentation.Slides(1).Shapes
Ifso.Type=msoMediaThen
Ifso.MediaType=ppMediaTypeSoundThen
so.AnimationSettings.PlaySettings_
.LoopUntilStopped=True
EndIf
EndIf
Next
![Page 1722: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1722.jpg)
MotionEffectPropertyReturnsaMotionEffectobjectthatrepresentsthepropertiesofamotionanimation.
expression.MotionEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1723: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1723.jpg)
Example
Thisexampleaddsanewmotionbehaviortothefirstslide'smainsequencethatmovesthespecifiedanimationsequencefromonesideofthepagetotheshape'soriginalposition.
SubNewMotion()
WithActivePresentation.Slides(1).TimeLine.MainSequence(1)_
.Behaviors.Add(msoAnimTypeMotion).MotionEffect
.FromX=100
.FromY=100
.ToX=0
.ToY=0
EndWith
EndSub
![Page 1724: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1724.jpg)
ShowAll
![Page 1725: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1725.jpg)
NamePropertyNamepropertyasitappliestotheColorFormat,Design,Font,Master,
Shape,ShapeRange,Slide,SlideRange,andSoundEffectobjects.
ColorFormat,Design,Font,andMasterobjects:Returnsorsetsthenameofthespecifiedobject.Read/writeString.
ShapeorShapeRangeobjects.Whenashapeiscreated,MicrosoftPowerPointautomaticallyassignsitanameintheformShapeTypeNumber,whereShapeTypeidentifiesthetypeofshapeorAutoShape,andNumberisanintegerthat'suniquewithinthecollectionofshapesontheslide.Forexample,theautomaticallygeneratednamesoftheshapesonaslidecouldbePlaceholder1,Oval2,andRectangle3.Toavoidconflictwithautomaticallyassignednames,don'tusetheformShapeTypeNumberforuser-definednames,whereShapeTypeisavaluethatisusedforautomaticallygeneratednames,andNumberisanypositiveinteger.Ashaperangemustcontainexactlyoneshape.Read/writeString.
SlideorSlideRangeobjects:Whenaslideisinsertedintoapresentation,PowerPointautomaticallyassignsitanameintheformSliden,wherenisanintegerthatrepresentstheorderinwhichtheslidewascreatedinthepresentation.Forexample,thefirstslideinsertedintoapresentationisautomaticallynamedSlide1.Ifyoucopyaslidefromonepresentationtoanother,theslidelosesthenameithadinthefirstpresentationandisautomaticallyassignedanewnameinthesecondpresentation.Asliderangemustcontainexactlyoneslide.Read/writeString.
SoundEffectobject:ThesetofvalidnamesforapresentationappearsintheSoundboxintheSlideTransitiontaskpane(SlideShowmenu).Read/writeString.
expression.Name
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 1726: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1726.jpg)
NamepropertyasitappliestotheAddIn,Application,NamedSlideShow,andPresentationobjects.
AddInobject:Thename(title)oftheadd-inforfiletypesthatareregistered.Read-onlyString.
Applicationobject:Returnsthestring"MicrosoftPowerPoint."Read-onlyString.
NamedSlideShowobject:Youcannotusethispropertytosetthenameforacustomslideshow.UsetheAddmethodtoredefineacustomslideshowunderanewname.Read-onlyString.
Presentationobject:Thenameofthepresentationincludesthefilenameextension(forfiletypesthatareregistered)butdoesn'tincludeitspath.Youcannotusethispropertytosetthename.UsetheSaveAsmethodtosavethepresentationunderadifferentnameifyouneedtochangethename.Read-onlyString.
expression.Name
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 1727: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1727.jpg)
Remarks
Youcanusetheobject'snameinconjunctionwiththeItemmethodtoreturnareferencetotheobjectiftheItemmethodforthecollectionthatcontainstheobjecttakesaVariantargument.Forexample,ifthevalueoftheNamepropertyforashapeisRectangle2,then.Shapes("Rectangle2")willreturnareferencetothatshape.
![Page 1728: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1728.jpg)
Example
AsitappliestotheShapeobject.
Thisexamplesetsthenameofobjecttwoonslideoneintheactivepresentationto"bigtriangle."
ActivePresentation.Slides(1).Shapes(2).Name="bigtriangle"
Thisexamplesetsthefillcolorfortheshapenamed"bigtriangle"onslideoneintheactivepresentation.
ActivePresentation.Slides(1)_
.Shapes("bigtriangle").Fill.ForeColor.RGB=RGB(0,0,255)
![Page 1729: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1729.jpg)
NameAsciiPropertyReturnsorsetsthefontusedforASCIIcharacters(characterswithcharactersetnumberswithintherangeof0to127).Read/writeString.
![Page 1730: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1730.jpg)
Remarks
ThedefaultvalueofthispropertyisTimesNewRoman.UsetheReplacemethodtochangethefontthat’sappliedtoalltextandthatappearsintheFontboxontheFormattingtoolbar.
![Page 1731: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1731.jpg)
Example
ThisexamplesetsthefontusedforASCIIcharactersinthetitleofthefirstslidetoCentury.
Application.ActivePresentation.Slides(1).Shapes.Title_
.TextFrame.TextRange.Font.NameAscii="Century"
![Page 1732: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1732.jpg)
NameComplexScriptPropertyReturnsorsetsthecomplexscriptfontname.Usedformixedlanguagetext.Read/writeString.
![Page 1733: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1733.jpg)
Remarks
Whenyouhavearight-to-leftlanguagesettingspecified,thispropertyisequivalenttotheComplexscriptsfontlistintheFontdialogbox(Formatmenu).WhenyouhaveanAsianlanguagesettingspecified,thispropertyisequivalenttotheAsiantextfontlistintheFontdialogbox(Formatmenu).
![Page 1734: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1734.jpg)
Example
ThisexamplesetsthecomplexscriptfonttoTimesNewRoman.
ActivePresentation.Slides(1).Shapes.Title.TextFrame_
.TextRange.Font.NameComplexScript="TimesNewRoman"
![Page 1735: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1735.jpg)
NamedSlideShowsPropertyReturnsaNamedSlideShowscollectionthatrepresentsallthenamedslideshows(customslideshows)inthespecifiedpresentation.Eachnamedslideshow,orcustomslideshow,isauser-selectedsubsetofthespecifiedpresentation.Read-only.
![Page 1736: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1736.jpg)
Remarks
UsetheAddmethodoftheNamedSlideShowsobjecttocreateanamedslideshow.
![Page 1737: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1737.jpg)
Example
Thisexampleaddstotheactivepresentationanamedslideshow"QuickShow"thatcontainsslides2,7,and9.Theexamplethenrunsthisslideshow.
DimqSlides(1To3)AsLong
WithActivePresentation
With.Slides
qSlides(1)=.Item(2).SlideID
qSlides(2)=.Item(7).SlideID
qSlides(3)=.Item(9).SlideID
EndWith
With.SlideShowSettings
.RangeType=ppShowNamedSlideShow
.NamedSlideShows.Add"QuickShow",qSlides
.SlideShowName="QuickShow"
.Run
EndWith
EndWith
![Page 1738: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1738.jpg)
NameFarEastPropertyReturnsorsetstheAsianfontname.Read/writeString.
![Page 1739: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1739.jpg)
Remarks
UsetheReplacemethodtochangethefontthat’sappliedtoalltextandthatappearsintheFontboxontheFormattingtoolbar.
![Page 1740: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1740.jpg)
Example
ThisexampledisplaysthenameoftheAsianfontappliedtotheselection.
MsgBoxActiveWindow.Selection.ShapeRange_
.TextFrame.TextRange.Font.NameFarEast
![Page 1741: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1741.jpg)
NameOtherPropertyReturnsorsetsthefontusedforcharacterswhosecharactersetnumbersaregreaterthan127.Read/writeString.
Remarks
IntheU.S.EnglishversionofMicrosoftPowerPoint,thispropertyisread-onlyandthedefaultvalueisTimesNewRoman.UsetheReplacemethodtochangeafontinapresentation.TheNameOtherpropertysettingisthesameastheNameASCIIpropertysettingexceptwhentheNameASCIIpropertyissetto"UseFEFont."
![Page 1742: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1742.jpg)
Example
Thisexamplesetsthefontusedforcharacterswhosecharactersetnumbersaregreaterthan127,forthefirstmemberoftheFontscollection.
ActivePresentation.Fonts(1).NameOther="Tahoma"
![Page 1743: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1743.jpg)
NewPresentationPropertyReturnsaNewFileobjectthatrepresentsapresentationlistedontheNewPresentationtaskpane.Read-only.
expression.NewPresentation
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1744: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1744.jpg)
Example
ThisexamplelistsapresentationontheNewPresentationtaskpaneatthebottomofthelastsectioninthepane.
SubCreateNewPresentationListItem()
Application.NewPresentation.AddFileName:="C:\Presentation.ppt"
Application.CommandBars("TaskPane").Visible=True
EndSub
![Page 1745: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1745.jpg)
ShowAll
![Page 1746: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1746.jpg)
NodesPropertyNodespropertyasitappliestotheDiagramobject.
ReturnsaDiagramNodesobjectthatcontainsaflatlistofallofthenodesinthespecifieddiagram.
expression.Nodes
expressionRequired.AnexpressionthatreturnsaDiagramobject.
NodespropertyasitappliestotheShapeandShapeRangeobjects.
ReturnsaShapeNodescollectionthatrepresentsthegeometricdescriptionofthespecifiedshape.AppliestoShapeorShapeRangeobjectsthatrepresentfreeformdrawings.
expression.Nodes
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 1747: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1747.jpg)
Example
AsitappliestotheDiagramobject.
Thefollowingexamplereturnsthenumberofnodesinanewly-createddiagram.
SubConvertPyramidDiagram()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
'Createpyramiddiagramandaddfirstnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramPyramid,Left:=10,_
Top:=15,Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addthreechildnodestothefirstnode
ForintNodes=1To3
dgnNode.AddNode
NextintNodes
'Automaticallylayoutdiagramandconverttoradialdiagram
WithdgnNode.Diagram
.AutoLayout=msoTrue
.ConvertType:=msoDiagramRadial
EndWith
'Displaythenumberofnodesinthediagram
MsgBoxdgnNode.Diagram.Nodes.Count
EndSub
AsitappliestotheShapeobject.
ThisexampleaddsasmoothnodewithacurvedsegmentafternodefourinshapethreeonmyDocument.Shapethreemustbeafreeformdrawingwithatleastfournodes.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Nodes
.InsertIndex:=4,SegmentType:=msoSegmentCurve,_
![Page 1748: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1748.jpg)
EditingType:=msoEditingSmooth,X1:=210,Y1:=100
EndWith
![Page 1749: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1749.jpg)
NoLineBreakAfterPropertyReturnsorsetsthecharactersthatcannotendaline.Read/writeString.
![Page 1750: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1750.jpg)
Example
Thisexamplesets"$","(","[","\",and"{"ascharactersthatcannotendaline.
WithActivePresentation
.FarEastLineBreakLevel=ppFarEastLineBreakLevelCustom
.NoLineBreakAfter="$([\{"
EndWith
![Page 1751: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1751.jpg)
NoLineBreakBeforePropertyReturnsorsetsthecharactersthatcannotbeginaline.Read/writeString.
![Page 1752: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1752.jpg)
Example
Thisexamplesets"!",")",and"]"ascharactersthatcannotbeginaline.
WithActivePresentation
.FarEastLineBreakLevel=ppFarEastLineBreakLevelCustom
.NoLineBreakBefore="!)]"
EndWith
![Page 1753: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1753.jpg)
ShowAll
![Page 1754: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1754.jpg)
NormalizedHeightPropertyDetermineswhetherthecharacters(bothuppercaseandlowercase)inthespecifiedWordArtarethesameheight.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueAllcharacters(bothuppercaseandlowercase)inthespecifiedWordArtarethesameheight.
![Page 1755: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1755.jpg)
Example
ThisexampleaddsWordArtthatcontainsthetext"TestEffect"tomyDocumentandgivesthenewWordArtthename"texteff1."Thecodethenmakesallcharactersintheshapenamed"texteff1"thesameheight.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddTextEffect(PresetTextEffect:=msoTextEffect1,_
Text:="TestEffect",FontName:="CourierNew",_
FontSize:=44,FontBold:=True,_
FontItalic:=False,Left:=10,Top:=10)_
.Name="texteff1"
myDocument.Shapes("texteff1").TextEffect.NormalizedHeight=msoTrue
![Page 1756: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1756.jpg)
NotesMasterPropertyReturnsaMasterobjectthatrepresentsthenotesmaster.Read-only.
![Page 1757: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1757.jpg)
Example
Thisexamplesetstheheaderandfootertextforthenotesmasterfortheactivepresentation.
WithApplication.ActivePresentation.NotesMaster.HeadersFooters
.Header.Text="EmployeeGuidelines"
.Footer.Text="VolcanoCoffee"
EndWith
![Page 1758: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1758.jpg)
ShowAll
![Page 1759: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1759.jpg)
NotesOrientationPropertyReturnsorsetstheon-screenandprintedorientationofnotespages,handouts,andoutlinesforthespecifiedpresentation.Read/writeMsoOrientation.
MsoOrientationcanbeoneoftheseMsoOrientationconstants.msoOrientationHorizontalmsoOrientationMixedmsoOrientationVertical
expression.NotesOrientation
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1760: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1760.jpg)
Example
Thisexamplesetstheorientationofallnotespages,handouts,andoutlinesintheactivepresentationtohorizontal(landscape).
Application.ActivePresentation.PageSetup.NotesOrientation=_
msoOrientationHorizontal
![Page 1761: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1761.jpg)
NotesPagePropertyReturnsaSlideRangeobjectthatrepresentsthenotespagesforthespecifiedslideorrangeofslides.Read-only.
NoteThefollowingpropertiesandmethodswillfailifappliedtoaSlideRangeobjectthatrepresentsanotespage:Copymethod,Cutmethod,Deletemethod,Duplicatemethod,HeadersFootersproperty,Hyperlinksproperty,Layoutproperty,PrintStepsproperty,SlideShowTransitionproperty.
![Page 1762: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1762.jpg)
Remarks
TheNotesPagepropertyreturnsthenotespageforeitherasingleslideorarangeofslidesandallowsyoutomakechangesonlytothosenotespages.Ifyouwanttomakechangesthataffectallnotespages,usetheNotesMasterpropertytoreturntheSlideobjectthatrepresentsthenotesmaster.
![Page 1763: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1763.jpg)
Example
Thisexamplesetsthebackgroundfillforthenotespageforslideoneintheactivepresentation.
WithActivePresentation.Slides(1).NotesPage
.FollowMasterBackground=False
.Background.Fill.PresetGradient_
msoGradientHorizontal,1,msoGradientLateSunset
EndWith
![Page 1764: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1764.jpg)
NumberPropertyReturnsthebulletnumberofaparagraphwhentheTypepropertyoftheBulletFormatobjectissettoppBulletNumbered.Read-onlyLong.
![Page 1765: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1765.jpg)
Remarks
Ifthispropertyisqueriedformultipleparagraphswithdifferentnumbers,thenthevalueppBulletMixedisreturned.IfthispropertyisqueriedforaparagraphwithatypeotherthanppBulletNumbered,thenarun-timeerroroccurs.
![Page 1766: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1766.jpg)
Example
ThisexamplereturnsthebulletnumberofparagraphoneintheselectedtextrangetoavariablenamedmyParnum.
WithActiveWindow.Selection
If.Type=ppSelectionTextRangeThen
With.TextRange.Paragraphs(1).ParagraphFormat.Bullet
If.Type=ppBulletNumberedThen
myParnum=.Number
EndIf
EndWith
EndIf
EndWith
![Page 1767: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1767.jpg)
NumberOfCopiesPropertyReturnsorsetsthenumberofcopiesofapresentationtobeprinted.Thedefaultvalueis1.Read/writeLong.
![Page 1768: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1768.jpg)
Remarks
SpecifyingavaluefortheCopiesargumentofthePrintOutmethodsetsthevalueofthisproperty.
![Page 1769: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1769.jpg)
Example
Thisexampleprintsthreecollatedcopiesoftheactivepresentation.
WithActivePresentation.PrintOptions
.NumberOfCopies=3
.Collate=True
.Parent.PrintOut
EndWith
![Page 1770: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1770.jpg)
ObjectPropertyReturnstheobjectthatrepresentsthespecifiedOLEobject'stop-levelinterface.ThispropertyallowsyoutoaccessthepropertiesandmethodsoftheapplicationinwhichanOLEobjectwascreated.Read-only.
![Page 1771: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1771.jpg)
Remarks
UsetheTypeNamefunctiontodeterminethetypeofobjectthispropertyreturnsforaspecificOLEobject.
![Page 1772: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1772.jpg)
Example
Thisexampledisplaysthetypeofobjectcontainedinshapeoneonslideoneintheactivepresentation.ShapeonemustcontainanOLEobject.
MsgBoxTypeName(ActivePresentation.Slides(1)_
.Shapes(1).OLEFormat.Object)
ThisexampledisplaysthenameoftheapplicationinwhicheachembeddedOLEobjectonslideoneintheactivepresentationwascreated.
ForEachsInActivePresentation.Slides(1).Shapes
Ifs.Type=msoEmbeddedOLEObjectThen
MsgBoxs.OLEFormat.Object.Application.Name
EndIf
Next
ThisexampleaddstexttocellA1onworksheetoneintheMicrosoftExcelworkbookcontainedinshapethreeonslideoneintheactivepresentation.
WithActivePresentation.Slides(1).Shapes(3)
.OLEFormat.Object.Worksheets(1).Range("A1").Value="Newtext"
EndWith
![Page 1773: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1773.jpg)
ShowAll
![Page 1774: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1774.jpg)
ObjectVerbsPropertyReturnsaObjectVerbscollectionthatcontainsalltheOLEverbsforthespecifiedOLEobject.Read-only.
![Page 1775: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1775.jpg)
Example
ThisexampledisplaysalltheavailableverbsfortheOLEobjectcontainedinshapeoneonslidetwointheactivepresentation.Forthisexampletowork,shapeonemustbeashapethatrepresentsanOLEobject.
WithActivePresentation.Slides(2).Shapes(1).OLEFormat
ForEachvIn.ObjectVerbs
MsgBoxv
Next
EndWith
ThisexamplespecifiesthattheOLEobjectrepresentedbyshapeoneonslidetwointheactivepresentationwillopenwhenit'sclickedduringaslideshowif"Open"isoneoftheOLEverbsforthatobject.Forthisexampletowork,shapeonemustbeashapethatrepresentsanOLEobject.
WithActivePresentation.Slides(2).Shapes(1)
ForEachsVerbIn.OLEFormat.ObjectVerbs
IfsVerb="Open"Then
With.ActionSettings(ppMouseClick)
.Action=ppActionOLEVerb
.ActionVerb=sVerb
EndWith
ExitFor
EndIf
Next
EndWith
![Page 1776: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1776.jpg)
ShowAll
![Page 1777: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1777.jpg)
ObscuredPropertyDetermineswhethertheshadowofthespecifiedshapeappearsfilledinandisobscuredbytheshape.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseTheshadowhasnofillandtheoutlineoftheshadowisvisiblethroughtheshapeiftheshapehasnofill.msoTriStateMixedmsoTriStateTogglemsoTrueTheshadowofthespecifiedshapeappearsfilledinandisobscuredbytheshape,eveniftheshapehasnofill.
![Page 1778: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1778.jpg)
Example
ThisexamplesetsthehorizontalandverticaloffsetsoftheshadowforshapethreeonmyDocument.Theshadowisoffset5pointstotherightoftheshapeand3pointsaboveit.Iftheshapedoesn'talreadyhaveashadow,thisexampleaddsonetoit.Theshadowwillbefilledinandobscuredbytheshape,eveniftheshapehasnofill.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Shadow
.Visible=True
.OffsetX=5
.OffsetY=-3
.Obscured=msoTrue
EndWith
![Page 1779: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1779.jpg)
OffsetXPropertyReturnsorsetsthehorizontaloffsetoftheshadowfromthespecifiedshape,inpoints.Apositivevalueoffsetstheshadowtotherightoftheshape;anegativevalueoffsetsittotheleft.Read/writeSingle.
![Page 1780: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1780.jpg)
Remarks
Ifyouwanttonudgeashadowhorizontallyorverticallyfromitscurrentpositionwithouthavingtospecifyanabsoluteposition,usetheIncrementOffsetXmethodortheIncrementOffsetYmethod.
![Page 1781: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1781.jpg)
Example
ThisexamplesetsthehorizontalandverticaloffsetsoftheshadowforshapethreeonmyDocument.Theshadowisoffset5pointstotherightoftheshapeand3pointsaboveit.Iftheshapedoesn'talreadyhaveashadow,thisexampleaddsonetoit.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Shadow
.Visible=True
.OffsetX=5
.OffsetY=-3
EndWith
![Page 1782: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1782.jpg)
OffsetYPropertyReturnsorsetstheverticaloffsetoftheshadowfromthespecifiedshape,inpoints.Apositivevalueoffsetstheshadowtotherightoftheshape;anegativevalueoffsetsittotheleft.Read/writeSingle.
![Page 1783: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1783.jpg)
Remarks
Ifyouwanttonudgeashadowhorizontallyorverticallyfromitscurrentpositionwithouthavingtospecifyanabsoluteposition,usetheIncrementOffsetXmethodortheIncrementOffsetYmethod.
![Page 1784: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1784.jpg)
Example
ThisexamplesetsthehorizontalandverticaloffsetsoftheshadowforshapethreeonmyDocument.Theshadowisoffset5pointstotherightoftheshapeand3pointsaboveit.Iftheshapedoesn'talreadyhaveashadow,thisexampleaddsonetoit.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Shadow
.Visible=True
.OffsetX=5
.OffsetY=-3
EndWith
![Page 1785: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1785.jpg)
OLEFormatPropertyReturnsanOLEFormatobjectthatcontainsOLEformattingpropertiesforthespecifiedshape.AppliestoShapeorShapeRangeobjectsthatrepresentOLEobjects.Read-only
![Page 1786: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1786.jpg)
Example
ThisexampleloopsthroughalltheobjectsonalltheslidesintheactivepresentationandsetsalllinkedMicrosoftWorddocumentstobeupdatedmanually.
ForEachsldInActivePresentation.Slides
ForEachshInsld.Shapes
Ifsh.Type=msoLinkedOLEObjectThen
Ifsh.OLEFormat.ProgID="Word.Document"Then
sh.LinkFormat.AutoUpdate=ppUpdateOptionManual
EndIf
EndIf
Next
Next
![Page 1787: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1787.jpg)
OperatingSystemPropertyReturnsthenameoftheoperatingsystem.Read-onlyString.
![Page 1788: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1788.jpg)
Example
ThisexampleteststheOperatingSystempropertytoseewhetherPowerPointisrunningwitha32-bitversionofMicrosoftWindows.
os=Application.OperatingSystem
IfInStr(os,"Windows(32-bit)")<>0Then
MsgBox"Runninga32-bitversionofMicrosoftWindows"
EndIf
![Page 1789: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1789.jpg)
OptionsPropertyReturnsanOptionsobjectthatrepresentsapplicationoptionsinMicrosoftPowerPoint.
expression.Options
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 1790: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1790.jpg)
Example
UsetheOptionspropertytoreturntheOptionsobject.ThefollowingexamplesetsthreeapplicationoptionsforPowerPoint.
SubTogglePasteOptionsButton()
WithApplication.Options
If.DisplayPasteOptions=FalseThen
.DisplayPasteOptions=True
EndIf
EndWith
EndSub
![Page 1791: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1791.jpg)
ShowAll
![Page 1792: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1792.jpg)
OrganizeInFolderPropertyDetermineswhetherallsupportingfiles,suchasbackgroundtexturesandgraphics,areorganizedinaseparatefolderwhenyousaveorpublishthespecifiedpresentationasaWebpage.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseSupportingfilesaresavedinthesamefolderastheWebpage.msoTriStateMixedmsoTriStateTogglemsoTrueDefault.Allsupportingfiles,suchasbackgroundtexturesandgraphics,areorganizedinaseparatefolderwhenyousaveorpublishthespecifiedpresentationasaWebpage.
![Page 1793: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1793.jpg)
Remarks
ThenewfolderiscreatedwithinthefolderwhereyouhavesavedtheWebpage,andisnamedafterthepresentation.IftheUseLongFileNamespropertyissettoTrue,asuffixisaddedtothefoldername.
IfyousaveapresentationthatwaspreviouslysavedwiththeOrganizeInFolderpropertysettoadifferentvalue,MicrosoftPowerPointautomaticallymovesthesupportingfilesintooroutofthefolderasappropriate.
Ifyoudon'tuselongfilenames(thatis,iftheUseLongFileNamespropertyissettoFalse),PowerPointautomaticallysavesanysupportingfilesinaseparatefolder.ThefilescannotbesavedinthesamefolderastheWebpage.
![Page 1794: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1794.jpg)
Example
ThisexamplespecifiesthatallsupportingfilesaresavedinthesamefolderwhenpresentationtwoissavedorpublishedasaWebpage.
Presentations(2).WebOptions.OrganizeInFolder=msoFalse
![Page 1795: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1795.jpg)
ShowAll
![Page 1796: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1796.jpg)
OrientationPropertyReturnsorsetstextorientation.Read/writeMsoTextOrientation.Someoftheseconstantsmaynotbeavailabletoyou,dependingonthelanguagesupport(U.S.English,forexample)thatyou’veselectedorinstalled.
MsoTextOrientationcanbeoneoftheseMsoTextOrientationconstants.msoTextOrientationDownwardmsoTextOrientationHorizontalmsoTextOrientationHorizontalRotatedFarEastmsoTextOrientationMixedmsoTextOrientationUpwardmsoTextOrientationVerticalmsoTextOrientationVerticalFarEast
expression.Orientation
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1797: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1797.jpg)
Example
ThisexampleorientsthetexthorizontallywithinshapethreeonmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(3).TextFrame_
.Orientation=msoTextOrientationHorizontal
![Page 1798: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1798.jpg)
ShowAll
![Page 1799: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1799.jpg)
OutputTypePropertyReturnsorsetsavaluethatindicateswhichcomponent(slides,handouts,notespages,oranoutline)ofthepresentationistobeprinted.Read/writePpPrintOutputType.
PpPrintOutputTypecanbeoneofthesePpPrintOutputTypeconstants.ppPrintOutputBuildSlidesppPrintOutputFourSlideHandoutsppPrintOutputNineSlideHandoutsppPrintOutputNotesPagesppPrintOutputOneSlideHandoutsppPrintOutputOutlineppPrintOutputSixSlideHandoutsppPrintOutputSlidesppPrintOutputThreeSlideHandoutsppPrintOutputTwoSlideHandouts
expression.OutputType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1800: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1800.jpg)
Example
Thisexampleprintshandoutsoftheactivepresentationwithsixslidestoapage.
WithActivePresentation
.PrintOptions.OutputType=ppPrintOutputSixSlideHandouts
.PrintOut
EndWith
![Page 1801: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1801.jpg)
PageSetupPropertyReturnsaPageSetupobjectwhosepropertiescontrolslidesetupattributesforthespecifiedpresentation.Read-only.
![Page 1802: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1802.jpg)
Example
Thefollowingexamplesetstheslidesizeandslideorientationforthepresentationnamed"Pres1."
WithPresentations("pres1").PageSetup
.SlideSize=ppSlideSize35MM
.SlideOrientation=msoOrientationHorizontal
EndWith
![Page 1803: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1803.jpg)
ShowAll
![Page 1804: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1804.jpg)
PanesPropertyReturnsaPanescollectionthatrepresentsthepanesinthedocumentwindow.Read-only.
![Page 1805: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1805.jpg)
Example
Thisexampletestsforthenumberofpanesintheactivewindow.Ifthevalueisone,indicatinganyviewotherthatnormalview,normalviewisactivated.
IfActiveWindow.Panes.Count=1Then
ActiveWindow.ViewType=ppViewNormal
EndIf
![Page 1806: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1806.jpg)
ParagraphPropertyReturnsorsetsaLongthatrepresentstheparagraphinatextrangetowhichtoapplyanimationeffects.Read/write.
expression.Paragraph
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1807: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1807.jpg)
ParagraphFormatPropertyReturnsaParagraphFormatobjectthatrepresentsparagraphformattingforthespecifiedtext.Read-only.
![Page 1808: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1808.jpg)
Example
Thisexamplesetsthelinespacingbefore,within,andaftereachparagraphinshapetwoonslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(2).Shapes(2)
With.TextFrame.TextRange.ParagraphFormat
.LineRuleWithin=msoTrue
.SpaceWithin=1.4
.LineRuleBefore=msoTrue
.SpaceBefore=0.25
.LineRuleAfter=msoTrue
.SpaceAfter=0.75
EndWith
EndWith
![Page 1809: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1809.jpg)
ParentPropertyReturnstheparentobjectforthespecifiedobject.
expression.Parent
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1810: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1810.jpg)
Example
Thisexampleaddsanovalcontainingtexttoslideoneintheactivepresentationandrotatestheovalandthetext45degrees.TheparentobjectforthetextframeistheShapeobjectthatcontainsthetext.
SetmyShapes=ActivePresentation.Slides(1).Shapes
WithmyShapes.AddShape(Type:=msoShapeOval,Left:=50,_
Top:=50,Width:=300,Height:=150).TextFrame
.TextRange.Text="Testtext"
.Parent.Rotation=45
EndWith
![Page 1811: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1811.jpg)
ParentGroupPropertyReturnsaShapeobjectthatrepresentsthecommonparentshapeofachildshapeorarangeofchildshapes.
expression.ParentGroup
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1812: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1812.jpg)
Example
Thisexamplecreatestwoshapesonthefirstslideintheactivepresentationandgroupsthoseshapes;thenusingoneshapeinthegroup,accessestheparentgroupandfillsallshapesintheparentgroupwiththesamefillcolor.Thisexampleassumesthatthefirstslideoftheactivepresentationdoesnotcurrentlycontainanyshapes.Ifitdoes,youwillreceiveanerror.
SubParentGroup()
DimsldNewSlideAsSlide
DimshpParentGroupAsShape
'Addtwoshapestoactivedocumentandgroup
SetsldNewSlide=ActivePresentation.Slides_
.Add(Index:=1,Layout:=ppLayoutBlank)
WithsldNewSlide.Shapes
.AddShapeType:=msoShapeBalloon,Left:=72,_
Top:=72,Width:=100,Height:=100
.AddShapeType:=msoShapeOval,Left:=110,_
Top:=120,Width:=100,Height:=100
.Range(Array(1,2)).Group
EndWith
SetshpParentGroup=ActivePresentation.Slides(1).Shapes(1)_
.GroupItems(1).ParentGroup
shpParentGroup.Fill.ForeColor.RGB=RGB_
(Red:=151,Green:=51,Blue:=250)
EndSub
![Page 1813: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1813.jpg)
PasswordPropertyReturnsorsetsaStringthatrepresentsapasswordthatmustbesuppliedtoopenthespecifiedpresentation.Read/write.
expression.Password
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1814: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1814.jpg)
Example
ThisexampleopensEarnings.ppt,setsapasswordforit,andthenclosesthepresentation.
SubSetPassword()
WithPresentations.Open(FileName:="C:\MyDocuments\Earnings.ppt")
.Password=complexstrPWD'globalvariable
.Save
.Close
EndWith
EndSub
![Page 1815: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1815.jpg)
PasswordEncryptionAlgorithmPropertyReturnsaStringindicatingthealgorithmMicrosoftPowerPointusesforencryptingdocumentswithpasswords.Read-only.
expression.PasswordEncryptionAlgorithm
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1816: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1816.jpg)
Remarks
UsetheSetPasswordEncryptionOptionsmethodtospecifythealgorithmPowerPointusesforencryptingdocumentswithpasswords.
![Page 1817: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1817.jpg)
Example
ThisexamplesetsthepasswordencryptionoptionsifthepasswordencryptionalgorithminuseisnotRC4.
SubPasswordSettings()
WithActivePresentation
If.PasswordEncryptionAlgorithm<>"RC4"Then
.SetPasswordEncryptionOptions_
PasswordEncryptionProvider:="MicrosoftRSASChannelCryptographicProvider",_
PasswordEncryptionAlgorithm:="RC4",_
PasswordEncryptionKeyLength:=56,_
PasswordEncryptionFileProperties:=True
EndIf
EndWith
EndSub
![Page 1818: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1818.jpg)
ShowAll
![Page 1819: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1819.jpg)
PasswordEncryptionFilePropertiesPropertyReturnsMsoTrueifMicrosoftPowerPointencryptsfilepropertiesforpassword-protecteddocuments.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrue
expression.PasswordEncryptionFileProperties
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1820: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1820.jpg)
Remarks
UsetheSetPasswordEncryptionOptionsmethodtospecifythealgorithmPowerPointusesforencryptingdocumentswithpasswords.
![Page 1821: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1821.jpg)
Example
Thisexamplesetsthepasswordencryptionoptionsifthefilepropertiesarenotencryptedforpassword-protecteddocuments.
SubPasswordSettings()
WithActivePresentation
If.PasswordEncryptionFileProperties=msoFalseThen
.SetPasswordEncryptionOptions_
PasswordEncryptionProvider:="MicrosoftRSASChannelCryptographicProvider",_
PasswordEncryptionAlgorithm:="RC4",_
PasswordEncryptionKeyLength:=56,_
PasswordEncryptionFileProperties:=True
EndIf
EndWith
EndSub
![Page 1822: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1822.jpg)
PasswordEncryptionKeyLengthPropertyReturnsaLongindicatingthekeylengthofthealgorithmMicrosoftPowerPointuseswhenencryptingdocumentswithpasswords.Read-only.
expression.PasswordEncryptionKeyLength
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1823: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1823.jpg)
Remarks
UsetheSetPasswordEncryptionOptionsmethodtospecifythealgorithmPowerPointusesforencryptingdocumentswithpasswords.
![Page 1824: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1824.jpg)
Example
Thisexamplesetsthepasswordencryptionoptionsifthepasswordencryptionkeylengthislessthan40.
SubPasswordSettings()
WithActivePresentation
If.PasswordEncryptionKeyLength<40Then
.SetPasswordEncryptionOptions
_
PasswordEncryptionProvider:="MicrosoftRSASChannelCryptographicProvider",_
PasswordEncryptionAlgorithm:="RC4",_
PasswordEncryptionKeyLength:=56,_
PasswordEncryptionFileProperties:=True
EndIf
EndWith
EndSub
![Page 1825: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1825.jpg)
PasswordEncryptionProviderPropertyReturnsaStringspecifyingthenameofthealgorithmencryptionproviderthatMicrosoftPowerPointuseswhenencryptingdocumentswithpasswords.Read-only.
expression.PasswordEncryptionProvider
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1826: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1826.jpg)
Remarks
UsetheSetPasswordEncryptionOptionsmethodtospecifythealgorithmPowerPointusesforencryptingdocumentswithpasswords.
![Page 1827: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1827.jpg)
Example
ThisexamplesetsthepasswordencryptionoptionsifthepasswordencryptionalgorithminuseisnottheMicrosoftRSASChannelCryptographicProvider.
SubPasswordSettings()
WithActivePresentation
If.PasswordEncryptionProvider<>"MicrosoftRSASChannelCryptographicProvider"Then
.SetPasswordEncryptionOptions_
PasswordEncryptionProvider:="MicrosoftRSASChannelCryptographicProvider",_
PasswordEncryptionAlgorithm:="RC4",_
PasswordEncryptionKeyLength:=56,_
PasswordEncryptionFileProperties:=True
EndIf
EndWith
EndSub
![Page 1828: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1828.jpg)
PathPropertyReturnsaStringthatrepresentsthepathtothespecifiedAddIn,Application,orPresentationobjectorthepathfollowedbyaMotionEffectobject.Read-only.
expression.Path
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1829: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1829.jpg)
Remarks
Ifyouusethispropertytoreturnapathforapresentationthathasnotbeensaved,itreturnsanemptystring.Usingthispropertytoreturnthepathforanadd-inthathasnotbeenloadedcausesanerror.
Thepathdoesn'tincludethefinalbackslash(\)orthenameofthespecifiedobject.UsetheNamepropertyofthePresentationobjecttoreturnthefilenamewithoutthepath,andusetheFullNamepropertytoreturnthefilenameandthepathtogether.
TheStringreturnedforaMotionEffectobjectisaspecificpaththatthemotioneffectfollowsbetweenFromandTousingthesamesyntaxastheVMLpathdescription.
![Page 1830: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1830.jpg)
Example
ThisexamplesavestheactivepresentationinthesamefolderasPowerPoint.
WithApplication
fName=.Path&"\testpresentation"
ActivePresentation.SaveAsfName
EndWith
![Page 1831: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1831.jpg)
ShowAll
![Page 1832: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1832.jpg)
PatternPropertyPatternpropertyasitappliestotheLineFormatobject.
Setsorreturnsavaluethatrepresentsthepatternappliedtothespecifiedline.Read/writeMsoPatternType.
MsoPatternTypecanbeoneoftheseMsoPatternTypeconstants.msoPattern10PercentmsoPattern20PercentmsoPattern25PercentmsoPattern30PercentmsoPattern40PercentmsoPattern50PercentmsoPattern5PercentmsoPattern60PercentmsoPattern70PercentmsoPattern75PercentmsoPattern80PercentmsoPattern90PercentmsoPatternDarkDownwardDiagonalmsoPatternDarkHorizontalmsoPatternDarkUpwardDiagonalmsoPatternDashedDownwardDiagonalmsoPatternDashedHorizontalmsoPatternDashedUpwardDiagonalmsoPatternDashedVerticalmsoPatternDiagonalBrickmsoPatternDivotmsoPatternDottedDiamondmsoPatternDottedGridmsoPatternHorizontalBrick
![Page 1833: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1833.jpg)
msoPatternLargeCheckerBoardmsoPatternLargeConfettimsoPatternLargeGridmsoPatternLightDownwardDiagonalmsoPatternLightHorizontalmsoPatternLightUpwardDiagonalmsoPatternLightVerticalmsoPatternMixedmsoPatternNarrowHorizontalmsoPatternNarrowVerticalmsoPatternOutlinedDiamondmsoPatternPlaidmsoPatternShinglemsoPatternSmallCheckerBoardmsoPatternSmallConfettimsoPatternSmallGridmsoPatternSolidDiamondmsoPatternSpheremsoPatternTrellismsoPatternWavemsoPatternWeavemsoPatternWideDownwardDiagonalmsoPatternWideUpwardDiagonalmsoPatternZigZagmsoPatternDarkVertical
expression.Pattern
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
PatternpropertyasitappliestotheFillFormatobject.
Setsorreturnsavaluethatrepresentsthepatternappliedtothespecifiedfill.UsetheBackColorandForeColorpropertiestosetthecolorsusedinthepattern.Read-onlyMsoPatternType.
![Page 1834: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1834.jpg)
MsoPatternTypecanbeoneoftheseMsoPatternTypeconstants.msoPattern10PercentmsoPattern20PercentmsoPattern25PercentmsoPattern30PercentmsoPattern40PercentmsoPattern50PercentmsoPattern5PercentmsoPattern60PercentmsoPattern70PercentmsoPattern75PercentmsoPattern80PercentmsoPattern90PercentmsoPatternDarkDownwardDiagonalmsoPatternDarkHorizontalmsoPatternDarkUpwardDiagonalmsoPatternDashedDownwardDiagonalmsoPatternDashedHorizontalmsoPatternDashedUpwardDiagonalmsoPatternDashedVerticalmsoPatternDiagonalBrickmsoPatternDivotmsoPatternDottedDiamondmsoPatternDottedGridmsoPatternHorizontalBrickmsoPatternLargeCheckerBoardmsoPatternLargeConfettimsoPatternLargeGridmsoPatternLightDownwardDiagonalmsoPatternLightHorizontalmsoPatternLightUpwardDiagonalmsoPatternLightVerticalmsoPatternMixed
![Page 1835: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1835.jpg)
msoPatternNarrowHorizontalmsoPatternNarrowVerticalmsoPatternOutlinedDiamondmsoPatternPlaidmsoPatternShinglemsoPatternSmallCheckerBoardmsoPatternSmallConfettimsoPatternSmallGridmsoPatternSolidDiamondmsoPatternSpheremsoPatternTrellismsoPatternWavemsoPatternWeavemsoPatternWideDownwardDiagonalmsoPatternWideUpwardDiagonalmsoPatternZigZagmsoPatternDarkVertical
expression.Pattern
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 1836: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1836.jpg)
Example
AsitappliestotheLineFormatobject.
ThisexampleaddsapatternedlinetomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(10,100,250,0).Line
.Weight=6
.ForeColor.RGB=RGB(0,0,255)
.BackColor.RGB=RGB(128,0,0)
.Pattern=msoPatternDarkDownwardDiagonal
EndWith
AsitappliestotheFillFormatobject.
ThisexampleaddsarectangletomyDocumentandsetsitsfillpatterntomatchthatoftheshapenamed"rect1."Thenewrectanglehasthesamepatternasrect1,butnotnecessarilythesamecolors.ThecolorsusedinthepatternaresetwiththeBackColorandForeColorproperties.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
pattern1=.Item("rect1").Fill.Pattern
With.AddShape(msoShapeRectangle,100,100,120,80).Fill
.ForeColor.RGB=RGB(128,0,0)
.BackColor.RGB=RGB(0,0,255)
.Patternedpattern1
EndWith
EndWith
![Page 1837: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1837.jpg)
ShowAll
![Page 1838: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1838.jpg)
PauseAnimationPropertyDetermineswhethertheslideshowpausesuntilthespecifiedmediaclipisfinishedplaying.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseTheslideshowcontinueswhilethemediaclipplaysinthebackground.msoTriStateMixedmsoTriStateTogglemsoTrueTheslideshowpausesuntilthespecifiedmediaclipisfinishedplaying.
![Page 1839: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1839.jpg)
Remarks
ForthePauseAnimationpropertysettingtotakeeffect,thePlayOnEntrypropertyofthespecifiedshapemustbesettomsoTrue.
![Page 1840: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1840.jpg)
Example
Thisexamplespecifiesthatshapethreeonslideoneintheactivepresentationwillbeplayedautomaticallywhenit'sanimatedandthattheslideshowwon'tcontinuewhilethemovieisplayinginthebackground.Shapethreemustbeasoundormovieobject.
SetOLEobj=ActivePresentation.Slides(1).Shapes(3)
WithOLEobj.AnimationSettings.PlaySettings
.PlayOnEntry=msoTrue
.PauseAnimation=msoTrue
EndWith
![Page 1841: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1841.jpg)
PermissionPropertyReturnsaPermissionobjectthatcanbeusedtorestrictpermissionstotheactivepresentationandtoreturnorsetspecificpermissionssettings.Read-only.
NoteUseofthePermissionobjectraisesanerroriftheWindowsRightsManagementclientisnotinstalled.
expression.Permission
expressionRequired.AnexpressionthatreturnsaPresentationobject.
![Page 1842: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1842.jpg)
Remarks
UsethePermissionobjecttorestrictpermissionstotheactivedocumentandtoreturnorsetspecificpermissionssettings.
UsetheEnabledpropertytodeterminewhetherpermissionsarerestrictedontheactivedocument.UsetheCountpropertytoreturnthenumberofuserswithpermissions,andtheRemoveAllmethodtoresetallexistingpermissions.
TheDocumentAuthor,EnableTrustedBrowser,RequestPermissionURL,andStoreLicensespropertiesprovideadditionalinformationaboutpermissionsettings.
ThePermissionobjectgivesaccesstoacollectionofUserPermissionobjects.UsetheUserPermissionobjecttoassociatespecificsetsofrightswithindividualusers.Whilesomepermissionsgrantedthroughtheuserinterface(suchasmsoPermissionPrint)applytoallusers,youcanusetheUserPermissionobjecttoassignthemonaper-userbasiswithper-userexpirationdates.
InformationRightsManagement,includedinMicrosoftOffice2003,supportstheuseofadministrativepermissionpolicieswhichlistusersandgroupsandtheirdocumentpermissions.UsetheApplyPolicymethodtoapplyapermissionpolicy,andthePermissionFromPolicy,PolicyName,andPolicyDescriptionpropertiestoreturnpolicyinformation.
ThePermissionobjectmodelisavailablewhetherpermissionsarerestrictedontheactivedocumentornot.ThePermissionpropertyofthePresentationobjectdoesnotreturnNothingwhentheactivedocumentdoesnothaverestrictedpermissions.UsetheEnabledpropertytodeterminewhetheradocumenthasrestrictedpermissions.
![Page 1843: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1843.jpg)
Example
Thefollowingexamplecreatesanewpresentationandassignstheuserwithe-mailaddress"[email protected]"readpermissiononthenewpresentation.Theexamplewilldisplaythepermissionsoftheownerandthenewuser.
SubAddUserPermissions()
DimmyPresAsPowerPoint.Presentation
DimmyPerAsOffice.Permission
DimNewOwnerPerAsOffice.UserPermission
SetmyPres=Application.Presentations.Add(msoTrue)
SetmyPer=myPres.Permission
myPer.Enabled=True
SetNewOwnerPer=myPer.Add("[email protected]",msoPermissionRead)
MsgBoxmyPer(1).UserId+""+Str(myPer(1).Permission)
MsgBoxmyPer(2).UserId+""+Str(myPer(2).Permission)
EndSub
![Page 1844: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1844.jpg)
ShowAll
![Page 1845: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1845.jpg)
PerspectivePropertyDetermineswhethertheextrusionappearsinperspective.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseTheextrusionisaparallel,ororthographic,projection—thatis,ifthewallsdon'tnarrowtowardavanishingpoint.msoTriStateMixedmsoTriStateTogglemsoTrueTheextrusionappearsinperspective—thatis,ifthewallsoftheextrusionnarrowtowardavanishingpoint.
![Page 1846: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1846.jpg)
Example
ThisexamplesetstheextrusiondepthforshapeoneonmyDocumentto100pointsandspecifiesthattheextrusionbeparallel,ororthographic.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).ThreeD
.Visible=True
.Depth=100
.Perspective=msoFalse
EndWith
![Page 1847: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1847.jpg)
PictureFormatPropertyReturnsaPictureFormatobjectthatcontainspictureformattingpropertiesforthespecifiedshape.AppliestoShapeorShapeRangeobjectsthatrepresentpicturesorOLEobjects.Read-only.
![Page 1848: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1848.jpg)
Example
ThisexamplesetsthebrightnessandcontrastforshapeoneonmyDocument.ShapeonemustbeapictureoranOLEobject.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).PictureFormat
.Brightness=0.3
.Contrast=.75
EndWith
![Page 1849: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1849.jpg)
PlaceholderFormatPropertyReturnsaPlaceholderFormatobjectthatcontainsthepropertiesthatareuniquetoplaceholders.Read-only.
![Page 1850: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1850.jpg)
Example
Thisexampleaddstexttoplaceholderoneonslideoneintheactivepresentationifthatplaceholderisahorizontaltitleplaceholder.
WithActivePresentation.Slides(1).Shapes.Placeholders
If.Count>0Then
With.Item(1)
SelectCase.PlaceholderFormat.Type
CaseppPlaceholderTitle
.TextFrame.TextRange="TitleText"
CaseppPlaceholderCenterTitle
.TextFrame.TextRange="CenteredTitleText"
CaseElse
MsgBox"There'snohorizontal"&_
"titleonthisslide"
EndSelect
EndWith
EndIf
EndWith
![Page 1851: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1851.jpg)
PlaceholdersPropertyReturnsaPlaceholderscollectionthatrepresentsthecollectionofalltheplaceholdersonaslide.Eachplaceholderinthecollectioncancontaintext,achart,atable,anorganizationalchart,oranotherobject.Read-only.
![Page 1852: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1852.jpg)
Example
Thisexampleaddsaslidetotheactivepresentationandthenaddstexttoboththetitle(whichisthefirstplaceholderontheslide)andthesubtitle.
SetmyDocument=ActivePresentation.Slides(1)
WithActivePresentation.Slides_
.Add(1,ppLayoutTitle).Shapes.Placeholders
.Item(1).TextFrame.TextRange.Text="Thisisthetitletext"
.Item(2).TextFrame.TextRange.Text="Thisissubtitletext"
EndWith
![Page 1853: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1853.jpg)
ShowAll
![Page 1854: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1854.jpg)
PlayOnEntryPropertyDetermineswhetherthespecifiedmovieorsoundisplayedautomaticallywhenit'sanimated.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedmovieorsoundisplayedautomaticallywhenit'sanimated.
![Page 1855: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1855.jpg)
Remarks
SettingthispropertytomsoTruesetstheAnimatepropertyoftheAnimationSettingsobjecttomsoTrue.SettingtheAnimatepropertytomsoFalseautomaticallysetsthePlayOnEntrypropertytomsoFalse.
UsetheActionVerbpropertytosettheverbthatwillbeinvokedwhenthemediaclipisanimated.
![Page 1856: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1856.jpg)
Example
Thisexamplespecifiesthatshapethreeonslideoneintheactivepresentationwillbeplayedautomaticallywhenit'sanimated.Shapethreemustbeasoundormovieobject.
SetOLEobj=ActivePresentation.Slides(1).Shapes(3)
OLEobj.AnimationSettings.PlaySettings.PlayOnEntry=msoTrue
![Page 1857: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1857.jpg)
PlaySettingsPropertyReturnsaPlaySettingsobjectthatcontainsinformationabouthowthespecifiedmediaclipplaysduringaslideshow.
expression.PlaySettings
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1858: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1858.jpg)
Example
ThisexampleinsertsamovienamedClock.aviontoslideoneintheactivepresentation,setsittoplayautomaticallyaftertheslidetransition,andspecifiesthatthemovieobjectbehiddenduringaslideshowexceptwhenit'splaying.
WithActivePresentation.Slides(1).Shapes.AddOLEObject(Left:=10,_
Top:=10,Width:=250,Height:=250,_
FileName:="c:\winnt\Clock.avi")
With.AnimationSettings.PlaySettings
.PlayOnEntry=True
.HideWhileNotPlaying=True
EndWith
EndWith
![Page 1859: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1859.jpg)
ShowAll
![Page 1860: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1860.jpg)
PointerColorPropertyPointerColorPropertyasitappliestotheSlideShowSettingsobject.
ReturnsthepointercolorforthespecifiedpresentationasaColorFormatobject.Thiscolorissavedwiththepresentationandisthedefaultpencoloreachtimeyoushowthepresentation.Read-only.
PointerColorPropertyasitappliestotheSlideShowViewobject.
ReturnsaColorFormatobjectthatrepresentsthepointercolorforthespecifiedpresentationduringoneslideshow.Assoonastheslideshowisfinished,thecolorrevertstothedefaultcolorforthepresentation.Read-only.
![Page 1861: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1861.jpg)
Remarks
Tochangethepointertoapen,setthePointerTypepropertytoppSlideShowPointerPen.
![Page 1862: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1862.jpg)
Example
AsitappliestotheSlideShowSettingsobject.
Thisexamplesetsthedefaultpencolorfortheactivepresentationtoblue,startsaslideshow,changesthepointertoapen,andthensetsthepencolortoredforthisslideshowonly.
WithActivePresentation.SlideShowSettings
.PointerColor.RGB=RGB(0,0,255)'blue
With.Run.View
.PointerColor.RGB=RGB(255,0,0)'red
.PointerType=ppSlideShowPointerPen
EndWith
EndWith
![Page 1863: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1863.jpg)
ShowAll
![Page 1864: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1864.jpg)
PointerTypePropertyReturnsorsetsthetypeofpointerusedintheslideshow.Read/writePpSlideShowPointerType.
PpSlideShowPointerTypecanbeoneofthesePpSlideShowPointerTypeconstants.ppSlideShowPointerAlwaysHiddenppSlideShowPointerArrowppSlideShowPointerAutoArrowppSlideShowPointerNoneppSlideShowPointerPen
expression.PointerType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1865: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1865.jpg)
Example
Thisexamplerunsaslideshowoftheactivepresentation,changesthepointertoapen,andsetsthepencolorforthisslideshowtored.
SetcurrView=ActivePresentation.SlideShowSettings.Run.View
WithcurrView
.PointerColor.RGB=RGB(255,0,0)
.PointerType=ppSlideShowPointerPen
EndWith
![Page 1866: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1866.jpg)
ShowAll
![Page 1867: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1867.jpg)
PointsPropertyPointspropertyasitappliestothePropertyEffectobject.
ReturnsanAnimationPointsobjectthatrepresentsapointinananimation.UsetheFromandTopropertiestosetthevalueofthisproperty.
expression.Points
expressionRequired.AnexpressionthatreturnsaPropertyEffectobject.
PointspropertyasitappliestotheShapeNodeobject.
ReturnsaVariantthatrepresentsthepositionofthespecifiednodeasacoordinatepair.Eachcoordinateisexpressedinpoints.UsetheSetPositionmethodtosetthevalueofthisproperty.Read-only.
expression.Points
expressionRequired.AnexpressionthatreturnsaShapeNodeobject.
![Page 1868: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1868.jpg)
Example
AsitappliestotheShapeNodeobject.
Thisexamplemovesnodetwoinshapethreeintheactivepresentationtotheright200pointsanddown300points.Shapethreemustbeafreeformdrawing.
WithActivePresentation.Slides(1).Shapes(3).Nodes
pointsArray=.Item(2).Points
currXvalue=pointsArray(1,1)
currYvalue=pointsArray(1,2)
.SetPositionIndex:=2,X1:=currXvalue+200,Y1:=currYvalue+300
EndWith
![Page 1869: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1869.jpg)
PositionPropertyReturnsorsetsthepositionofthespecifiedtabstop,inpoints.Read/writeSingle.
![Page 1870: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1870.jpg)
Example
Thisexampledeletesalltabstopsgreaterthan1inch(72points)forthetextinshapetwoonslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Shapes(2).TextFrame_
.Ruler.TabStops
Fori=.CountTo1Step-1
With.Item(i)
If.Position>72Then.Clear
EndWith
Next
EndWith
![Page 1871: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1871.jpg)
PresentationPropertyReturnsaPresentationobjectthatrepresentsthepresentationinwhichthespecifieddocumentwindoworslideshowwindowwascreated.Read-only.
![Page 1872: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1872.jpg)
Remarks
Iftheslidethat'scurrentlydisplayedindocumentwindowoneisfromanembeddedpresentation,Windows(1).View.Slide.Parentreturnstheembeddedpresentation,andWindows(1).Presentationreturnsthepresentationinwhichdocumentwindowonewascreated.
Iftheslidethat'scurrentlydisplayedinslideshowwindowoneisfromanembeddedpresentation,SlideShowWindows(1).View.Slide.Parentreturnstheembeddedpresentation,andSlideShowWindows(1).Presentationreturnsthepresentationinwhichtheslideshowwasstarted.
![Page 1873: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1873.jpg)
Example
Thisexamplecontinuestheslidenumberingforthepresentationinwindowoneintotheslidenumberingforthepresentationinwindowtwo.
firstPresSlides=Windows(1).Presentation.Slides.Count
Windows(2).Presentation.PageSetup_
.FirstSlideNumber=firstPresSlides+1
![Page 1874: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1874.jpg)
PresentationElapsedTimePropertyReturnsthenumberofsecondsthathaveelapsedsincethebeginningofthespecifiedslideshow.Read-onlyLong.
![Page 1875: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1875.jpg)
Example
Thisexamplegoestoslideseveninslideshowwindowoneifmorethanfiveminuteshaveelapsedsincethebeginningoftheslideshow.
WithSlideShowWindows(1).View
If.PresentationElapsedTime>300Then
.GotoSlide7
EndIf
EndWith
![Page 1876: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1876.jpg)
PresentationsPropertyReturnsaPresentationscollectionthatrepresentsallopenpresentations.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1877: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1877.jpg)
Example
Thisexampleopensthepresentationnamed"LongVersion.ppt."
Application.Presentations.Open_
FileName:="c:\MyDocuments\Longversion.ppt"
Thisexamplesavespresentationoneas"Year-EndReport.ppt."
Application.Presentations(1).SaveAs"Year-EndReport"
ThisexampleclosestheYear-endreportpresentation.
Application.Presentations("Year-EndReport.ppt").Close
![Page 1878: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1878.jpg)
ShowAll
![Page 1879: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1879.jpg)
PreservedPropertySetsorreturnsanMsoTriStateconstantthatrepresentswhetheradesignmasterispreservedfromchanges.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseThedesignmasterisnotpreservedandcanbeedited.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueThedesignmasterispreservedandcannotbeedited.
expression.Preserved
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1880: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1880.jpg)
Example
Thefollowinglineofcodelocksandpreservesthefirstdesignmaster.
SubPreserveMaster
ActivePresentation.Designs(1).Preserved=msoTrue
EndSub
![Page 1881: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1881.jpg)
ShowAll
![Page 1882: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1882.jpg)
PresetExtrusionDirectionPropertyReturnsthedirectionthattheextrusion'ssweeppathtakesawayfromtheextrudedshape(thefrontfaceoftheextrusion).Read-onlyMsoPresetExtrusionDirection.
MsoPresetExtrusionDirectioncanbeoneoftheseMsoPresetExtrusionDirectionconstants.msoExtrusionBottommsoExtrusionBottomLeftmsoExtrusionBottomRightmsoExtrusionLeftmsoExtrusionNonemsoExtrusionRightmsoExtrusionTopmsoExtrusionTopLeftmsoExtrusionTopRightmsoPresetExtrusionDirectionMixed
expression.PresetExtrusionDirection
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1883: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1883.jpg)
Remarks
Thispropertyisread-only.Tosetthevalueofthisproperty,usetheSetExtrusionDirectionmethod.
![Page 1884: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1884.jpg)
Example
ThisexamplechangeseachextrusiononmyDocumentthatextendstowardtheupper-leftcorneroftheextrusion'sfrontfacetoanextrusionthatextendstowardthelower-rightcornerofthefrontface.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Withs.ThreeD
If.PresetExtrusionDirection=msoExtrusionTopLeftThen
.SetExtrusionDirectionmsoExtrusionBottomRight
EndIf
EndWith
Next
![Page 1885: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1885.jpg)
ShowAll
![Page 1886: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1886.jpg)
PresetGradientTypePropertyReturnsthepresetgradienttypeforthespecifiedfill.Read-onlyMsoPresetGradientType.UsethePresetGradientmethodtosetthepresetgradienttypeforthefill.
MsoPresetGradientTypecanbeoneoftheseMsoPresetGradientTypeconstants.msoGradientBrassmsoGradientCalmWatermsoGradientChromemsoGradientChromeIImsoGradientDaybreakmsoGradientDesertmsoGradientEarlySunsetmsoGradientFiremsoGradientFogmsoGradientGoldmsoGradientGoldIImsoGradientHorizonmsoGradientLateSunsetmsoGradientMahoganymsoGradientMossmsoGradientNightfallmsoGradientOceanmsoGradientParchmentmsoGradientPeacockmsoGradientRainbowmsoGradientRainbowIImsoGradientSapphiremsoGradientSilvermsoGradientWheatmsoPresetGradientMixed
![Page 1887: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1887.jpg)
expression.PresetGradientType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1888: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1888.jpg)
Example
ThisexamplechangesthefillforallshapesinmyDocumentwiththeMosspresetgradientfilltotheFogpresetgradientfill.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Withs.Fill
If.PresetGradientType=msoGradientMossThen
.PresetGradient=msoGradientFog
EndIf
EndWith
Next
![Page 1889: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1889.jpg)
ShowAll
![Page 1890: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1890.jpg)
PresetLightingDirectionPropertyReturnsorsetsthepositionofthelightsourcerelativetotheextrusion.Read/writeMsoPresetLightingDirection.
MsoPresetLightingDirectioncanbeoneoftheseMsoPresetLightingDirectionconstants.msoLightingBottommsoLightingBottomLeftmsoLightingBottomRightmsoLightingLeftmsoLightingNonemsoLightingRightmsoLightingTopmsoLightingTopLeftmsoLightingTopRightmsoPresetLightingDirectionMixed
expression.PresetLightingDirection
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
NoteYouwon'tseethelightingeffectsyousetiftheextrusionhasawireframesurface.
![Page 1891: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1891.jpg)
Example
ThisexamplespecifiesthattheextrusionforshapeoneonmyDocumentextendtowardthetopoftheshapeandthatthelightingfortheextrusioncomefromtheleft.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).ThreeD
.Visible=True
.SetExtrusionDirectionmsoExtrusionTop
.PresetLightingDirection=msoLightingLeft
EndWith
![Page 1892: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1892.jpg)
ShowAll
![Page 1893: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1893.jpg)
PresetLightingSoftnessPropertyReturnsorsetstheintensityoftheextrusionlighting.Read/writeMsoPresetLightingSoftness.
MsoPresetLightingSoftnesscanbeoneoftheseMsoPresetLightingSoftnessconstants.msoLightingBrightmsoLightingDimmsoLightingNormalmsoPresetLightingSoftnessMixed
expression.PresetLightingSoftness
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1894: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1894.jpg)
Example
ThisexamplespecifiesthattheextrusionforshapeoneonmyDocumentbelitbrightlyfromtheleft.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).ThreeD
.Visible=True
.PresetLightingSoftness=msoLightingBright
.PresetLightingDirection=msoLightingLeft
EndWith
![Page 1895: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1895.jpg)
ShowAll
![Page 1896: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1896.jpg)
PresetMaterialPropertyReturnsorsetstheextrusionsurfacematerial.Read/writeMsoPresetMaterial.
MsoPresetMaterialcanbeoneoftheseMsoPresetMaterialconstants.msoMaterialMattemsoMaterialMetalmsoMaterialPlasticmsoMaterialWireFramemsoPresetMaterialMixed
expression.PresetMaterial
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1897: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1897.jpg)
Example
ThisexamplespecifiesthattheextrusionsurfaceforshapeoneinmyDocumentbewireframe.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).ThreeD
.Visible=True
.PresetMaterial=msoMaterialWireFrame
EndWith
![Page 1898: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1898.jpg)
ShowAll
![Page 1899: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1899.jpg)
PresetShapePropertyReturnsorsetstheshapeofthespecifiedWordArt.Read/writeMsoPresetTextEffectShape.
MsoPresetTextEffectShapecanbeoneoftheseMsoPresetTextEffectShapeconstants.msoTextEffectShapeArchDownCurvemsoTextEffectShapeArchDownPourmsoTextEffectShapeArchUpCurvemsoTextEffectShapeArchUpPourmsoTextEffectShapeButtonCurvemsoTextEffectShapeButtonPourmsoTextEffectShapeCanDownmsoTextEffectShapeCanUpmsoTextEffectShapeCascadeDownmsoTextEffectShapeCascadeUpmsoTextEffectShapeChevronDownmsoTextEffectShapeChevronUpmsoTextEffectShapeCircleCurvemsoTextEffectShapeCirclePourmsoTextEffectShapeCurveDownmsoTextEffectShapeCurveUpmsoTextEffectShapeDeflatemsoTextEffectShapeDeflateBottommsoTextEffectShapeDeflateInflatemsoTextEffectShapeDeflateInflateDeflatemsoTextEffectShapeDeflateTopmsoTextEffectShapeDoubleWave2msoTextEffectShapeFadeDownmsoTextEffectShapeFadeLeftmsoTextEffectShapeFadeRight
![Page 1900: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1900.jpg)
msoTextEffectShapeFadeUpmsoTextEffectShapeInflatemsoTextEffectShapeInflateBottommsoTextEffectShapeInflateTopmsoTextEffectShapeMixedmsoTextEffectShapePlainTextmsoTextEffectShapeRingInsidemsoTextEffectShapeRingOutsidemsoTextEffectShapeSlantDownmsoTextEffectShapeSlantUpmsoTextEffectShapeStopmsoTextEffectShapeTriangleDownmsoTextEffectShapeTriangleUpmsoTextEffectShapeWave1msoTextEffectShapeWave2msoTextEffectShapeDoubleWave1
expression.PresetShape
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1901: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1901.jpg)
Remarks
SettingthePresetTextEffectpropertyautomaticallysetsthePresetShapeproperty.
![Page 1902: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1902.jpg)
Example
ThisexamplesetstheshapeofallWordArtonmyDocumenttoachevronwhosecenterpointsdown.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Ifs.Type=msoTextEffectThen
s.TextEffect.PresetShape=msoTextEffectShapeChevronDown
EndIf
Next
![Page 1903: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1903.jpg)
ShowAll
![Page 1904: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1904.jpg)
PresetTextEffectPropertyReturnsorsetsthestyleofthespecifiedWordArt.ThevaluesforthispropertycorrespondtotheformatsintheWordArtGallerydialogbox(numberedfromlefttoright,toptobottom).Read/writeMsoPresetTextEffect.
MsoPresetTextEffectcanbeoneoftheseMsoPresetTextEffectconstants.msoTextEffect1msoTextEffect2msoTextEffect3msoTextEffect4msoTextEffect5msoTextEffect6msoTextEffect7msoTextEffect8msoTextEffect9msoTextEffect10msoTextEffect11msoTextEffect12msoTextEffect13msoTextEffect14msoTextEffect15msoTextEffect16msoTextEffect17msoTextEffect18msoTextEffect19msoTextEffect20msoTextEffect21msoTextEffect22msoTextEffect23msoTextEffect24msoTextEffect25
![Page 1905: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1905.jpg)
msoTextEffect26msoTextEffect27msoTextEffect28msoTextEffect29msoTextEffect30msoTextEffectMixed
expression.PresetTextEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1906: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1906.jpg)
Remarks
SettingthePresetTextEffectpropertyautomaticallysetsmanyotherformattingpropertiesofthespecifiedshape.
![Page 1907: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1907.jpg)
Example
ThisexamplesetsthestyleforallWordArtonmyDocumenttothefirststylelistedintheWordArtGallerydialogbox.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Ifs.Type=msoTextEffectThen
s.TextEffect.PresetTextEffect=msoTextEffect1
EndIf
Next
![Page 1908: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1908.jpg)
ShowAll
![Page 1909: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1909.jpg)
PresetTexturePropertyReturnsthepresettextureforthespecifiedfill.Read-onlyMsoPresetTexture.
MsoPresetTexturecanbeoneoftheseMsoPresetTextureconstants.msoPresetTextureMixedmsoTextureBlueTissuePapermsoTextureBouquetmsoTextureBrownMarblemsoTextureCanvasmsoTextureCorkmsoTextureDenimmsoTextureFishFossilmsoTextureGranitemsoTextureGreenMarblemsoTextureMediumWoodmsoTextureNewsprintmsoTextureOakmsoTexturePaperBagmsoTexturePapyrusmsoTextureParchmentmsoTexturePinkTissuePapermsoTexturePurpleMeshmsoTextureRecycledPapermsoTextureSandmsoTextureStationerymsoTextureWalnutmsoTextureWaterDropletsmsoTextureWhiteMarblemsoTextureWovenMat
expression.PresetTexture
![Page 1910: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1910.jpg)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
UsethePresetTexturedmethodtosetthepresettextureforthefill.
![Page 1911: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1911.jpg)
Example
ThisexampleaddsarectangletothemyDocumentandsetsitspresettexturetomatchthatofshapetwo.Fortheexampletowork,shapetwomusthaveapresettexturedfill.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
presetTexture2=.Item(2).Fill.PresetTexture
.AddShape(msoShapeRectangle,100,0,40,80).Fill_
.PresetTexturedpresetTexture2
EndWith
![Page 1912: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1912.jpg)
ShowAll
![Page 1913: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1913.jpg)
PresetThreeDFormatPropertyReturnsthepresetextrusionformat.Eachpresetextrusionformatcontainsasetofpresetvaluesforthevariouspropertiesoftheextrusion.Thevaluesforthispropertycorrespondtotheoptions(numberedfromlefttoright,toptobottom)displayedwhenyouclickthe3-DbuttonontheDrawingtoolbar.Read-onlyMsoPresetThreeDFormat.
MsoPresetThreeDFormatcanbeoneoftheseMsoPresetThreeDFormatconstants.msoPresetThreeDFormatMixedTheextrusionhasacustomformatratherthanapresetformat.msoThreeD1msoThreeD2msoThreeD3msoThreeD4msoThreeD5msoThreeD6msoThreeD7msoThreeD8msoThreeD9msoThreeD10msoThreeD11msoThreeD12msoThreeD13msoThreeD14msoThreeD15msoThreeD16msoThreeD17msoThreeD18msoThreeD19msoThreeD20
![Page 1914: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1914.jpg)
expression.PresetThreeDFormat
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1915: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1915.jpg)
Remarks
Thispropertyisread-only.Tosetthepresetextrusionformat,usetheSetThreeDFormatmethod.
![Page 1916: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1916.jpg)
Example
ThisexamplesetstheextrusionformatforshapeoneonmyDocumentto3DStyle12iftheshapeinitiallyhasacustomextrusionformat.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).ThreeD
If.PresetThreeDFormat=msoPresetThreeDFormatMixedThen
.SetThreeDFormatmsoThreeD12
EndIf
EndWith
![Page 1917: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1917.jpg)
ShowAll
![Page 1918: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1918.jpg)
PrintColorTypePropertyReturnsorsetsthewaythespecifieddocumentwillbeprinted:inblackandwhite,inpureblackandwhite(alsoreferredtoashighcontrast),orincolor.Thedefaultvalueissetbytheprinter.Read/writePpPrintColorType.
PpPrintColorTypecanbeoneofthesePpPrintColorTypeconstants.ppPrintBlackAndWhiteppPrintColorppPrintPureBlackAndWhite
expression.PrintColorType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1919: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1919.jpg)
Example
Thisexampleprintstheslidesintheactivepresentationincolor.
WithApplication.ActivePresentation
.PrintOptions.PrintColorType=ppPrintColor
.PrintOut
EndWith
![Page 1920: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1920.jpg)
ShowAll
![Page 1921: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1921.jpg)
PrintCommentsPropertySetsorreturnswhethercommentswillbeprinted.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseDefault.Commentswillnotbeprinted.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueCommentswillbeprinted.
expression.PrintComments
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1922: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1922.jpg)
Example
ThisexampleinstructsMicrosoftPowerPointtoprintcomments.
SubPrintPresentationComments
ActivePresentation.PrintOptions.PrintComments=msoTrue
EndSub
![Page 1923: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1923.jpg)
ShowAll
![Page 1924: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1924.jpg)
PrintFontsAsGraphicsPropertyDetermineswhetherTrueTypefontsareprintedasgraphics.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueTrueTypefontsareprintedasgraphics.
![Page 1925: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1925.jpg)
Example
ThisexamplespecifiesthatTrueTypefontsintheactivepresentationbeprintedasgraphics.
ActivePresentation.PrintOptions.PrintFontsAsGraphics=msoTrue
![Page 1926: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1926.jpg)
ShowAll
![Page 1927: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1927.jpg)
PrintHiddenSlidesPropertyDetermineswhetherhiddenslidesinthespecifiedpresentationwillbeprinted.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.msoTriStateMixedmsoTriStateTogglemsoTrueThehiddenslidesinthespecifiedpresentationwillbeprinted.
![Page 1928: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1928.jpg)
Example
Thisexampleprintsallslides,whethervisibleorhidden,intheactivepresentation.
WithActivePresentation
.PrintOptions.PrintHiddenSlides=msoTrue
.PrintOut
EndWith
![Page 1929: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1929.jpg)
ShowAll
![Page 1930: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1930.jpg)
PrintInBackgroundPropertyDetermineswhetherthespecifiedpresentationisprintedinthebackground.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueDefault.Thespecifiedpresentationisprintedinthebackground,whichmeansthatyoucancontinuetoworkwhileit'sbeingprinted.
![Page 1931: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1931.jpg)
Example
Thisexampleprintstheactivepresentationinthebackground.
WithActivePresentation
.PrintOptions.PrintInBackground=msoTrue
.PrintOut
EndWith
![Page 1932: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1932.jpg)
PrintOptionsPropertyReturnsaPrintOptionsobjectthatrepresentsprintoptionsthataresavedwiththespecifiedpresentation.Read-only.
![Page 1933: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1933.jpg)
Example
Thisexamplecauseshiddenslidesintheactivepresentationtobeprinted,anditscalestheprintedslidestofitthepapersize.
WithApplication.ActivePresentation
With.PrintOptions
.PrintHiddenSlides=True
.FitToPage=True
EndWith
.PrintOut
EndWith
![Page 1934: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1934.jpg)
PrintStepsPropertyReturnsthenumberofslidesyou'dneedtoprinttosimulatethebuildsonthespecifiedslide,slidemaster,orrangeofslides.Read-onlyLong.
![Page 1935: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1935.jpg)
Example
Thisexamplesetsavariabletothenumberofslidesyou'dneedtoprinttosimulatethebuildsonslideoneintheactivepresentationandthendisplaysthevalueofthevariable.
steps1=ActivePresentation.Slides(1).PrintSteps
MsgBoxsteps1
![Page 1936: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1936.jpg)
ProductCodePropertyReturnstheMicrosoftPowerPointgloballyuniqueidentifier(GUID).YoumightusetheGUID,forexample,whenmakingprogramcallstoanApplicationProgrammingInterface(API).Read-onlyString.
![Page 1937: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1937.jpg)
Example
ThisexamplereturnsthePowerPointGUIDtothevariablepptGUID.
DimpptGUIDAsString
pptGUID=Application.ProductCode
![Page 1938: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1938.jpg)
ShowAll
![Page 1939: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1939.jpg)
ProgIDPropertyReturnstheprogrammaticidentifier(ProgID)forthespecifiedOLEobject.Read-onlyString.
![Page 1940: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1940.jpg)
Example
ThisexampleloopsthroughalltheobjectsonalltheslidesintheactivepresentationandsetsalllinkedMicrosoftExcelworksheetstobeupdatedmanually.
ForEachsldInActivePresentation.Slides
ForEachshInsld.Shapes
Ifsh.Type=msoLinkedOLEObjectThen
Ifsh.OLEFormat.ProgID="Excel.Sheet"Then
sh.LinkFormat.AutoUpdate=ppUpdateOptionManual
EndIf
EndIf
Next
Next
![Page 1941: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1941.jpg)
ShowAll
![Page 1942: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1942.jpg)
PropertyPropertySetsorreturnsanMsoAnimPropertyconstantthatrepresentsananimationproperty.Read/write.
MsoAnimPropertycanbeoneoftheseMsoAnimPropertyconstants.msoAnimColormsoAnimHeigthmsoAnimNoneDefault.msoAnimOpacitymsoAnimRotationmsoAnimShape3DExtrudeForwardmsoAnimShape3DExtrusionColormsoAnimShape3DXRotationAnglemsoAnimShape3DYRotationAnglemsoAnimShapefBackColormsoAnimShapefColormsoAnimShapefGradientPresetmsoAnimShapefGradientTypemsoAnimShapeFlipHmsoAnimShapeFlipVmsoAnimShapefOnmsoAnimShapefOpacitymsoAnimShapefTypemsoAnimShapelColormsoAnimShapelDashesmsoAnimShapelEndArrowHeadmsoAnimShapelEndArrowLengthmsoAnimShapelEndArrowWidthmsoAnimShapelOnmsoAnimShapelStartArrowHeadmsoAnimShapelStartArrowLength
![Page 1943: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1943.jpg)
msoAnimShapelStartArrowWidthmsoAnimShapelStylemsoAnimShapelWidthmsoAnimShapepBrightnessmsoAnimShapepContrastmsoAnimShapepCropFromBottommsoAnimShapepCropFromLeftmsoAnimShapepCropFromRightmsoAnimShapepCropFromTopmsoAnimShapepFilenamemsoAnimShapepGammamsoAnimShapepGrayscalemsoAnimShapeRotationmsoAnimShapesColormsoAnimShapesEmbossedmsoAnimShapesOffsetXmsoAnimShapesOffsetYmsoAnimShapesOnmsoAnimShapesOpacitymsoAnimShapesTypemsoAnimShapeTypemsoAnimShapewfontBoldmsoAnimShapewfontItalicmsoAnimShapewfontNamemsoAnimShapewfontShadowmsoAnimShapewfontSizemsoAnimShapewfontSmallCapsmsoAnimShapewfontStrikeThroughmsoAnimShapewfontUnderlinemsoAnimShapewSpacingmsoAnimShapewVerticalmsoAnimTextBulletCharactermsoAnimTextBulletColor
![Page 1944: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1944.jpg)
msoAnimTextBulletFontNamemsoAnimTextBulletNumbermsoAnimTextBulletPicturemsoAnimTextBulletRelativeSizemsoAnimTextBulletStylemsoAnimTextBulletTypemsoAnimTextFontBoldmsoAnimTextFontColormsoAnimTextFontEmbossmsoAnimTextFontItalicmsoAnimTextFontNamemsoAnimTextFontShadowmsoAnimTextFontSizemsoAnimTextFontStrikeThroughmsoAnimTextFontSubscriptmsoAnimTextFontSuperscriptmsoAnimTextFontUnderlinemsoAnimWidthmsoAnimXmsoAnimY
expression.Property
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1945: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1945.jpg)
Example
Thefollowingexampleaddsashape,addsathree-secondfillanimationtothatshape,andsetsthefillanimationtocolor.
SubAddShapeSetAnimFill()
DimeffBlindsAsEffect
DimshpRectangleAsShape
DimanimPropertyAsAnimationBehavior
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffBlinds=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectBlinds)
effBlinds.Timing.Duration=3
SetanimProperty=effBlinds.Behaviors.Add(msoAnimTypeProperty)
WithanimProperty.PropertyEffect
.Property=msoAnimColor
.From=RGB(Red:=0,Green:=0,Blue:=255)
.To=RGB(Red:=255,Green:=0,Blue:=0)
EndWith
EndSub
![Page 1946: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1946.jpg)
PropertyEffectPropertyReturnsaPropertyEffectobjectforagivenanimationbehavior.
expression.PropertyEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1947: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1947.jpg)
Example
Thefollowingexampleaddsashapewithaneffecttotheactivepresentationandsetstheanimationeffectpropertiesfortheshapetochangecolors.
SubAddShapeSetAnimFill()
DimeffBlindsAsEffect
DimshpRectangleAsShape
DimanimBlindsAsAnimationBehavior
'Addsrectangleandsetsanimiationeffect
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffBlinds=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectBlinds)
'Setsthedurationoftheanimation
effBlinds.Timing.Duration=3
'Addsabehaviortotheanimation
SetanimBlinds=effBlinds.Behaviors.Add(msoAnimTypeProperty)
'Setstheanimationcoloreffectandtheformulatouse
WithanimBlinds.PropertyEffect
.Property=msoAnimColor
.From=RGB(Red:=0,Green:=0,Blue:=255)
.To=RGB(Red:=255,Green:=0,Blue:=0)
EndWith
EndSub
![Page 1948: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1948.jpg)
PublishObjectsPropertyReturnsaPublishObjectscollectionrepresentingthesetofcompleteorpartialloadedpresentationsthatareavailabletopublishtoHTML.Read-only.
![Page 1949: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1949.jpg)
Example
ThisexamplepublishesslidesthreethroughfiveoftheactivepresentationtoHTML.ItnamesthepublishedpresentationMallard.htm.
WithActivePresentation.PublishObjects.Item(1)
.FileName="C:\Test\Mallard.htm"
.SourceType=ppPublishSlideRange
.RangeStart=3
.RangeEnd=5
.Publish
EndWith
![Page 1950: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1950.jpg)
RangeEndPropertyReturnsorsetsthenumberofthelastslideinarangeofslidesyouarepublishingasaWebpresentation.Read/writeInteger.
![Page 1951: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1951.jpg)
Example
ThisexamplepublishesslidesthreethroughfiveoftheactivepresentationtoHTML.ItnamesthepublishedpresentationMallard.htm.
WithActivePresentation.PublishObjects(1)
.FileName="C:\Test\Mallard.htm"
.SourceType=ppPublishSlideRange
.RangeStart=3
.RangeEnd=5
.Publish
EndWith
![Page 1952: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1952.jpg)
RangesPropertyReturnsthePrintRangesobject,whichrepresentstherangesofslidesinthepresentationtobeprinted.Read-only.
![Page 1953: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1953.jpg)
Remarks
Ifyoudon'twanttoprintanentirepresentation,youmustusetheAddmethodtocreateaPrintRangeobjectforeachconsecutiverunofslidesyouwanttoprint.Forexample,ifyouwanttoprintslide1,slides3through5,andslides8and9inaspecifiedpresentation,youmustcreatethreePrintRangeobjects:onethatrepresentsslide1;onethatrepresentsslides3through5;andonethatrepresentsslides8and9.Formoreinformation,seetheexampleforthisproperty.
TheRangeTypepropertymustbesettoppPrintSlideRangefortherangesinthePrintRangescollectiontobeapplied.
ToclearalltheexistingprintrangesfromthePrintRangescollection,usetheClearAllmethod.
SpecifyingavaluefortheToandFromargumentsofthePrintOutmethodsetsthecontentsofthePrintRangesobject.
![Page 1954: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1954.jpg)
Example
Thisexampleprintsslide1,slides3through5,andslides8and9intheactivepresentation.
WithActivePresentation
With.PrintOptions
.RangeType=ppPrintSlideRange
With.Ranges
.Add1,1
.Add3,5
.Add8,9
EndWith
EndWith
.PrintOut
EndWith
![Page 1955: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1955.jpg)
RangeStartPropertyReturnsorsetsthenumberofthefirstslideinarangeofslidesyouarepublishingasaWebpresentation.Read/writeInteger.
![Page 1956: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1956.jpg)
Example
ThisexamplepublishesslidesthreethroughfiveoftheactivepresentationtoHTML.ItnamesthepublishedpresentationMallard.htm.
WithActivePresentation.PublishObjects(1)
.FileName="C:\Test\Mallard.htm"
.SourceType=ppPublishSlideRange
.RangeStart=3
.RangeEnd=5
.Publish
EndWith
![Page 1957: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1957.jpg)
ShowAll
![Page 1958: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1958.jpg)
RangeTypePropertyRangeTypepropertyasitappliestothePrintOptionsobject.
Returnsorsetsthetypeofprintrangeforthepresentation.Read/writePpPrintRangeType.
PpPrintRangeTypecanbeoneofthesePpPrintRangeTypeconstants.ppPrintAllppPrintCurrentppPrintNamedSlideShowppPrintSelectionppPrintSlideRange
expression.RangeType
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
RangeTypepropertyasitappliestotheSlideShowSettingsobject.
Returnsorsetsthetypeofslideshowtorun.Read/writePpSlideShowRangeType.
PpSlideShowRangeTypecanbeoneofthesePpSlideShowRangeTypeconstants.ppShowAllppShowNamedSlideShowppShowSlideRange
expression.RangeType
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 1959: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1959.jpg)
Remarks
Toprinttheslidesrangesyou'vedefinedinthePrintRangescollection,youmustfirstsettheRangeTypepropertytoppPrintSlideRange.SettingRangeTypetoanythingotherthanppPrintSlideRangemeansthattherangesyou'vedefinedinthePrintRangescollectionwon'tbeapplied.However,thisdoesn'taffectthecontentsofthePrintRangescollectioninanyway.Thatis,ifyoudefinesomeprintranges,settheRangeTypepropertytoavalueotherthanppPrintSlideRange,andthenlatersetRangeTypebacktoppPrintSlideRange,theprintrangesyoudefinedbeforewillremainunchanged.
SpecifyingavaluefortheToandFromargumentsofthePrintOutmethodsetsthevalueofthisproperty.
![Page 1960: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1960.jpg)
Example
AsitappliestothePrintOptionsobject.
Thisexampleprintsthecurrentslidetheactivepresentation.
WithActivePresentation
.PrintOptions.RangeType=ppPrintCurrent
.PrintOut
EndWith
AsitappliestotheSlideShowSettingsobject.
Thisexamplerunsthenamedslideshow"QuickShow."
WithActivePresentation.SlideShowSettings
.RangeType=ppShowNamedSlideShow
.SlideShowName="QuickShow"
.Run
EndWith
![Page 1961: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1961.jpg)
ShowAll
![Page 1962: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1962.jpg)
ReadOnlyPropertyReturnswhetherthespecifiedpresentationisread-only.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedpresentationisread-only.
![Page 1963: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1963.jpg)
Example
Iftheactivepresentationisread-only,thisexamplesavesitasNewfile.ppt.
WithApplication.ActivePresentation
If.ReadOnlyThen.SaveAsFileName:="newfile"
EndWith
![Page 1964: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1964.jpg)
ShowAll
![Page 1965: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1965.jpg)
RegisteredPropertyReturnswhetherthespecifiedadd-inisregisteredintheWindowsregistry.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedadd-inisregisteredintheWindowsregistry.
![Page 1966: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1966.jpg)
Example
Thisexampleregisterstheadd-innamed"MyTools"intheWindowsregistry.
Application.Addins("MyTools").Registered=msoTrue
![Page 1967: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1967.jpg)
ShowAll
![Page 1968: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1968.jpg)
RelativePropertyMsoTruetosetthemotionpositionrelativetothepositionoftheshape.Thispropertyisonlyusedinconjunctionwithmotionpaths.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseDefault.Themotionpathisabsolute.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueThemotionpathisrelative.
expression.Relative
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1969: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1969.jpg)
Example
Thefollowingexampleaddsashape,addsananimatedmotionpathtotheshape,andreportsonitsmotionpathrelativity.
SubAddShapeSetAnimPath()
DimeffDiamondAsEffect
DimshpCubeAsShape
SetshpCube=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeCube,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpCube,effectId:=msoAnimEffectPathDiamond)
effDiamond.Timing.Duration=3
MsgBox"Ismotionpathrelativeorabsolute:"&_
effDiamond.EffectParameters.Relative&vbCrLf&_
"0=Relative,-1=Absolute"
EndSub
![Page 1970: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1970.jpg)
RelativeSizePropertyReturnsorsetsthebulletsizerelativetothesizeofthefirsttextcharacterintheparagraph.Canbeafloating-pointvaluefrom0.25through4,indicatingthatthebulletsizecanbefrom25percentthrough400percentofthetext-charactersize.Read/writeSingle.
![Page 1971: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1971.jpg)
Example
Thisexamplesetstheformattingforthebulletinshapetwoonslideoneintheactivepresentation.Thesizeofthebulletis125percentofthesizeofthefirsttextcharacterintheparagraph.
WithActivePresentation.Slides(1).Shapes(2)
With.TextFrame.TextRange.ParagraphFormat.Bullet
.Visible=True
.RelativeSize=1.25
.Character=169
With.Font
.Name="Symbol"
.Color.RGB=RGB(255,0,0)
EndWith
EndWith
EndWith
![Page 1972: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1972.jpg)
ShowAll
![Page 1973: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1973.jpg)
RelyOnVMLPropertyDetermineswwhetherimagefilesaregeneratedfromdrawingobjectswhenyousaveorpublishacompleteorpartialpresentationasaWebpage.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.ImagesarenotgeneratedfromdrawingobjectswhenyousaveorpublishacompleteorpartialpresentationasaWebpage.msoTriStateMixedmsoTriStateTogglemsoTrueImagefilesaregeneratedfromdrawingobjectswhenyousaveorpublishacompleteorpartialpresentationasaWebpage.
![Page 1974: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1974.jpg)
Remarks
Youcanreducefilesizesbynotgeneratingimagesfordrawingobjects,ifyourWebbrowsersupportsVectorMarkupLanguage(VML).Forexample,MicrosoftInternetExplorer5andhighersupportthisfeature,andyoushouldsettheRelyOnVMLpropertytomsoTrueifyouaretargetingthisbrowser.ForbrowsersthatdonotsupportVML,theimagewillnotappearwhenyouviewaWebpagesavedwiththispropertysettomsoTrue.
Forexample,youshouldnotgenerateimagesifyourWebpageusesimagefilesthatyouhavegeneratedearlier,andifthelocationwhereyousavethepresentationisdifferentfromthefinallocationofthepageontheWebserver.
![Page 1975: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1975.jpg)
Example
ThisexamplespecifiesthatimagefilesaregeneratedwhensavingorpublishingtheactivepresentationtoaWebpage.
ActivePresentation.WebOptions.RelyOnVML=msoFalse
![Page 1976: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1976.jpg)
ShowAll
![Page 1977: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1977.jpg)
RemovePersonalInformationPropertyMsoTrueforMicrosoftPowerPointtoremovealluserinformationfromcomments,revisions,andthePropertiesdialogboxuponsavingapresentation.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseComments,revisions,andpersonalinformationremaininthepresentation.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueRemovescomments,revisions,andpersonalinformationwhensavingpresentation.
expression.RemovePersonalInformation
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1978: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1978.jpg)
Remarks
Beforeyougiveothersacopyofthedocument,itisagoodideatoreviewpersonalandhiddeninformation,anddecidewhetheritisappropriatetoinclude.Youmaywanttoremovesomeinformationfromthedocumentandfromthedocumentfilepropertiesbeforeyousharethedocumentwithothers.
Whereispersonalorhiddeninformationstored?
FilepropertiesThesepropertiesincludeAuthor,Manager,Company,andLastSavedBy.
OtherhiddeninformationForexample,hidden,revisedtext,comments,orfieldcodecanremaininadocumenteventhoughyoudon'tseeitorexpectittobeinthefinalversion.Ifyouenteredpersonalinformationsuchasyournameore-mailaddresswhenyouregisteredyoursoftware,someMicrosoftOfficedocumentsstorethatinformationaspartofthedocument.
Informationcontainedincustomfieldsthatyouaddtothedocument,suchasan'author'or'owner'field,isnotautomaticallyremoved.Youmusteditorremovethecustomfieldtoremovethatinformation.
![Page 1979: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1979.jpg)
Example
Thisexamplesetstheactivepresentationtoremovepersonalinformationthenexttimetheusersavesit.
SubRemovePersonalInfo()
ActivePresentation.RemovePersonalInformation=msoTrue
EndSub
![Page 1980: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1980.jpg)
RepeatCountPropertySetsorreturnsanLongthatrepresentsthenumberoftimestorepeatananimation.Read/write.
expression.RepeatCount
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1981: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1981.jpg)
Example
Thisexamplecreatesashapeandaddsananimationtoit,thenrepeatstheanimationtwice.
SubAddShapeSetTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectPathDiamond)
WitheffDiamond.Timing
.Duration=5'Lengthofeffect.
.RepeatCount=2'Howmanytimestorepeat.
EndWith
EndSub
![Page 1982: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1982.jpg)
RepeatDurationPropertySetsorreturnsaSinglethatrepresents,inseconds,howlongrepeatedanimationsshouldlast.Read/write.
expression.RepeatDuration
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1983: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1983.jpg)
Remarks
AnanimationwillstopattheendofitstimesequenceorthevalueoftheRepeatDurationproperty,whicheverisshorter.
![Page 1984: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1984.jpg)
Example
Thisexamplesaddsashapeandananimationtoit,thenrepeatstheanimationtentimes.However,afterfiveseconds,theanimationwillbecutoff,eventhoughtheanimationisdimensionedfora20-secondtimeline(iftheDurationpropertyisnotspecified,ananimationdefaultstotwoseconds).
SubAddShapeSetTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
'Addsnewshapeandsetsanimationeffect
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectPathDiamond)
'Setsrepeatdurationandnumberoftimestorepeatanimation
WitheffDiamond.Timing
.RepeatDuration=5
.RepeatCount=10
EndWith
EndSub
![Page 1985: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1985.jpg)
ShowAll
![Page 1986: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1986.jpg)
ResizeGraphicsPropertyDetermineswhetherslidesandanygraphicsonthemaresizedtofittheWebpagedisplayareaofthetargetWebbrowser.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseSlidesandgraphicsremainthesizetheyareinthesourcepresentation,regardlessoftheWebbrowserdisplayarea.msoTriStateMixedmsoTriStateTogglemsoTrueDefault.SlidesandanygraphicsonthemaresizedtofittheWebpagedisplayareaofthetargetWebbrowser.
![Page 1987: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1987.jpg)
Example
ThisexamplesetsgraphicsinthespecifiedWebpresentationtoberesizedforthetargetWebbrowser.Itthenpublishesthecompletepresentation,withspeaker'snotes,toafilenamed"Mallard.htm."
WithPresentations(2)
.WebOptions.ResizeGraphics=msoTrue
With.PublishObjects(1)
.FileName="C:\Mallard.htm"
.SourceType=ppPublishAll
.SpeakerNotes=True
.Publish
EndWith
EndWith
![Page 1988: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1988.jpg)
ShowAll
![Page 1989: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1989.jpg)
RestartPropertySetsorreturnsanMsoAnimEffectRestartconstantthatrepresentswhethertheanimationeffectrestartsaftertheeffecthasstartedonce.Read/write.
MsoAnimEffectRestartcanbeoneoftheseMsoAnimEffectRestartconstants.msoAnimEffectRestartAlwaysmsoAnimEffectRestartNeverDefault.msoAnimEffectRestartWhenOff
expression.Restart
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1990: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1990.jpg)
Example
Thefollowingexampleaddsashapeandananimationtoit,thensetstheanimation'srestartbehavior.
SubAddShapeSetTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
'Addsshapeandsetsanimation
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,Top:=100,_
Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectPathDiamond)
WitheffDiamond.Timing
.Duration=3
.RepeatDuration=5
.RepeatCount=3
.Restart=msoAnimEffectRestartAlways
EndWith
EndSub
![Page 1991: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1991.jpg)
ShowAll
![Page 1992: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1992.jpg)
RevealPropertySetsorreturnsaMsoTriStateconstantthatdetermineshowtheembeddedobjectswillberevealed.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseComments,revisions,andpersonalinformationremaininthepresentation.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueRemovescomments,revisions,andpersonalinformationwhensavingthepresentation.
expression.Reveal
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1993: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1993.jpg)
Remarks
SettingavalueofmsoTruefortheRevealpropertywhenthefiltereffecttypeismsoAnimFilterEffectTypeWipewillmaketheshapeappear.SettingavalueofmsoFalsewillmaketheobjectdisappear.Inotherwords,ifyourfilterissettowipeandRevealistrue,youwillgetawipeineffectandwhenRevealisfalse,youwillgetawipeouteffect.
![Page 1994: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1994.jpg)
Example
Thefollowingexampleaddsashapetothefirstslideoftheactivepresentationandsetsafiltereffectanimationbehavior.
SubChangeFilterEffect()
DimsldFirstAsSlide
DimshpHeartAsShape
DimeffNewAsEffect
DimbhvEffectAsAnimationBehavior
SetsldFirst=ActivePresentation.Slides(1)
SetshpHeart=sldFirst.Shapes.AddShape(Type:=msoShapeHeart,_
Left:=100,Top:=100,Width:=100,Height:=100)
SeteffNew=sldFirst.TimeLine.MainSequence.AddEffect_
(Shape:=shpHeart,EffectID:=msoAnimEffectChangeFillColor,_
Trigger:=msoAnimTriggerAfterPrevious)
SetbhvEffect=effNew.Behaviors.Add(msoAnimTypeFilter)
WithbhvEffect.FilterEffect
.Type=msoAnimFilterEffectTypeWipe
.Subtype=msoAnimFilterEffectSubtypeUp
.Reveal=msoTrue
EndWith
EndSub
![Page 1995: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1995.jpg)
ShowAll
![Page 1996: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1996.jpg)
ReversePropertySetsorreturnsanMsoTriStateconstantthatrepresentsadiagram'sreversestate.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseThediagramisnotreversed.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueThediagramisreversed.
expression.Reverse
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1997: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1997.jpg)
Remarks
Thismethodgeneratesanerrorifthevalueofthetargetdiagram'sTypepropertyisanorganizationchart(msoDiagramTypeOrgChart).
![Page 1998: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1998.jpg)
Example
Thefollowingexamplecreatesapyramiddiagram,andreversesitscoloring.
SubReversePyramidDiagram()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
'Addsapyramiddiagramandfirstchildnode
SetshpDiagram=ActivePresentation.Slides(1).Shapes.AddDiagram_
(Type:=msoDiagramPyramid,Left:=10,Top:=15,_
Width:=400,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addsthreeadditionalnodestodiagram
ForintNodes=1To3
dgnNode.AddNode
NextintNodes
'Automaticallyplacesnodes,andreversesnodeorder
WithdgnNode.Diagram
.AutoLayout=msoTrue
.Reverse=msoTrue
EndWith
EndSub
![Page 1999: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/1999.jpg)
ShowAll
![Page 2000: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2000.jpg)
RewindAtEndPropertySetsorreturnsanMsoTriStateconstantthatrepresentswhetheranobjectreturnstoitsbeginningpositionafterananimationhasended.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseDefault.Theobjectdoesnotreturntoitsbeginningpositionafterananimationhasended.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueTheobjectreturnstoitsbeginningpositionafterananimationhasended.
expression.RewindAtEnd
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2001: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2001.jpg)
Example
Thefollowingexampleaddsashapeandananimationtotheshape,theninstructstheshapetoreturntoitsbeginningpositionaftertheanimationhasended.
SubAddShapeSetTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
'Addsshapeandsetsanimationeffect
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectPathDiamond)
'Setsdurationofanimationandreturnsshapetoitsoriginalposition
WitheffDiamond.Timing
.Duration=3
.RewindAtEnd=msoTrue
EndWith
EndSub
![Page 2002: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2002.jpg)
ShowAll
![Page 2003: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2003.jpg)
RewindMoviePropertyDetermineswhetherthefirstframeofthespecifiedmovieisautomaticallyredisplayedassoonasthemoviehasfinishedplaying.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThefirstframeofthespecifiedmovieisautomaticallyredisplayedassoonasthemoviehasfinishedplaying.
![Page 2004: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2004.jpg)
Example
Thisexamplespecifiesthatthefirstframeofthemovierepresentedbyshapethreeonslideoneintheactivepresentationwillbeautomaticallyredisplayedwhenthemoviehasfinishedplaying.Shapethreemustbeamovieobject.
SetOLEobj=ActivePresentation.Slides(1).Shapes(3)
OLEobj.AnimationSettings.PlaySettings.RewindMovie=msoTrue
![Page 2005: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2005.jpg)
ShowAll
![Page 2006: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2006.jpg)
RGBPropertyRGBpropertyasitappliestotheColorFormatobject.
Returnsorsetsthered-green-blue(RGB)valueofthespecifiedcolor.Read/writeLong.
RGBpropertyasitappliestotheRGBColorobject.
Returnsorsetsthered-green-blue(RGB)valueofaspecifiedcolor-schemecolororextracolorwhenusedwitharead/writePpColorSchemeIndexconstant.TheColorsmethodisusedtoreturntheRGBColorobject.
PpColorSchemeIndexcanbeoneofthesePpColorSchemeIndexconstants.ppAccent1ppAccent2ppAccent3ppBackgroundppFillppForegroundppShadowppTitle
![Page 2007: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2007.jpg)
Example
AsitappliestotheColorFormatobject.
Thisexamplesetsthebackgroundcolorforcolorschemethreeintheactivepresentationandthenappliesthecolorschemetoallslidesinthepresentationthatarebasedontheslidemaster.
WithActivePresentation
Setcs1=.ColorSchemes(3)
cs1.Colors(ppBackground).RGB=RGB(128,128,0)
.SlideMaster.ColorScheme=cs1
EndWith
AsitappliestotheRGBColorobject.
Thisexampledisplaysthevalueofthered,green,andbluecomponentsofthefillforecolorforshapeoneonslideoneintheactivedocument.
SetmyDocument=ActivePresentation.Slides(1)
c=myDocument.Shapes(1).Fill.ForeColor.RGB
redComponent=cMod256
greenComponent=c\256Mod256
blueComponent=c\65536Mod256
MsgBox"RGBcomponents:"&redComponent&_
","&greenComponent&","&blueComponent
![Page 2008: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2008.jpg)
RootPropertyReturnsaDiagramNodeobjectthatrepresentstherootdiagramnodetowhichthesourcediagramnodebelongs.
expression.Root
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2009: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2009.jpg)
Example
Thefollowingexamplecreatesanorganizationchartandaddschildnodestotherootdiagramnode.
SubAddChildNodesToRoot()
DimdgnNodeAsDiagramNode
DimshpOrgChartAsShape
DimintNodesAsInteger
'Addsorganizationchartandfirstnode
SetshpOrgChart=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramOrgChart,Left:=10,_
Top:=15,Width:=400,Height:=475)
shpOrgChart.DiagramNode.Children.AddNode
SetdgnNode=shpOrgChart.DiagramNode.Root
'Addsthreechildnodestorootnode
ForintNodes=1To3
dgnNode.Children.AddNode
NextintNodes
EndSub
![Page 2010: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2010.jpg)
ShowAll
![Page 2011: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2011.jpg)
RotatedCharsPropertyDetermineswhethercharactersinthespecifiedWordArtarerotated90degreesrelativetotheWordArt'sboundingshape.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseCharactersinthespecifiedWordArtretaintheiroriginalorientationrelativetotheboundingshape.msoTriStateMixedmsoTriStateTogglemsoTrueCharactersinthespecifiedWordArtarerotated90degreesrelativetotheWordArt'sboundingshape.
![Page 2012: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2012.jpg)
Remarks
IftheWordArthashorizontaltext,settingtheRotatedCharspropertytomsoTruerotatesthecharacters90degreescounterclockwise.IftheWordArthasverticaltext,settingtheRotatedCharspropertytomsoFalserotatesthecharacters90degreesclockwise.UsetheToggleVerticalTextmethodtoswitchbetweenhorizontalandverticaltextflow.
TheFlipmethodandRotationpropertyoftheShapeobjectandtheRotatedCharspropertyandToggleVerticalTextmethodoftheTextEffectFormatobjectallaffectthecharacterorientationanddirectionoftextflowinaShapeobjectthatrepresentsWordArt.Youmayhavetoexperimenttofindouthowtocombinetheeffectsofthesepropertiesandmethodstogettheresultyouwant.
![Page 2013: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2013.jpg)
Example
ThisexampleaddsWordArtthatcontainsthetext"Test"tomyDocumentandrotatesthecharacters90degreescounterclockwise.
SetmyDocument=ActivePresentation.Slides(1)
SetnewWordArt=myDocument.Shapes.AddTextEffect_
(PresetTextEffect:=msoTextEffect1,Text:="Test",_
FontName:="ArialBlack",FontSize:=36,_
FontBold:=msoFalse,FontItalic:=msoFalse,Left:=10,Top:=10)
newWordArt.TextEffect.RotatedChars=msoTrue
![Page 2014: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2014.jpg)
ShowAll
![Page 2015: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2015.jpg)
RotationPropertyReturnsorsetsthenumberofdegreesthespecifiedshapeisrotatedaroundthez-axis.Apositivevalueindicatesclockwiserotation;anegativevalueindicatescounterclockwiserotation.Read/writeSingle
![Page 2016: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2016.jpg)
Remarks
Tosettherotationofathree-dimensionalshapearoundthex-axisorthey-axis,usetheRotationXpropertyortheRotationYpropertyoftheThreeDFormatobject.
![Page 2017: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2017.jpg)
Example
ThisexamplematchestherotationofallshapesonmyDocumenttotherotationofshapeone.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
sh1Rotation=.Item(1).Rotation
Foro=1To.Count
.Item(o).Rotation=sh1Rotation
Next
EndWith
![Page 2018: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2018.jpg)
RotationEffectPropertyReturnsaRotationEffectobjectforananimationbehavior.
expression.RotationEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2019: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2019.jpg)
Example
Thefollowingexampleaddsanewshapetothefirstslideandsetstherotationanimationbehavior.
SubAddRotation()
DimshpNewAsShape
DimeffNewAsEffect
DimaniNewAsAnimationBehavior
SetshpNew=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShape5pointStar,Left:=0,_
Top:=0,Width:=100,Height:=100)
SeteffNew=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpNew,effectId:=msoAnimEffectCustom)
SetaniNew=effNew.Behaviors.Add(msoAnimTypeRotation)
WithaniNew.RotationEffect
'Rotate270degreesfromcurrentposition
.By=270
EndWith
EndSub
![Page 2020: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2020.jpg)
ShowAll
![Page 2021: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2021.jpg)
RotationXPropertyReturnsorsetstherotationoftheextrudedshapearoundthex-axis,indegrees.Canbeavaluefrom–90through90.Apositivevalueindicatesupwardrotation;anegativevalueindicatesdownwardrotation.Read/writeSingle.
![Page 2022: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2022.jpg)
Remarks
Tosettherotationoftheextrudedshapearoundthey-axis,usetheRotationYpropertyoftheThreeDFormatobject.Tosettherotationoftheextrudedshapearoundthez-axis,usetheRotationpropertyoftheShapeobject.Tochangethedirectionoftheextrusion'ssweeppathwithoutrotatingthefrontfaceoftheextrusion,usetheSetExtrusionDirectionmethod.
![Page 2023: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2023.jpg)
Example
ThisexampleaddsthreeidenticalextrudedovalstomyDocumentandsetstheirrotationaroundthex-axisto–30,0,and30degrees,respectively.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
With.AddShape(msoShapeOval,30,60,50,25).ThreeD
.Visible=True
.RotationX=-30
EndWith
With.AddShape(msoShapeOval,90,60,50,25).ThreeD
.Visible=True
.RotationX=0
EndWith
With.AddShape(msoShapeOval,150,60,50,25).ThreeD
.Visible=True
.RotationX=30
EndWith
EndWith
![Page 2024: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2024.jpg)
ShowAll
![Page 2025: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2025.jpg)
RotationYPropertyReturnsorsetstherotationoftheextrudedshapearoundthey-axis,indegrees.Canbeavaluefrom–90through90.Apositivevalueindicatesrotationtotheleft;anegativevalueindicatesrotationtotheright.Read/writeSingle.
![Page 2026: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2026.jpg)
Remarks
Tosettherotationoftheextrudedshapearoundthex-axis,usetheRotationXpropertyoftheThreeDFormatobject.Tosettherotationoftheextrudedshapearoundthez-axis,usetheRotationpropertyoftheShapeobject.Tochangethedirectionoftheextrusion'ssweeppathwithoutrotatingthefrontfaceoftheextrusion,usetheSetExtrusionDirectionmethod.
![Page 2027: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2027.jpg)
Example
ThisexampleaddsthreeidenticalextrudedovalstomyDocumentandsetstheirrotationaroundthey-axisto–30,0,and30degrees,respectively.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
With.AddShape(msoShapeOval,30,30,50,25).ThreeD
.Visible=True
.RotationY=-30
EndWith
With.AddShape(msoShapeOval,30,70,50,25).ThreeD
.Visible=True
.RotationY=0
EndWith
With.AddShape(msoShapeOval,30,110,50,25).ThreeD
.Visible=True
.RotationY=30
EndWith
EndWith
![Page 2028: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2028.jpg)
RowsPropertyReturnsaRowscollectionthatrepresentsalltherowsinatable.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 2029: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2029.jpg)
Example
Thisexampledeletesthethirdrowfromthetableinshapefiveofslidetwointheactivepresentation.
ActivePresentation.Slides(2).Shapes(5).Table.Rows(3).Delete
Thisexampleappliesadashedlinestyletothebottomborderofthesecondrowoftablecells.
ActiveWindow.Selection.ShapeRange.Table.Rows(2)_
.Cells.Borders(ppBorderBottom).DashStyle=msoLineDash
![Page 2030: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2030.jpg)
RulerPropertyReturnsaRulerobjectthatrepresentstherulerforthespecifiedtext.Read-only.
![Page 2031: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2031.jpg)
Example
Thisexamplesetsaleft-alignedtabstopat2inches(144points)forthetextinshapetwoonmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes(2).TextFrame.Ruler.TabStops_
.AddppTabStopLeft,144
![Page 2032: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2032.jpg)
RunPropertyReturnsorsetsthenameofthepresentationormacrotoberunwhenthespecifiedshapeisclickedorthemousepointerpassesovertheshapeduringaslideshow.TheActionpropertymustbesettoppActionRunMacroorppActionRunProgramforthispropertytoaffecttheslideshowaction.Read/writeString.
![Page 2033: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2033.jpg)
Remarks
IfthevalueoftheActionpropertyisppActionRunMacro,thespecifiedstringvalueshouldbethenameofaglobalmacrothat'scurrentlyloaded.IfthevalueoftheActionpropertyisppActionRunProgram,thespecifiedstringvalueshouldbethefullpathandfilenameofaprogram.
YoucansettheRunpropertytoamacrothattakesnoargumentsoramacrothattakesasingleShapeorObjectargument.Theshapethatwasclickedduringtheslideshowwillbepassedasthisargument.
![Page 2034: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2034.jpg)
Example
ThisexamplespecifiesthattheCalculateTotalmacroberunwheneverthemousepointerpassesovertheshapeduringaslideshow.
WithActivePresentation.Slides(1)_
.Shapes(3).ActionSettings(ppMouseOver)
.Action=ppActionRunMacro
.Run="CalculateTotal"
.AnimateAction=True
EndWith
![Page 2035: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2035.jpg)
ShowAll
![Page 2036: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2036.jpg)
SavedPropertyDetermineswhetherchangeshavebeenmadetoapresentationsinceitwaslastsaved.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueNochangeshavebeenmadetoapresentationsinceitwaslastsaved.
![Page 2037: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2037.jpg)
Remarks
IftheSavedpropertyofamodifiedpresentationissettomsoTrue,theuserwon'tbepromptedtosavechangeswhenclosingthepresentation,andallchangesmadetoitsinceitwaslastsavedwillbelost.
![Page 2038: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2038.jpg)
Example
Thisexamplesavestheactivepresentationifit'sbeenchangedsincethelasttimeitwassaved.
WithApplication.ActivePresentation
IfNot.SavedAnd.Path<>""Then.Save
EndWith
![Page 2039: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2039.jpg)
ShowAll
![Page 2040: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2040.jpg)
SaveNewWebPagesAsWebArchivesPropertyMsoTrueforMicrosoftPowerPointtosavenewWebpagesasWebarchives.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseSavesnewWebpagesasindividualWebpages.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueSavesnewWebpagesasWebarchives.
expression.SaveNewWebPagesAsWebArchives
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2041: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2041.jpg)
Remarks
SettingtheSaveNewWebPagesAsWebArchivespropertywon'tchangetheformatofanycurrentlyopenWebpages.YoumustindividuallysaveopenWebpagesandexplicitlysettheWebpageformatusingtheSaveAsmethod.
![Page 2042: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2042.jpg)
Example
ThisexampleenablestheSaveNewWebPagesAsWebArchivesproperty,sothatwhennewWebpagesaresaved,theyaresavedasWebarchives.
SubSetWebOption()
Application.DefaultWebOptions_
.SaveNewWebPagesAsWebArchives=True
EndSub
![Page 2043: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2043.jpg)
ScaleEffectPropertyReturnsaScaleEffectobjectforagivenanimationbehavior.
expression.ScaleEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2044: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2044.jpg)
Example
Thisexamplescalesthefirstshapeonthefirstslidestartingatzeroandincreasinginsizeuntilitreaches100percentofitsoriginalsize.
SubChangeScale()
DimshpFirstAsShape
DimeffNewAsEffect
DimaniScaleAsAnimationBehavior
SetshpFirst=ActivePresentation.Slides(1).Shapes(1)
SeteffNew=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpFirst,effectId:=msoAnimEffectCustom)
SetaniScale=effNew.Behaviors.Add(msoAnimTypeScale)
WithaniScale.ScaleEffect
'Startingsize
.FromX=0
.FromY=0
'Sizeafterscaleeffect
.ToX=100
.ToY=100
EndWith
EndSub
![Page 2045: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2045.jpg)
ShowAll
![Page 2046: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2046.jpg)
SchemeColorPropertyReturnsorsetsthecolorintheappliedcolorschemethat'sassociatedwiththespecifiedobject.Read/writePpColorSchemeIndex.
PpColorSchemeIndexcanbeoneofthesePpColorSchemeIndexconstants.ppAccent1ppAccent2ppAccent3ppBackgroundppFillppForegroundppNotSchemeColorppSchemeColorMixedppShadowppTitle
expression.SchemeColor
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2047: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2047.jpg)
Example
Thisexampleswitchesthebackgroundcoloronslideoneintheactivepresentationbetweenanexplicitred-green-bluevalueandthecolor-schemebackgroundcolor.
WithActivePresentation.Slides(1)
.FollowMasterBackground=False
With.Background.Fill.ForeColor
If.Type=msoColorTypeSchemeThen
.RGB=RGB(0,128,128)
Else
.SchemeColor=ppBackground
EndIf
EndWith
EndWith
![Page 2048: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2048.jpg)
ShowAll
![Page 2049: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2049.jpg)
ScreenSizePropertyReturnsorsetstheidealminimumscreensize(widthbyheight,inpixels)thatyoushouldusewhenviewingthesavedpresentationinaWebbrowser.Read/writeMsoScreenSize.
MsoScreenSizecanbeoneoftheseMsoScreenSizeconstants.msoScreenSize1024x768msoScreenSize1152x882msoScreenSize1152x900msoScreenSize1280x1024msoScreenSize1600x1200msoScreenSize1800x1440msoScreenSize1920x1200msoScreenSize544x376msoScreenSize640x480msoScreenSize720x512msoScreenSize800x600Default.
expression.ScreenSize
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2050: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2050.jpg)
Example
Thisexamplesetsthetargetscreensizeto640x480pixels.
Presentations(2).WebOptions.ScreenSize=_
msoScreenSize640x480
![Page 2051: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2051.jpg)
ScreenTipPropertyReturnsorsetstheScreenTiptextofahyperlink.Read/writeString.
![Page 2052: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2052.jpg)
Remarks
ScreenTiptextappears,forexample,whenyousaveapresentationtoHTML,viewitinaWebbrowser,andrestthemousepointeroverahyperlink.SomebrowsersmaynotsupportScreenTips.
![Page 2053: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2053.jpg)
Example
ThisexamplesetstheScreenTiptextforthefirsthyperlink.
ActivePresentation.Slides(1).Hyperlinks(1)_
.ScreenTip="GototheMicrosofthomepage"
![Page 2054: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2054.jpg)
ScriptPropertyReturnsaScriptobjectthatrepresentsablockofscriptcodeonaMicrosoftPowerPointslide.InPowerPoint,scriptisassociatedwithananchorshape.Ifnoscriptisassociatedwiththespecifiedshape,thennothingisreturned.Read-only.
![Page 2055: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2055.jpg)
Remarks
ScriptcodeinsertedonaslidecanonlyberuninWebpresentations.
Bydefault,scriptanchorshapesarenotvisible.Tomakethemvisible,usethePowerPointuserinterface.YoucannotmakescriptanchorshapesvisiblewithVisualBasiccode.
ItispossibletousetheScriptpropertyonarangeofshapes(ShapeRange.Script)insteadofspecifyingasingleanchorshape.However,iftherangecontainsmorethanoneshape,yourcodewillnotworkandwillreturnamessagethatindicatestheScriptpropertycannotbeaccessed.
![Page 2056: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2056.jpg)
Example
Thisexamplesetsthescriptinglanguageforthescriptanchor(shapeeightonslideone)toMicrosoftVisualBasicScriptingEdition(VBScript).
WithActivePresentation.Slides(1).Shapes(8)
.Script.Language=msoScriptLanguageVisualBasic
EndWith
![Page 2057: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2057.jpg)
ScriptsPropertyReturnsaScriptscollectionthatrepresentsallScriptobjects(blocksofscriptcode)inapresentation.Read-only.
![Page 2058: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2058.jpg)
Remarks
Scriptcode,representedbyaScriptobject,canberunonlyinaWebpresentation.
![Page 2059: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2059.jpg)
ShowAll
![Page 2060: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2060.jpg)
SegmentTypePropertyReturnsavaluethatindicateswhetherthesegmentassociatedwiththespecifiednodeisstraightorcurved.Read-onlyMsoSegmentType.
MsoSegmentTypecanbeoneoftheseMsoSegmentTypeconstants.msoSegmentCurveTheSegmentTypepropertyreturnsthisvalueifthespecifiednodeisacontrolpointforacurvedsegment.msoSegmentLine
expression.SegmentType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2061: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2061.jpg)
Remarks
Thispropertyisread-only.UsetheSetSegmentTypemethodtosetthevalueofthisproperty.
![Page 2062: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2062.jpg)
Example
ThisexamplechangesallstraightsegmentstocurvedsegmentsinshapethreeonmyDocument.Shapethreemustbeafreeformdrawing.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Nodes
n=1
Whilen<=.Count
If.Item(n).SegmentType=msoSegmentLineThen
.SetSegmentTypen,msoSegmentCurve
EndIf
n=n+1
Wend
EndWith
![Page 2063: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2063.jpg)
SelectedPropertyTrueifthespecifiedtablecellisselected.Read-onlyBoolean.
expression.Selected
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2064: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2064.jpg)
Example
Thisexampleputsaborderaroundthefirstcellinthespecifiedtableifthecellisselected.
SubIsCellSelected()
DimcelSelectedAsCell
SetcelSelected=ActivePresentation.Slides(1).Shapes(1)_
.Table.Columns(1).Cells(1)
IfcelSelected.SelectedThen
WithcelSelected
.Borders(ppBorderTop).DashStyle=msoLineRoundDot
.Borders(ppBorderBottom).DashStyle=msoLineRoundDot
.Borders(ppBorderLeft).DashStyle=msoLineRoundDot
.Borders(ppBorderRight).DashStyle=msoLineRoundDot
EndWith
EndIf
EndSub
![Page 2065: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2065.jpg)
SelectionPropertyReturnsaSelectionobjectthatrepresentstheselectioninthespecifieddocumentwindow.Read-only.
![Page 2066: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2066.jpg)
Example
Ifthere'stextselectedintheactivewindow,thisexamplemakesthetextitalic.
WithApplication.ActiveWindow.Selection
If.Type=ppSelectionTextThen
.TextRange.Font.Italic=True
EndIf
EndWith
![Page 2067: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2067.jpg)
SetEffectPropertyReturnsaSetEffectobjectfortheanimationbehavior.Read-only.YoucanusetheSetEffectobjecttosetthevalueofaproperty.
expression.SetEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2068: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2068.jpg)
Example
Thefollowingexampleaddsashapetothefirstslideoftheactivepresentationandsetsaseteffectanimationbehavior.
SubChangeSetEffect()
DimsldFirstAsSlide
DimshpHeartAsShape
DimeffNewAsEffect
DimbhvEffectAsAnimationBehavior
SetsldFirst=ActivePresentation.Slides(1)
SetshpHeart=sldFirst.Shapes.AddShape(Type:=msoShapeHeart,_
Left:=100,Top:=100,Width:=100,Height:=100)
SeteffNew=sldFirst.TimeLine.MainSequence.AddEffect_
(Shape:=shpHeart,EffectID:=msoAnimEffectChangeFillColor,_
Trigger:=msoAnimTriggerAfterPrevious)
SetbhvEffect=effNew.Behaviors.Add(msoAnimTypeSet)
WithbhvEffect.SetEffect
.Property=msoAnimShapeFillColor
.To=RGB(Red:=0,Green:=255,Blue:=255)
EndWith
EndSub
![Page 2069: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2069.jpg)
ShowAll
![Page 2070: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2070.jpg)
ShadowPropertyShadowpropertyasitappliestotheFontobject.
Determineswhetherthespecifiedtexthasashadow.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThespecifiedtextdoesn'thaveashadow.msoTriStateMixedSomeofthetexthasashadowandsomedoesn't.msoTriStateTogglemsoTrueThespecifiedtexthasashadow.
expression.Shadow
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
ShadowpropertyasitappliestotheShapeandShapeRangeobjects.
Returnsaread/onlyShadowFormatobjectthatcontainsshadowformattingpropertiesforthespecifiedshapeorshapes.
expression.Shadow
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 2071: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2071.jpg)
Example
AsitappliestotheFontobject.
Thisexampleaddsashadowtothetitletextonslideoneintheactivepresentation.
Application.ActivePresentation.Slides(1).Shapes.Title_
.TextFrame.TextRange.Font.Shadow=True
AsitappliestotheShapeandShapeRangeobjects.
Thisexampleaddsashadowedrectangletoslideoneintheactivepresentation.Theblue,embossedshadowisoffset3pointstotherightofand2pointsdownfromtherectangle.
SetmyShap=Application.ActivePresentation.Slides(1).Shapes
WithmyShap.AddShape(msoShapeRectangle,10,10,150,90).Shadow
.Type=msoShadow17
.ForeColor.RGB=RGB(0,0,128)
.OffsetX=3
.OffsetY=2
EndWith
![Page 2072: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2072.jpg)
ShapePropertyReturnsaShapeobjectthatrepresentsashapeinatablecell(fortheCellobject),adiagramnodeinadiagram(fortheDiagramNodeobject),orananimatedshape(fortheEffectobject).
expression.Shape
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 2073: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2073.jpg)
Example
Thisexamplecreatesa3x3tableinanewpresentationandinsertsafour-pointedstarintothefirstcellofthetable.
WithPresentations.Add
With.Slides.Add(1,ppLayoutBlank)
.Shapes.AddTable(3,3).Select
.Shapes(1).Table.Cell(1,1).Shape_
.AutoShapeType=msoShape4pointStar
EndWith
EndWith
Thefollowingexamplecreatesadiagramandaddschildnodestotherootmode.Aseachchildisadded,therootnodedisplaysthenumberofchildnodesithas.
SubCountChildNodes()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
SetshpDiagram=ActivePresentation.Slides(1).Shapes.AddDiagram_
(Type:=msoDiagramRadial,Left:=10,Top:=15,_
Width:=400,Height:=475)
shpDiagram.DiagramNode.Children.AddNode
SetdgnNode=shpDiagram.DiagramNode.Root
ForintNodes=1To3
dgnNode.Children.AddNode
dgnNode.Shape.TextFrame.TextRange.Text=intNodes
NextintNodes
EndSub
![Page 2074: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2074.jpg)
![Page 2075: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2075.jpg)
ShapeRangePropertyReturnsaShapeRangeobjectthatrepresentsalltheslideobjectsthathavebeenselectedonthespecifiedslide.Thisrangecancontainthedrawings,shapes,OLEobjects,pictures,textobjects,titles,headers,footers,slidenumberplaceholder,anddateandtimeobjectsonaslide.Read-only.
![Page 2076: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2076.jpg)
Remarks
Youcanreturnashaperangefromaselectionwhenthepresentationisinnormal,slide,oranymasterview.
![Page 2077: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2077.jpg)
Example
Thisexamplesetsthefillforegroundcolorforalltheselectedshapesinwindowone.
Windows(1).Selection.ShapeRange.Fill_
.ForeColor.RGB=RGB(255,0,255)
![Page 2078: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2078.jpg)
ShapesPropertyReturnsaShapescollectionthatrepresentsalltheelementsthathavebeenplacedorinsertedonthespecifiedslide,slidemaster,orrangeofslides.Thiscollectioncancontainthedrawings,shapes,OLEobjects,pictures,textobjects,titles,headers,footers,slidenumbers,anddateandtimeobjectsonaslide,orontheslideimageonanotespage.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 2079: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2079.jpg)
Example
Thisexampleaddsarectanglethat's100pointswideand50pointshigh,andwhoseupper-leftcorneris5pointsfromtheleftedgeofslideoneintheactivepresentationand25pointsfromthetopoftheslide.
SetfirstSlide=ActivePresentation.Slides(1)
firstSlide.Shapes.AddShapemsoShapeRectangle,5,25,100,50
Thisexamplesetsthefilltextureforshapethreeonslideoneintheactivepresentation.
SetnewRect=ActivePresentation.Slides(1).Shapes(3)
newRect.Fill.PresetTexturedmsoTextureOak
Assumingthatslideoneintheactivepresentationcontainsatitle,boththesecondandthirdlinesofcodeinthefollowingexamplesetthetitletextonslideoneinthepresentation.
SetfirstSl=ActivePresentation.Slides(1)
firstSl.Shapes.Title.TextFrame.TextRange.Text="Sometitletext"
firstSl.Shapes(1).TextFrame.TextRange.Text="Othertitletext"
Assumingthatshapetwoonslidetwointheactivepresentationcontainsatextframe,thefollowingexampleaddsaseriesofparagraphstotheslide.NotethatChr(13)isusedtoinsertparagraphmarkswithinthetext.
SettShape=ActivePresentation.Slides(2).Shapes(2)
tShape.TextFrame.TextRange.Text="FirstItem"&Chr(13)&_
"SecondItem"&Chr(13)&"ThirdItem"
Formostslidelayouts,thefirstshapesontheslidearetextplaceholders,andthefollowingexampleaccomplishesthesametaskastheprecedingexample.
SettestShape=ActivePresentation.Slides(2).Shapes.Placeholders(2)
testShape.TextFrame.TextRange.Text="FirstItem"&_
Chr(13)&"SecondItem"&Chr(13)&"ThirdItem"
![Page 2080: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2080.jpg)
![Page 2081: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2081.jpg)
SharedWorkspacePropertyReturnsaSharedWorkspaceobjectthatrepresentstheDocumentWorkspaceinwhichaspecifiedpresentationislocated.Read-only.
expression.SharedWorkspace
expressionRequired.AnexpressionthatreturnsaPresentationobject.
![Page 2082: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2082.jpg)
Remarks
UsetheSharedWorkspaceobjecttoaddtheactiveMicrosoftPowerPointpresentationtoaMicrosoftWindowsSharePointServicesDocumentWorkspacesiteontheserverinordertotakeadvantageoftheworkspace'scollaborationfeatures,ortodisconnectorremovethedocumentfromtheworkspace.UsetheSharedWorkspaceobject'scollectionstomanagefiles,folders,links,membersandtasksassociatedwiththeshareddocument.
TheSharedWorkspaceobjectmodelisavailablewhetherornotadocumentisstoredinaworkspace.TheSharedWorkspacepropertyofthePresentationobjectdoesnotreturnNothingwhenthedocumentisnotshared.UsetheConnectedpropertyoftheSharedWorkspaceobjecttodeterminewhethertheactivepresentationisinfactsavedinandconnectedtoasharedworkspace.
Usersrequireappropriatepermissionstousetheobjects,properties,andmethodsintheSharedWorkspaceobjecthierarchy.
UsetheSharedWorkspaceFilescollection,accessedthroughtheFilespropertyoftheSharedWorkspaceobject,tomanagepresentationsandfilessavedinasharedworkspace.
UsetheSharedWorkspaceFolderscollection,accessedthroughtheFolderspropertyoftheSharedWorkspaceobject,tomanagesubfolderswithinthemaindocumentlibraryfolderofasharedworkspace.
UsetheSharedWorkspaceLinkscollection,accessedthroughtheLinkspropertyoftheSharedWorkspaceobject,tomanagelinkstoadditionaldocumentsandinformationofinteresttothememberswhoarecollaboratingonthedocumentsinthesharedworkspace.
UsetheSharedWorkspaceMemberscollection,accessedthroughtheMemberspropertyoftheSharedWorkspaceobject,tomanageuserswhohaverightstoparticipateinasharedworkspaceandtocollaborateontheshareddocumentssavedintheworkspace.
UsetheSharedWorkspaceTaskscollection,accessedthroughtheTaskspropertyoftheSharedWorkspaceobject,tomanagetasksassignedtothe
![Page 2083: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2083.jpg)
memberswhoarecollaboratingonthedocumentsinthesharedworkspace.
UsetheCreateNewmethodtocreateanewDocumentWorkspaceandtoaddtheactivedocumenttotheworkspace.UsetheNameandURLpropertiestoreturninformationabouttheworkspace.
TheSharedWorkspaceobjectusesalocalcacheofobjectsandpropertiesfromtheserver.Thedevelopermayneedtoupdatethiscachebeforeperformingcertainoperationsortosavecachedpropertychangesbacktotheserver.UsetheRefreshmethodoftheSharedWorkspaceobjecttorefreshthelocalcachefromtheserver,andtheLastRefreshedpropertytodeterminewhentherefreshoperationlasttookplace.UsetheSavemethodoftheSharedWorkspaceLinkandSharedWorkspaceTaskobjectsaftermodifyingtheirpropertieslocally,inordertouploadthechangestotheserver.
UsetheDisconnectmethodtodisconnectthelocalcopyoftheactivedocumentfromthesharedworkspace,whileleavingthesharedcopyintactintheworkspace.UsetheRemoveDocumentmethodtoremovetheshareddocumentfromthesharedworkspaceentirely.
Usersrequireappropriatepermissionstousetheobjects,properties,andmethodsintheSharedWorkspaceobjecthierarchy.UsetheRoleargumentwhenaddingmemberstotheSharedWorkspaceMemberscollectiontospecifythesetofpermissionsspecifictoeachworkspacemember.
WhenusingtheSharedWorkspaceobjectmodel,itispossibletocreateconditionswheretheSharedWorkspaceobjectcacheisnotsynchronizedwiththeuserinterfacedisplayedintheSharedWorkspacepaneoftheactivedocument.Forexample,iftheCreateNewmethodprogrammaticallyaddstheactivedocumenttoanewworkspacewhiletheSharedWorkspacepaneisopen,theSharedWorkspacepanewillcontinuetodisplaytheCreateNewbutton.Incircumstanceslikethese,iftheusermakesaselectionintheSharedWorkspacepanethatisnolongervalid,anerrorisraisedandarefreshoperationiscarriedouttosynchronizethedisplaywiththecurrentdocumentstateandsharedworkspacedata.
ThePresentationobjectalsohasaSyncpropertywhichreturnsaSyncobject.UsetheSyncobjectanditspropertiesandmethodstomanagethesynchronizationofthelocalandtheservercopiesoftheshareddocument.
![Page 2084: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2084.jpg)
Example
ThefollowingexamplereturnsareferencetotheDocumentWorkspaceinwhichtheactivepresentationisstored.ThisexampleassumesthattheactivedocumentbelongstoaDocumentWorkspace.
DimobjWorkspaceAsSharedWorkspace
SetobjWorkspace=ActivePresentation.SharedWorkspace
![Page 2085: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2085.jpg)
ShowAll
![Page 2086: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2086.jpg)
ShowScrollbarPropertyMsoTruetodisplaythescrollbarduringaslideshowinbrowsemode.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueNotusedwiththisproperty.msoFalsemsoTriStateMixedNotusedwiththisproperty.msoTriStateToggleNotusedwiththisproperty.msoTrue
expression.ShowScrollbar
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2087: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2087.jpg)
Remarks
UsetheShowTypepropertypriortosettingtheShowScrollbarproperty.
![Page 2088: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2088.jpg)
Example
Thisexamplespecifiestodisplaytheslideshowfortheactivepresentationinawindowanddisplaysascrollbarusedforbrowsingthroughtheslidesduringaslideshow.
SubShowSlideShowScrollBar()
WithActivePresentation.SlideShowSettings
.ShowType=ppShowTypeWindow
.ShowScrollBar=msoTrue
EndWith
EndSub
![Page 2089: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2089.jpg)
ShowAll
![Page 2090: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2090.jpg)
ShowSlideAnimationPropertyDetermineswhetherslideanimationsareenabledwhenpreviewing,saving,orpublishingaWebpresentation.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.msoTriStateMixedmsoTriStateTogglemsoTrueSlideanimationsareenabledwhenpreviewing,saving,orpublishingaWebpresentation.
![Page 2091: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2091.jpg)
Example
ThisexamplespecifiesthatslideanimationsinpresentationtwoareenabledfortheWebpresentation.ItthenpreviewstheWebpage.
WithPresentations(2)
.WebOptions.ShowSlideAnimation=msoTrue
.WebPagePreview
EndWith
![Page 2092: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2092.jpg)
ShowAll
![Page 2093: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2093.jpg)
ShowStartupDialogPropertyMsoTruetodisplaytheNewPresentationtaskpanewhenMicrosoftPowerPointisstarted.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseHidestheNewPresentationsidepane.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueDefault.DisplaystheNewPresentationsidepane.
expression.ShowStartupDialog
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2094: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2094.jpg)
Example
ThefollowinglineofcodedisablestheNewPresentationtaskpanewhenPowerPointstarts.
SubDontShowStartup
Application.ShowStartupDialog=msoFalse
EndSub
![Page 2095: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2095.jpg)
ShowAll
![Page 2096: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2096.jpg)
ShowTypePropertyReturnsorsetstheshowtypeforthespecifiedslideshow.Read/writePpSlideShowType.
PpSlideShowTypecanbeoneofthesePpSlideShowTypeconstants.ppShowTypeKioskppShowTypeSpeakerppShowTypeWindow
expression.ShowType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2097: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2097.jpg)
Example
Thisexamplerunsaslideshowoftheactivepresentationinawindow,startingwithslidetwoandendingwithslidefour.Thenewslideshowwindowisplacedintheupper-leftcornerofthescreen,anditswidthandheightareboth300points.
WithActivePresentation.SlideShowSettings
.RangeType=ppShowSlideRange
.StartingSlide=2
.EndingSlide=4
.ShowType=ppShowTypeWindow
With.Run
.Left=0
.Top=0
.Width=300
.Height=300
EndWith
EndWith
![Page 2098: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2098.jpg)
ShowAll
![Page 2099: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2099.jpg)
ShowWindowsInTaskbarPropertyDetermineswhetherthereisaseparateWindowstaskbarbuttonforeachopenpresentation.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueDefault.ThereisaseparateWindowstaskbarbuttonforeachopenpresentation.
![Page 2100: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2100.jpg)
Remarks
WhensettoTrue,thispropertysimulatesthelookofasingle-documentinterface(SDI),whichmakesiteasiertonavigatebetweenopenpresentations.However,ifyouworkwithmultiplepresentationswhileotherapplicationsareopen,youmaywanttosetthispropertytoFalsetoavoidfillingyourtaskbarwithunnecessarybuttons.
ThispropertyisavailableonlywhenusingMicrosoftOfficewithWindowsUpdateorWindows2000.
![Page 2101: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2101.jpg)
Example
Thisexamplespecifiesthateachopenpresentationdoesn'thaveaseparateWindowstaskbarbutton.
Application.ShowWindowsInTaskbar=msoFalse
![Page 2102: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2102.jpg)
ShowAll
![Page 2103: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2103.jpg)
ShowWithAnimationPropertyDetermineswhetherthespecifiedslideshowdisplaysshapeswithassignedanimationsettings.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedslideshowdisplaysshapeswithassignedanimationsettings.
![Page 2104: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2104.jpg)
Example
Thisexamplerunsaslideshowoftheactivepresentationwithanimationandnarrationturnedoff.
WithActivePresentation.SlideShowSettings
.ShowWithAnimation=msoFalse
.ShowWithNarration=msoFalse
.Run
EndWith
![Page 2105: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2105.jpg)
ShowAll
![Page 2106: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2106.jpg)
ShowWithNarrationPropertyDetermineswhetherthespecifiedslideshowisshownwithnarration.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedslideshowisshownwithnarration.
![Page 2107: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2107.jpg)
Example
Thisexamplerunsaslideshowoftheactivepresentationwithanimationandnarrationturnedoff.
WithActivePresentation.SlideShowSettings
.ShowWithAnimation=msoFalse
.ShowWithNarration=msoFalse
.Run
EndWith
![Page 2108: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2108.jpg)
SignaturesPropertyReturnsaSignatureSetobjectthatrepresentsacollectionofdigitalsignatures.
expression.Signatures
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2109: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2109.jpg)
Example
Thefollowinglineofcodedisplaysthenumberofdigitalsignatures.
SubDisplayNumberOfSignatures
MsgBox"Numberofdigitalsignatures:"&_
ActivePresentation.Signatures.Count
EndSub
![Page 2110: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2110.jpg)
SizePropertyReturnsorsetsthecharactersize,inpoints.Read/writeSingle.
![Page 2111: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2111.jpg)
Example
Thisexamplesetsthesizeofthetextattachedtoshapeoneonslideoneto24points.
Application.ActivePresentation.Slides(1)_
.Shapes(1).TextFrame.TextRange.Font_
.Size=24
![Page 2112: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2112.jpg)
ShowAll
![Page 2113: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2113.jpg)
SlidePropertySlidepropertyasitappliestotheViewobject.
ReturnsorsetsaSlideobjectthatrepresentstheslidethat'scurrentlydisplayedinthespecifieddocumentwindowview.Read/write.
expression.Slide
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
SlidepropertyasitappliestotheSlideShowViewobject.
ReturnsaSlideobjectthatrepresentstheslidethat'scurrentlydisplayedinthespecifiedslideshowwindowview.Read-only.
expression.Slide
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 2114: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2114.jpg)
Remarks
Ifthecurrentlydisplayedslideisfromanembeddedpresentation,youcanusetheParentpropertyoftheSlideobjectreturnedbytheSlidepropertytoreturntheembeddedpresentationthatcontainstheslide.(ThePresentationpropertyoftheSlideShowWindowobjectorDocumentWindowobjectreturnsthepresentationfromwhichthewindowwascreated,nottheembeddedpresentation.)
![Page 2115: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2115.jpg)
Example
AsitappliestotheViewobject.
ThisexampleplacesontheClipboardacopyoftheslidethat'scurrentlydisplayedinslideshowwindowone.
SlideShowWindows(1).View.Slide.Copy
Thisexampledisplaysthenameofthepresentationcurrentlyrunninginslideshowwindowone.
MsgBoxSlideShowWindows(1).View.Slide.Parent.Name
![Page 2116: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2116.jpg)
SlideElapsedTimePropertyReturnsthenumberofsecondsthatthecurrentslidehasbeendisplayed.Read/writeLong.
![Page 2117: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2117.jpg)
Remarks
UsetheResetSlideTimemethodtoresettheelapsedtimefortheslidethat'scurrentlydisplayed.
![Page 2118: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2118.jpg)
Example
Thisexamplesetsavariabletotheelapsedtimefortheslidethat'scurrentlydisplayedinslideshowwindowoneandthendisplaysthevalueofthevariable.
currTime=SlideShowWindows(1).View.SlideElapsedTime
MsgBoxcurrTime
![Page 2119: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2119.jpg)
SlideHeightPropertyReturnsorsetstheslideheight,inpoints.Read/writeSingle.
![Page 2120: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2120.jpg)
Example
Thisexamplesetstheslideheightto8.5inchesandtheslidewidthto11inchesfortheactivepresentation.
WithApplication.ActivePresentation.PageSetup
.SlideWidth=11*72
.SlideHeight=8.5*72
EndWith
![Page 2121: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2121.jpg)
SlideIDPropertyReturnsauniqueIDnumberforthespecifiedslide.Read-onlyLong.
![Page 2122: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2122.jpg)
Remarks
UnliketheSlideIndexproperty,theSlideIDpropertyofaSlideobjectwon'tchangewhenyouaddslidestothepresentationorrearrangetheslidesinthepresentation.Therefore,usingtheFindBySlideIDmethodwiththeslide'sIDnumbercanbeamorereliablewaytoreturnaspecificSlideobjectfromaSlidescollectionthanusingtheItemmethodwiththeslide'sindexnumber.
![Page 2123: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2123.jpg)
Example
ThisexampledemonstrateshowtoretrievetheuniqueIDnumberforaSlideobjectandthenusethisnumbertoreturnthatSlideobjectfromtheSlidescollection.
Setgslides=ActivePresentation.Slides
'GetslideID
graphSlideID=gslides.Add(2,ppLayoutChart).SlideID
gslides.FindBySlideID(graphSlideID)_
.SlideShowTransition.EntryEffect=_
ppEffectCoverLeft'UseIDtoreturnspecificslide
![Page 2124: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2124.jpg)
SlideIDsPropertyReturnsanarrayofslideIDsforthespecifiednamedslideshow.Read-onlyVariant.
![Page 2125: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2125.jpg)
Example
Thisexampleaddsthecurrentslideintheactivewindowtothecustomslideshownamed"MarketingShortVersion."Notethattosaveamodifiedversionofthecustomslideshow,youmustdeletetheoriginalcustomshowandthenadditagain,usingthesamename.AlsonotethatifyouwanttoresizeanarraycontainedinaVariantvariable,youmustexplicitlydeclarethevariablebeforeattemptingtoresizeitsarray.
'NOTE-ThefollowingcodelineisNOToptional.
'Can'tredimarraywithoutthis
DimcustomShowSlideIDsAsVariant
DimcustomShowToExpandAsNamedSlideShow
customShowName="MarketingShortVersion"
SetcustomShowToExpand=ActivePresentation.SlideShowSettings_
.NamedSlideShows(customShowName)
slideToAddID=ActiveWindow.View.Slide.SlideID
customShowSlideIDs=customShowToExpand.SlideIDs
numSlides=UBound(customShowSlideIDs)
ReDimPreservecustomShowSlideIDs(numSlides+1)
customShowSlideIDs(numSlides+1)=slideToAddID
customShowToExpand.Delete
ActivePresentation.SlideShowSettings.NamedSlideShows_
.AddcustomShowName,customShowSlideIDs
![Page 2126: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2126.jpg)
SlideIndexPropertyReturnstheindexnumberofthespecifiedslidewithintheSlidescollection.Read-onlyLong.
![Page 2127: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2127.jpg)
Remarks
UnliketheSlideIDproperty,theSlideIndexpropertyofaSlideobjectcanchangewhenyouaddslidestothepresentationorrearrangetheslidesinthepresentation.Therefore,usingtheFindBySlideIDmethodwiththeslide'sIDnumbercanbeamorereliablewaytoreturnaspecificSlideobjectfromaSlidescollectionthanusingtheItemmethodwiththeslide'sindexnumber.
![Page 2128: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2128.jpg)
Example
Thisexampledisplaystheindexnumberofthecurrentlydisplayedslideinslideshowwindowone.
MsgBoxSlideShowWindows(1).View.Slide.SlideIndex
![Page 2129: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2129.jpg)
SlideMasterPropertyReturnsaMasterobjectthatrepresentstheslidemaster.
expression.SlideMaster
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2130: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2130.jpg)
Example
Thisexamplesetsthebackgroundpatternfortheslidemasterfortheactivepresentation.
Application.ActivePresentation.SlideMaster.Background.Fill_
.PresetTexturedmsoTextureGreenMarble
![Page 2131: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2131.jpg)
ShowAll
![Page 2132: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2132.jpg)
SlideNumberPropertySlideNumberpropertyasitappliestotheHeadersFootersobject.
ReturnsaHeaderFooterobjectthatrepresentstheslidenumberinthelower-rightcornerofaslide,orthepagenumberinthelower-rightcornerofanotespageorapageofaprintedhandoutoroutline.Read-only.
expression.SlideNumber
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
SlideNumberpropertyasitappliestotheSlideandSlideRangeobjects.
Returnstheslidenumber.Read-onlyInteger.
expression.SlideNumber
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 2133: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2133.jpg)
Remarks
TheSlideNumberpropertyofaSlideobjectistheactualnumberthatappearsinthelower-rightcorneroftheslidewhenyoudisplayslidenumbers.Thisnumberisdeterminedbythenumberoftheslidewithinthepresentation(theSlideIndexpropertyvalue)andthestartingslidenumberforthepresentation(theFirstSlideNumberpropertyvalue).Theslidenumberisalwaysequaltothestartingslidenumber+theslideindexnumber–1.
![Page 2134: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2134.jpg)
Example
AsitappliestotheHeadersFootersobject.
Thisexamplehidestheslidenumberonslidetwointheactivepresentationifthenumberiscurrentlyvisible,oritdisplaystheslidenumberifit'scurrentlyhidden.
WithApplication.ActivePresentation.Slides(2)_
.HeadersFooters.SlideNumber
If.VisibleThen
.Visible=False
Else
.Visible=True
EndIf
EndWith
AsitappliestotheSlideandSlideRangeobjects.
Thisexampleshowshowchangingthefirstslidenumberaffectstheslidenumberofaspecificslide.
WithApplication.ActivePresentation
.PageSetup.FirstSlideNumber=1'startsslidenumberingat1
MsgBox.Slides(2).SlideNumber'returns2
.PageSetup.FirstSlideNumber=10'startsslidenumberingat10
MsgBox.Slides(2).SlideNumber'returns11
EndWith
![Page 2135: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2135.jpg)
ShowAll
![Page 2136: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2136.jpg)
SlideOrientationPropertyReturnsorsetstheon-screenandprintedorientationofslidesinthespecifiedpresentation.Read/writeMsoOrientation.
MsoOrientationcanbeoneoftheseMsoOrientationconstants.msoOrientationHorizontalmsoOrientationMixedmsoOrientationVertical
expression.SlideOrientation
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2137: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2137.jpg)
Example
Thisexamplesetsorientationofallslidesintheactivepresentationtovertical(portrait).
Application.ActivePresentation.PageSetup.SlideOrientation=_
msoOrientationVertical
![Page 2138: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2138.jpg)
SlideRangePropertyReturnsaSlideRangeobjectthatrepresentsarangeofselectedslides.Read-only.
![Page 2139: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2139.jpg)
Remarks
Asliderangecanbeconstructedinslideview,slidesorterview,normalview,notespageview,oroutlineview.Inslideview,SlideRangereturnsoneslide—thecurrent,displayedslide.
![Page 2140: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2140.jpg)
Example
Thisexamplesetsthebackgroundschemecolorforalltheselectedslidesinwindowone.
Windows(1).Selection.SlideRange.ColorScheme_
.Colors(ppBackground).RGB=RGB(0,0,255)
![Page 2141: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2141.jpg)
SlidesPropertyReturnsaSlidescollectionthatrepresentsallslidesinthespecifiedpresentation.Read-only.
![Page 2142: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2142.jpg)
Example
Thisexampleaddsaslidetotheactivepresentation.
Application.ActivePresentation.Slides.Add1,ppLayoutTitle
![Page 2143: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2143.jpg)
ShowAll
![Page 2144: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2144.jpg)
SlideShowNamePropertySlideShowNamepropertyasitappliestotheActionSetting,
PrintOptions,PublishObject,andSlideShowSettingsobjects.
Returnsorsetsthenameofthecustomslideshowtoruninresponsetoamouseactionontheshapeduringaslideshow(ActionSettingobject),returnsorsetsthenameofthecustomslideshowtoprint(PrintOptionsobject),orreturnsorsetsthenameofthecustomslideshowpublishedasawebpresentation(PublishObjectobject).Read/writeString.
expression.SlideShowName
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 2145: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2145.jpg)
Remarks
TheRangeTypepropertymustbesettoppPrintNamedSlideShowtoprintacustomslideshow.
SlideShowNamepropertyasitappliestotheSlideShowViewobject.
Returnsthenameofthecustomslideshowthat'scurrentlyrunninginthespecifiedslideshowview.Read-onlyString.
expression.SlideShowName
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 2146: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2146.jpg)
Example
AsitappliestotheActionSetting,PrintOptions,PublishObject,andSlideShowSettingsobjects.
Thisexampleprintsanexistingcustomslideshownamed"techtalk."
WithActivePresentation.PrintOptions
.RangeType=ppPrintNamedSlideShow
.SlideShowName="techtalk"
EndWith
ActivePresentation.PrintOut
ThefollowingexamplesavesthecurrentpresentationasanHTMLversion4.0filewiththename"mallard.htm."ItthendisplaysamessageindicatingthatthecurrentnamedpresentationisbeingsavedinbothPowerPointandHTMLformats.
WithPres.PublishObjects(1)
PresName=.SlideShowName
.SourceType=ppPublishAll
.FileName="C:\HTMLPres\mallard.htm"
.HTMLVersion=ppHTMLVersion4
MsgBox("Savingpresentation"&"'"_
&PresName&"'"&"inPowerPoint"_
&Chr(10)&Chr(13)_
&"formatandHTMLversion4.0format")
.Publish
EndWith
AsitappliestotheSlideShowViewobject.
Iftheslideshowrunninginslideshowwindowoneisacustomslideshow,thisexampledisplaysitsname.
WithSlideShowWindows(1).View
If.IsNamedShowThen
MsgBox"Nowshowinginslideshowwindow1:"_
&.SlideShowName
EndIf
EndWith
![Page 2147: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2147.jpg)
![Page 2148: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2148.jpg)
SlideShowSettingsPropertyReturnsaSlideShowSettingsobjectthatrepresentstheslideshowsettingsforthespecifiedpresentation.Read-only.
![Page 2149: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2149.jpg)
Example
Thisexamplestartsaslideshowmeanttobepresentedbyaspeaker.Theslideshowwillrunwithanimationandnarrationturnedoff.
WithApplication.ActivePresentation.SlideShowSettings
.ShowType=ppShowTypeSpeaker
.ShowWithNarration=False
.ShowWithAnimation=False
.Run
EndWith
![Page 2150: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2150.jpg)
SlideShowTransitionPropertyReturnsaSlideShowTransitionobjectthatrepresentsthespecialeffectsforthespecifiedslidetransition.Read-only.
![Page 2151: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2151.jpg)
Example
Thisexamplesetsslidetwointheactivepresentationtoadvanceautomaticallyafter5secondsduringaslideshowandtoplayadogbarksoundattheslidetransition.
WithActivePresentation.Slides(2).SlideShowTransition
.AdvanceOnTime=True
.AdvanceTime=5
.SoundEffect.ImportFromFile"c:\windows\media\dogbark.wav"
EndWith
ActivePresentation.SlideShowSettings.AdvanceMode=_
ppSlideShowUseSlideTimings
![Page 2152: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2152.jpg)
SlideShowWindowPropertyReturnsaSlideShowWindowobjectthatrepresentstheslideshowwindowinwhichthespecifiedpresentationisrunning.Read-only.
![Page 2153: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2153.jpg)
Remarks
YoucanusethispropertyinconjunctionwiththeMekeywordandtheParentpropertytoreturntheslideshowwindowinwhichanActiveXcontroleventwasfired,asshownintheexample.
![Page 2154: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2154.jpg)
Example
ThefollowingexampleshowstheClickeventproceduresforbuttonsnamed"cmdBack"and"cmdForward".Ifyouaddthesebuttonstotheslidemasterandaddtheseeventprocedurestothem,allslidesbasedonthemaster(andsettoshowmasterbackgroundgraphics)willhavethesenavigationbuttonsthatwillbeactiveduringaslideshow.TheMekeywordreturnstheMasterobjectthatrepresentstheslidemasterthatcontainsthecontrol.Ifthecontrolwereonanindividualslide,theMekeywordinaneventprocedureforthatcontrolwouldreturnaSlideobject.
PrivateSubcmdBack_Click()
Me.Parent.SlideShowWindow.View.Previous
EndSub
PrivateSubcmdForward_Click()
Me.Parent.SlideShowWindow.View.Next
EndSub
![Page 2155: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2155.jpg)
SlideShowWindowsPropertyReturnsaSlideShowWindowscollectionthatrepresentsallopenslideshowwindows.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 2156: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2156.jpg)
Example
Thisexamplerunsaslideshowinawindowandsetstheheightandwidthoftheslideshowwindow.
WithApplication
.Presentations(1).SlideShowSettings.Run
With.SlideShowWindows(1)
.Height=250
.Width=250
EndWith
EndWith
![Page 2157: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2157.jpg)
ShowAll
![Page 2158: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2158.jpg)
SlideSizePropertyReturnsorsetstheslidesizeforthespecifiedpresentation.Read/writePpSlideSizeType.
PpSlideSizeTypecanbeoneofthesePpSlideSizeTypeconstants.ppSlideSize35MMppSlideSizeA3PaperppSlideSizeA4PaperppSlideSizeB4ISOPaperppSlideSizeB4JISPaperppSlideSizeB5ISOPaperppSlideSizeB5JISPaperppSlideSizeBannerppSlideSizeCustomppSlideSizeHagakiCardppSlideSizeLedgerPaperppSlideSizeLetterPaperppSlideSizeOnScreenppSlideSizeOverhead
expression.SlideSize
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2159: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2159.jpg)
Example
Thisexamplesetstheslidesizetooverheadfortheactivepresentation.
Application.ActivePresentation.PageSetup_
.SlideSize=ppSlideSizeOverhead
![Page 2160: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2160.jpg)
SlideWidthPropertyReturnsorsetstheslidewidth,inpoints.Read/writeSingle.
![Page 2161: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2161.jpg)
Example
Thisexamplesetstheslideheightto8.5inchesandtheslidewidthto11inchesfortheactivepresentation.
WithApplication.ActivePresentation.PageSetup
.SlideWidth=11*72
.SlideHeight=8.5*72
EndWith
![Page 2162: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2162.jpg)
ShowAll
![Page 2163: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2163.jpg)
SmoothPropertySetsorreturnsanMsoTriStatethatrepresentswhetherthetransitionfromoneanimationpointtoanotherissmoothed.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseTheanimationpointshouldnotbesmoothed.msoTriStateMixedmsoTriStateTogglemsoTrueDefault.Theanimationshouldbesmoothed.
expression.Smooth
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2164: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2164.jpg)
Example
Thisexamplechangessmoothingforananimationpoint.
SubChangeSmooth(ByValaniAsAnimationBehavior,ByValblnAsMsoTriState)
ani.PropertyEffect.Points.Smooth=bln
EndSub
![Page 2165: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2165.jpg)
ShowAll
![Page 2166: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2166.jpg)
SmoothEndPropertySetsorreturnsanMsoTriStateconstantthatrepresentswhetherananimationshoulddecelerateasitends.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseDefault.Ananimationdoesnotdeceleratewhenitends.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueAnanimationdecelerateswhenitends.
expression.SmoothEnd
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2167: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2167.jpg)
Example
Thefollowingexampleaddsashapetoaslide,animatestheshape,andinstructstheshapetodeceleratewhenitends.
SubAddShapeSetTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
'Addsshapeandsetsanimationeffect
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectPathDiamond)
'Setsdurationofeffectandslowsanimationatend
WitheffDiamond.Timing
.Duration=5
.SmoothEnd=msoTrue
EndWith
EndSub
![Page 2168: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2168.jpg)
ShowAll
![Page 2169: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2169.jpg)
SmoothStartPropertySetsorreturnsanMsoTriStateconstantthatrepresentswhetherananimationshouldacceleratewhenitstarts.Read/write.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTrueDoesn'tapplytothisproperty.msoFalseDefault.Theanimationdoesnotacceleratewhenitstarts.msoTriStateMixedDoesn'tapplytothisproperty.msoTriStateToggleDoesn'tapplytothisproperty.msoTrueTheanimationaccelerateswhenitstarts.
expression.SmoothStart
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2170: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2170.jpg)
Example
Thefollowingexampleaddsashapetoaslide,animatestheshape,andinstructstheshapetoacceleratewhenitstarts.
SubAddShapeSetTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectPathDiamond)
WitheffDiamond.Timing
.Duration=5
.SmoothStart=msoTrue
EndWith
EndSub
![Page 2171: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2171.jpg)
ShowAll
![Page 2172: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2172.jpg)
SnapToGridPropertyMsoTruetosnapshapestothegridlinesinthespecifiedpresentation.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrue
expression.SnapToGrid
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2173: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2173.jpg)
Example
Thisexampletogglessnappingshapestothegridlinesintheactivepresentation.
SubToggleSnapToGrid()
WithActivePresentation
If.SnapToGrid=msoTrueThen
.SnapToGrid=msoFalse
Else
.SnapToGrid=msoTrue
EndIf
EndWith
EndSub
![Page 2174: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2174.jpg)
SoundEffectPropertyActionSettingobject:ReturnsaSoundEffectobjectthatrepresentsthesoundtobeplayedwhenthespecifiedshapeisclickedorthemousepointerpassesovertheshape.Ifyoudon'thearthesoundthatyouassignedtotheshapewhenyouruntheslideshow,makesurethattheTextLevelEffectpropertyissettoavalueotherthanppAnimateLevelNoneandthattheAnimatepropertyissettoTrue.
AnimationSettingsandEffectInformationobjects:ReturnsaSoundEffectobjectthatrepresentsthesoundtobeplayedduringtheanimationofthespecifiedshape.
SlideShowTransitionobject:ReturnsaSoundEffectobjectthatrepresentsthesoundtobeplayedduringthetransitiontothespecifiedslide.
expression.SoundEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2175: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2175.jpg)
Example
ThisexamplesetsthefileBass.wavtobeplayedwhenevershapeoneonslideoneintheactivepresentationisanimated.
WithActivePresentation.Slides(1).Shapes(1).AnimationSettings
.Animate=True
.TextLevelEffect=ppAnimateByAllLevels
.SoundEffect.ImportFromFile"c:\bass.wav"
EndWith
![Page 2176: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2176.jpg)
SourceFullNamePropertyReturnsorsetsthenameandpathofthesourcefileforthelinkedOLEobject.Read/writeString.
![Page 2177: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2177.jpg)
Example
ThisexamplesetsthesourcefileforshapeoneonslideoneintheactivepresentationtoWordtest.docandspecifiesthattheobject'simagebeupdatedautomatically.
WithActivePresentation.Slides(1).Shapes(1)
If.Type=msoLinkedOLEObjectThen
With.LinkFormat
.SourceFullName="c:\mydocuments\wordtest.doc"
.AutoUpdate=ppUpdateOptionAutomatic
EndWith
EndIf
EndWith
![Page 2178: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2178.jpg)
ShowAll
![Page 2179: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2179.jpg)
SourceTypePropertyReturnsorsetsthesourcetypeofthepresentationtobepublishedtoHTML.Read/writePpPublishSourceType.
PpPublishSourceTypecanbeoneofthesePpPublishSourceTypeconstants.ppPublishAllppPublishNamedSlideShowUsethisvaluetopublishacustomslideshow,specifyingthenameofthecustomslideshowwiththeSlideShowNameproperty.ppPublishSlideRange
expression.SourceType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2180: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2180.jpg)
Example
Thisexamplepublishesthespecifiedsliderange(slidesthreethroughfive)oftheactivepresentationtoHTML.ItnamesthepublishedpresentationMallard.htm.
WithActivePresentation.PublishObjects(1)
.FileName="C:\Test\Mallard.htm"
.SourceType=ppPublishSlideRange
.RangeStart=3
.RangeEnd=5
.Publish
EndWith
![Page 2181: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2181.jpg)
SpaceAfterPropertyReturnsorsetstheamountofspaceafterthelastlineineachparagraphofthespecifiedtext,inpointsorlines.Read/writeSingle.
![Page 2182: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2182.jpg)
Example
Thisexamplesetsthespacingafterparagraphsto6pointsforthetextinshapetwoonslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Shapes(2)
With.TextFrame.TextRange.ParagraphFormat
.LineRuleAfter=False
.SpaceAfter=6
EndWith
EndWith
![Page 2183: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2183.jpg)
SpaceBeforePropertyReturnsorsetstheamountofspacebeforethefirstlineineachparagraphofthespecifiedtext,inpointsorlines.Read/writeSingle.
![Page 2184: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2184.jpg)
Example
Thisexamplesetsthespacingbeforeparagraphsto6pointsforthetextinshapetwoonslideintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Shapes(2)
With.TextFrame.TextRange.ParagraphFormat
.LineRuleBefore=False
.SpaceBefore=6
EndWith
EndWith
![Page 2185: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2185.jpg)
SpaceWithinPropertyReturnsorsetstheamountofspacebetweenbaselinesinthespecifiedtext,inpointsorlines.Read/writeSingle.
![Page 2186: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2186.jpg)
Example
Thisexamplesetslinespacingto21pointsforthetextinshapetwoonslidetwointheactivepresentation.
WithApplication.ActivePresentation.Slides(2).Shapes(2)
With.TextFrame.TextRange.ParagraphFormat
.LineRuleWithin=False
.SpaceWithin=21
EndWith
EndWith
![Page 2187: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2187.jpg)
ShowAll
![Page 2188: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2188.jpg)
SpeakerNotesPropertyDetermineswhetherspeakernotesaretobepublishedwiththepresentation.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueSpeakernotesaretobepublishedwiththepresentation.
![Page 2189: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2189.jpg)
Example
ThisexamplepublishesslidesthreethroughfiveoftheactivepresentationtoHTML.Itincludestheassociatedspeaker'snoteswiththepublishedpresentationandnamesitMallard.htm.
WithActivePresentation.PublishObjects(1)
.FileName="C:\Test\Mallard.htm"
.SourceType=ppPublishSlideRange
.RangeStart=3
.RangeEnd=5
.SpeakerNotes=msoTrue
.Publish
EndWith
![Page 2190: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2190.jpg)
ShowAll
![Page 2191: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2191.jpg)
SpeedPropertySpeedpropertyasitappliestotheSlideShowTransitionobject.
ReturnsorsetsaPpTransitionSpeedconstantthatrepresentsthespeedofthetransitiontothespecifiedslide.Read/write.
PpTransitionSpeedcanbeoneofthesePpTransitionSpeedconstants.ppTransitionSpeedFastppTransitionSpeedMediumppTransitionSpeedMixedppTransitionSpeedSlow
expression.Speed
expressionRequired.AnexpressionthatreturnsaSlideShowTransitionobject.
SpeedpropertyasitappliestotheTimingobject.
ReturnsorsetsaSinglethatrepresentsthespeed,inseconds,ofthespecifiedanimation.Read/write.
expression.Speed
expressionRequired.AnexpressionthatreturnsaTimingobject.
![Page 2192: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2192.jpg)
Example
AsitappliestotheSlideShowTransitionobject.
Thisexamplesetsthespecialeffectforthetransitiontothefirstslideintheactivepresentationandspecifiesthatthetransitionbefast.
WithActivePresentation.Slides(1).SlideShowTransition
.EntryEffect=ppEffectStripsDownLeft
.Speed=ppTransitionSpeedFast
EndWith
AsitappliestotheTimingobject.
Thisexamplesetstheanimationforthemainsequencetoreverseandsetsthespeedtoonesecond.
SubAnimPoints()
DimtmlAnimAsTimeLine
DimspdAnimAsTiming
SettmlAnim=ActivePresentation.Slides(1).TimeLine
SetspdAnim=tlnAnim.MainSequence(1).Timing
WithspdAnim
.AutoReverse=msoTrue
.Speed=1
EndWith
EndSub
![Page 2193: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2193.jpg)
SplitHorizontalPropertyReturnsorsetsthepercentageofthedocumentwindowwidththattheoutlinepaneoccupiesinnormalview.Correspondstothepanedividerpositionbetweentheslideandoutlinepanes.Read/writeLong.
![Page 2194: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2194.jpg)
Remarks
ThemaximumvalueoftheSplitHorizontalpropertyisalwayslessthan100%becausetheslidepanehasaminimumwidththatdependsona10%zoomlevel.Theactualmaximumvaluemayvarydependingonthesizeoftheapplicationwindow.
![Page 2195: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2195.jpg)
Example
Thefollowingexamplesetstheverticalpanedividerfortheactivedocumentwindowtodivideat15%outlinepaneand85%slidepane.
ActiveWindow.SplitHorizontal=15
![Page 2196: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2196.jpg)
SplitVerticalPropertyReturnsorsetsthepercentageofthedocumentwindowheightthattheslidepaneoccupiesinnormalview.Correspondstothepanedividerpositionbetweentheslideandnotespanes.Read/writeLong.
![Page 2197: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2197.jpg)
Remarks
TheminimumvalueoftheSplitVerticalpropertyisalwaysgreaterthan0%becausetheslidepanehasaminimumheightthatdependsona10%zoomlevel.Theactualminimumvaluemayvarydependingonthesizeoftheapplicationwindow.
![Page 2198: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2198.jpg)
Example
Thefollowingexamplesetsthehorizontalpanedividerfortheactivedocumentwindowtodivideat60%slidepaneand40%notespane.
ActiveWindow.SplitVertical=60
![Page 2199: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2199.jpg)
ShowAll
![Page 2200: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2200.jpg)
StartPropertyStartpropertyasitappliestothePrintRangeobject.
Returnsthenumberofthefirstslideintherangeofslidestobeprinted.Read-onlyInteger.
expression.Start
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
StartpropertyasitappliestotheTextRangeobject.
Returnsthepositionofthefirstcharacterinthespecifiedtextrangerelativetothefirstcharacterintheshapethatcontainsthetext.Read-onlyLong.
expression.Start
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 2201: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2201.jpg)
Example
AsitappliestothePrintRangeobject.
Thisexampledisplaysamessagethatindicatesthestartingandendingslidenumbersforprintrangeoneintheactivepresentation.
WithActivePresentation.PrintOptions.Ranges
If.Count>0Then
With.Item(1)
MsgBox"Printrange1startsonslide"&.Start&_
"andendsonslide"&.End
EndWith
EndIf
EndWith
![Page 2202: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2202.jpg)
StartingSlidePropertyReturnsorsetsthefirstslidetobedisplayedinthespecifiedslideshow.Read/writeLong.
![Page 2203: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2203.jpg)
Example
Thisexamplerunsaslideshowoftheactivepresentation,startingwithslidetwoandendingwithslidefour.
WithActivePresentation.SlideShowSettings
.RangeType=ppShowSlideRange
.StartingSlide=2
.EndingSlide=4
.Run
EndWith
![Page 2204: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2204.jpg)
StartValuePropertyReturnsorsetsthebeginningvalueofabulletedlistwhentheTypepropertyoftheBulletFormatobjectissettoppBulletNumbered.Thevaluemustbeintherangeof1to32767.Read/writeInteger.
![Page 2205: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2205.jpg)
Example
Thisexamplesetsthebulletsinthetextboxspecifiedbyshapetwoonslideonetostartwiththenumberfive.
WithActivePresentation.Slides(1).Shapes(2).TextFrame
With.TextRange.ParagraphFormat.Bullet
.Type=ppBulletNumbered
.StartValue=5
EndWith
EndWith
![Page 2206: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2206.jpg)
ShowAll
![Page 2207: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2207.jpg)
StatePropertyReturnsorsetsthestateoftheslideshow.Read/writePpSlideShowState.
PpSlideShowStatecanbeoneofthesePpSlideShowStateconstants.ppSlideShowBlackScreenppSlideShowDoneppSlideShowPausedppSlideShowRunningppSlideShowWhiteScreen
expression.State
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2208: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2208.jpg)
Example
Thisexamplesetstheviewstateinslideshowwindowonetoablackscreen.
SlideShowWindows(1).View.State=ppSlideShowBlackScreen
![Page 2209: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2209.jpg)
StopAfterSlidesPropertyReturnsorsetsthenumberofslidestobedisplayedbeforethemediaclipstopsplaying.Read/writeLong.
![Page 2210: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2210.jpg)
Remarks
FortheStopAfterSlidespropertysettingtotakeeffect,thePauseAnimationpropertyofthespecifiedslidemustbesettoFalse,andthePlayOnEntrypropertymustbesettoTrue.
Themediaclipwillstopplayingwhenthespecifiednumberofslideshavebeendisplayedorwhentheclipcomestoanend—whichevercomesfirst.Avalueof0(zero)specifiesthattheclipwillstopplayingafterthecurrentslide.
![Page 2211: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2211.jpg)
Example
Thisexamplespecifiesthatthemediacliprepresentedbyshapethreeonslideoneintheactivepresentationwillbeplayedautomaticallywhenit'sanimated,thattheslideshowwillcontinuewhilethemediaclipisplayinginthebackground,andthattheclipwillstopplayingafterthreeslidesaredisplayedorwhentheendoftheclipisreached—whichevercomesfirst.Shapethreemustbeasoundormovieobject.
SetOLEobj=ActivePresentation.Slides(1).Shapes(3)
WithOLEobj.AnimationSettings.PlaySettings
.PlayOnEntry=True
.PauseAnimation=False
.StopAfterSlides=3
EndWith
![Page 2212: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2212.jpg)
ShowAll
![Page 2213: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2213.jpg)
StylePropertyStylepropertyasitappliestotheLineFormatobject.
Returnsorsetsthelinestyle.Read/writeMsoLineStyle.
MsoLineStylecanbeoneoftheseMsoLineStyleconstants.msoLineSinglemsoLineStyleMixedmsoLineThickBetweenThinmsoLineThickThinmsoLineThinThickmsoLineThinThin
expression.Style
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
StylepropertyasitappliestotheBulletFormatobject.
Returnsorsetsthebulletstyle.Read/writePpNumberedBulletStyle.Someoftheseconstantsmaynotbeavailabletoyou,dependingonthelanguagesupport(U.S.English,forexample)thatyou’veselectedorinstalled.
PpNumberedBulletStylecanbeoneofthesePpNumberedBulletStyleconstants.ppBulletAlphaLCParenBothLowercasealphabeticcharacterswithbothparentheses.ppBulletAlphaLCParenRightLowercasealphabeticcharacterswithrightparenthesis.ppBulletAlphaLCPeriodLowercasealphabeticcharacterswithaperiod.ppBulletAlphaUCParenBothUppercasealphabeticcharacterswithbothparentheses.ppBulletAlphaUCParenRightUppercasealphabeticcharacterswithrightparenthesis.
![Page 2214: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2214.jpg)
ppBulletAlphaUCPeriodUppercasealphabeticcharacterswithaperiod.ppBulletArabicAbjadDashArabicAbjadalphabetswithadash.ppBulletArabicAlphaDashArabiclanguagealphabeticcharacterswithadash.ppBulletArabicDBPeriodDouble-byteArabicnumberingschemewithdouble-byteperiod.ppBulletArabicDBPlainDouble-byteArabicnumberingscheme(nopunctuation).ppBulletArabicParenBothArabicnumeralswithbothparentheses.ppBulletArabicParenRightArabicnumeralswithrightparenthesis.ppBulletArabicPeriodArabicnumeralswithaperiod.ppBulletArabicPlainArabicnumerals.ppBulletCircleNumDBPlainDouble-bytecirclednumberforvaluesupto10.ppBulletCircleNumWDBlackPlainShadowcolornumberwithcircularbackgroundofnormaltextcolor.ppBulletCircleNumWDWhitePlainTextcolorednumberwithsamecolorcircledrawnaroundit.ppBulletHebrewAlphaDashHebrewlanguagealphabeticcharacterswithadash.ppBulletHindiAlphaPeriodppBulletHindiNumPeriodppBulletKanjiKoreanPeriodJapanese/Koreannumberswithaperiod.ppBulletKanjiKoreanPlainJapanese/Koreannumberswithoutaperiod.ppBulletRomanLCParenBothLowercaseRomannumeralswithbothparentheses.ppBulletRomanLCParenRightLowercaseRomannumeralswithrightparenthesis.ppBulletRomanLCPeriodLowercaseRomannumeralswithperiod.ppBulletRomanUCParenBothUppercaseRomannumeralswithbothparentheses.ppBulletRomanUCParenRightUppercaseRomannumeralswithrightparenthesis.ppBulletRomanUCPeriodUppercaseRomannumeralswithperiod.ppBulletSimpChinPeriodSimplifiedChinesewithaperiod.ppBulletSimpChinPlainSimplifiedChinesewithoutaperiod.
![Page 2215: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2215.jpg)
ppBulletStyleMixedAnyundefinedstyle.ppBulletThaiAlphaParenBothppBulletThaiAlphaParenRightppBulletThaiAlphaPeriodppBulletThaiNumParenBothppBulletThaiNumParenRightppBulletThaiNumPeriodppBulletTradChinPeriodTraditionalChinesewithaperiod.ppBulletTradChinPlainTraditionalChinesewithoutaperiod.
expression.Style
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 2216: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2216.jpg)
Example
AsitappliestotheLineFormatobject.
Thisexampleaddsathick,bluecompoundlinetomyDocument.Thecompoundlineconsistsofathicklinewithathinlineoneithersideofit.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(10,10,250,250).Line
.Style=msoLineThickBetweenThin
.Weight=8
.ForeColor.RGB=RGB(0,0,255)
EndWith
AsitappliestotheBulletFormatobject.
Thisexamplesetsthebulletstyleforthebulletedlist,representedbyshapeoneonthefirstslide,toashadowcolornumberwithcircularbackgroundofnormaltextcolor.
ActivePresentation.Slides(1).Shapes(1).TextFrame_
.TextRange.ParagraphFormat.Bullet_
.Style=ppBulletCircleNumWDBlackPlain
![Page 2217: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2217.jpg)
SubAddressPropertyReturnsorsetsthelocationwithinadocument—suchasabookmarkinaworddocument,arangeinaMicrosoftExcelworksheet,oraslideinaPowerPointpresentation—associatedwiththespecifiedhyperlink.Read/writeString.
![Page 2218: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2218.jpg)
Example
Thisexamplesetsshapeoneonslideoneintheactivepresentationtojumptotheslidenamed"LastQuarter"inLatestFigures.pptwhentheshapeisclickedduringaslideshow.
WithActivePresentation.Slides(1).Shapes(1)_
.ActionSettings(ppMouseClick)
.Action=ppActionHyperlink
With.Hyperlink
.Address="c:\sales\latestfigures.ppt"
.SubAddress="lastquarter"
EndWith
EndWith
ThisexamplesetsshapeoneonslideoneintheactivepresentationtojumptorangeA1:B10inLatest.xlswhentheshapeisclickedduringaslideshow.
WithActivePresentation.Slides(1).Shapes(1)_
.ActionSettings(ppMouseClick)
.Action=ppActionHyperlink
With.Hyperlink
.Address="c:\sales\latest.xls"
.SubAddress="A1:B10"
EndWith
EndWith
![Page 2219: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2219.jpg)
ShowAll
![Page 2220: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2220.jpg)
SubscriptPropertyDetermineswhetherthespecifiedtextissubscript.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.Thespecifiedtextisnotsubscript.msoTriStateMixedSomecharactersaresubscriptandsomearen't.msoTriStateTogglemsoTrueThespecifiedtextissubscript.
![Page 2221: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2221.jpg)
Remarks
SettingtheBaselineOffsetpropertytoanegativevalueautomaticallysetstheSubscriptpropertytomsoTrueandtheSuperscriptpropertytomsoFalse.
SettingtheBaselineOffsetpropertytoapositivevalueautomaticallysetstheSubscriptpropertytomsoFalseandtheSuperscriptpropertytomsoTrue.
SettingtheSubscriptpropertytomsoTrueautomaticallysetstheBaselineOffsetpropertyto–0.25(–25percent).
![Page 2222: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2222.jpg)
Example
Thisexampleenlargesthefirstcharacterinthetitleonslideoneifthatcharacterissubscript.
WithApplication.ActivePresentation.Slides(1)_
.Shapes.Title.TextFrame.TextRange
With.Characters(1,1).Font
If.SubscriptThen
scaleChar=-20*.BaselineOffset
.Size=.Size*scaleChar
EndIf
EndWith
EndWith
![Page 2223: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2223.jpg)
SubtypePropertySetsorreturnsaMsoAnimFilterEffectSubtypeconstantthatdeterminesthesubtypeofthefiltereffect.Read/write.
expression.Subtype
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2224: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2224.jpg)
Example
Thefollowingexampleaddsashapetothefirstslideoftheactivepresentationandsetsafiltereffectanimationbehavior.
SubChangeFilterEffect()
DimsldFirstAsSlide
DimshpHeartAsShape
DimeffNewAsEffect
DimbhvEffectAsAnimationBehavior
SetsldFirst=ActivePresentation.Slides(1)
SetshpHeart=sldFirst.Shapes.AddShape(Type:=msoShapeHeart,_
Left:=100,Top:=100,Width:=100,Height:=100)
SeteffNew=sldFirst.TimeLine.MainSequence.AddEffect_
(Shape:=shpHeart,EffectID:=msoAnimEffectChangeFillColor,_
Trigger:=msoAnimTriggerAfterPrevious)
SetbhvEffect=effNew.Behaviors.Add(msoAnimTypeFilter)
WithbhvEffect.FilterEffect
.Type=msoAnimFilterEffectTypeWipe
.Subtype=msoAnimFilterEffectSubtypeUp
.Reveal=msoTrue
EndWith
EndSub
![Page 2225: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2225.jpg)
ShowAll
![Page 2226: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2226.jpg)
SuperscriptPropertyDetermineswhetherthespecifiedtextissuperscript.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.Thespecifiedtextisnotsuperscript.msoTriStateMixedSomecharactersaresuperscriptandsomearen't.msoTriStateTogglemsoTrueThespecifiedtextissuperscript.
![Page 2227: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2227.jpg)
Remarks
SettingtheBaselineOffsetpropertytoanegativevalueautomaticallysetstheSubscriptpropertytomsoTrueandtheSuperscriptpropertytomsoFalse.
SettingtheBaselineOffsetpropertytoapositivevalueautomaticallysetstheSubscriptpropertytomsoFalseandtheSuperscriptpropertytomsoTrue.
SettingtheSuperscriptpropertytomsoTrueautomaticallysetstheBaselineOffsetpropertyto0.3(30percent).
![Page 2228: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2228.jpg)
Example
Thisexamplesetsthetextforshapetwoonslideoneandthenmakesthefifthcharactersuperscriptwitha30-percentoffset.
WithApplication.ActivePresentation.Slides(1).Shapes(2).TextFrame
With.TextRange
.Text="E=mc2"
.Characters(5,1).Font.Superscript=msoTrue
EndWith
EndWith
![Page 2229: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2229.jpg)
ShowAll
![Page 2230: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2230.jpg)
SyncPropertyReturnsaSyncobjectthatenablesyoutomanagethesynchronizationofthelocalandservercopiesofasharedpresentationstoredinaMicrosoftWindowsSharePointServicessharedworkspace.Read-only.
expression.Sync
expressionRequired.AnexpressionthatreturnsaPresentationobject.
![Page 2231: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2231.jpg)
Remarks
TheStatuspropertyoftheSyncobjectreturnsimportantinformationaboutthecurrentstateofsynchronization.UsetheGetUpdatemethodtorefreshthesyncstatus.UsetheLastSyncTime,ErrorType,andWorkspaceLastChangedBypropertiestoreturnadditionalinformation.
Formoreinformationonthedifferencesandconflictsthatcanexistbetweenthelocalandservercopiesofsharedpresentations,seetheStatusproperty.
UsethePutUpdatemethodtosavelocalchangestotheserver.Closeandre-openthedocumenttoretrievethelatestversionfromtheserverwhennolocalchangeshavebeenmade.UsetheResolveConflictmethodtoresolvedifferencesbetweenthelocalandtheservercopies,ortheOpenVersionmethodtoopenadifferentversionalongwiththecurrentlyopenlocalversionofthedocument.
TheGetUpdate,PutUpdate,andResolveConflictmethodsoftheSyncobjectdonotreturnstatuscodesbecausetheycompletetheirtasksasynchronously.TheSyncobjectprovidesimportantstatusinformationthroughasingleevent,calledthePresentationSynceventoftheApplicationobject.
TheSynceventdescribedabovereturnsanmsoSyncEventTypevalue.
MsoSyncEventTypecanbeoneofthefollowingmsoSyncEventTypeconstants.msoSyncEventDownloadInitiated(0)msoSyncEventDownloadSucceeded(1)msoSyncEventDownloadFailed(2)msoSyncEventUploadInitiated(3)msoSyncEventUploadSucceeded(4)msoSyncEventUploadFailed(5)msoSyncEventDownloadNoChange(6)msoSyncEventOffline(7)
TheSyncobjectmodelisavailablewhethersharingandsynchronizationareenabledordisabledontheactivedocument.TheSyncpropertyofthePresentationobjectdoesnotreturnNothingwhentheactivedocumentisnot
![Page 2232: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2232.jpg)
sharedorsynchronizationisnotenabled.UsetheStatuspropertytodeterminewhetherthedocumentissharedandwhethersynchronizationisenabled.
Notalldocumentsynchronizationproblemsraiserun-timeerrorsthatcanbetrapped.AfterusingthemethodsoftheSyncobject,itisagoodideatochecktheStatusproperty.IftheStatuspropertyismsoSyncStatusError,checktheErrorTypepropertyforadditionalinformationonthetypeoferrorthathasoccurred.
Inmanycircumstances,thebestwaytoresolveanerrorconditionistocalltheGetUpdatemethod.Forexample,ifacalltoPutUpdateresultsinanerrorcondition,thenacalltoGetUpdatewillresetthestatustomsoSyncStatusLocalChanges.
![Page 2233: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2233.jpg)
Example
ThefollowingexampledisplaysthenameofthelastpersontomodifytheactivepresentationiftheactivepresentationisashareddocumentinaDocumentWorkspace.
DimeStatusAsMsoSyncStatusType
DimstrLastUserAsString
eStatus=ActivePresentation.Sync.Status
IfeStatus=msoSyncStatusLatestThen
strLastUser=ActivePresentation.Sync.WorkspaceLastChangedBy
MsgBox"Youhavethemostup-to-datecopy."&_
"Thisfilewaslastmodifiedby"&strLastUser
EndIf
![Page 2234: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2234.jpg)
TablePropertyReturnsaTableobjectthatrepresentsatableinashapeorinashaperange.Read-only.
![Page 2235: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2235.jpg)
Example
Thisexamplesetsthewidthofthefirstcolumninthetableinshapefiveonthesecondslideto80points.
ActivePresentation.Slides(2).Shapes(5).Table_
.Columns(1).Width=80
![Page 2236: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2236.jpg)
ShowAll
![Page 2237: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2237.jpg)
TableDirectionPropertyReturnsorsetsthedirectioninwhichthetablecellsareordered.Read/writePpDirection.
PpDirectioncanbeoneofthesePpDirectionconstants.ppDirectionLeftToRightppDirectionMixedppDirectionRightToLeft
expression.TableDirection
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2238: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2238.jpg)
Remarks
ThedefaultvalueoftheTableDirectionpropertyisppDirectionLefttToRightunlesstheLanguageSettingspropertyortheDefaultLanguageIDpropertyissettoaright-to-leftlanguage,inwhichcasethedefaultvalueisppDirectionRightToLeft.TheppDirectionMixedconstantmaybereturnedwhenusingtheTextDirectionproperty.
![Page 2239: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2239.jpg)
Example
Thisexamplesetsthedirectioninwhichcellsintheselectedtableareorderedtolefttoright(firstcolumnistheleftmostcolumn).
ActiveWindow.Selection.ShapeRange.Table.TableDirection=_
ppDirectionLeftToRight
![Page 2240: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2240.jpg)
TabStopsPropertyReturnsaTabStopscollectionthatrepresentsthetabstopsforthespecifiedtext.Read-only.
![Page 2241: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2241.jpg)
Example
Thisexampleaddsaslidewithtwotextcolumnstotheactivepresentation,setsaleft-alignedtabstopforthetitleonthenewslide,alignsthetitleboxtotheleft,andassignstitletextutilizingthetabstopjustcreated.
WithApplication.ActivePresentation.Slides_
.Add(2,ppLayoutTwoColumnText).Shapes
With.Title.TextFrame
With.Ruler
.Levels(1).FirstMargin=0
.TabStops.AddppTabStopLeft,310
EndWith
.TextRange.ParagraphFormat.Alignment=ppAlignLeft
.TextRange="firstcolumn"+Chr(9)+"secondcolumn"
EndWith
EndWith
![Page 2242: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2242.jpg)
TagsPropertyReturnsaTagsobjectthatrepresentsthetagsforthespecifiedobject.Read-only.
![Page 2243: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2243.jpg)
Example
NoteTagvaluesareaddedandstoredinuppercasetext.Youshouldperformtestsontagvaluesusinguppercasetext,asshowninthesecondexample.
Thisexampleaddsatagnamed"REGION"andatagnamed"PRIORITY"toslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Tags
.Add"Region","East"'Adds"Region"tagwithvalue"East"
.Add"Priority","Low"'Adds"Priority"tagwithvalue"Low"
EndWith
Thisexamplesearchesthroughthetagsforeachslideintheactivepresentation.Ifthere'satagnamed"PRIORITY,"amessageboxdisplaysthetagvalue.Iftheobjectdoesn'thaveatagnamed"PRIORITY,"theexampleaddsthistagwiththevalue"Unknown."
ForEachsInApplication.ActivePresentation.Slides
Withs.Tags
found=False
Fori=1To.Count
If.Name(i)="PRIORITY"Then
found=True
slNum=.Parent.SlideIndex
MsgBox"Slide"&slNum&"Priority:"&.Value(i)
EndIf
Next
IfNotfoundThen
slNum=.Parent.SlideIndex
.Add"Priority","Unknown"
MsgBox"Slide"&slNum&"Prioritytagadded:Unknown"
EndIf
EndWith
Next
![Page 2244: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2244.jpg)
![Page 2245: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2245.jpg)
ShowAll
![Page 2246: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2246.jpg)
TargetBrowserPropertySetsorreturnsanMsoTargetBrowserconstantthatrepresentsthebrowserusedwithMicrosoftPowerPoint.Read/write.
MsoTargetBrowsercanbeoneoftheseMsoTargetBrowserconstants.msoTargetBrowserIE4msoTargetBrowserIE5msoTargetBrowserIE6msoTargetBrowserV3msoTargetBrowserV4
expression.TargetBrowser
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2247: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2247.jpg)
Example
ThisexamplesetsthetargetbrowserfortheactivepresentationtoMicrosoftInternetExplorer6ifthecurrenttargetbrowserisanearlierversion.
SubSetWebBrowser()
WithActivePresentation.WebOptions
If.TargetBrowser<msoTargetBrowserIE6Then
.TargetBrowser=msoTargetBrowserIE6
EndIf
EndWith
EndSub
ThisexamplesetsthetargetbrowserforallpresentationstoInternetExplorer6.
SubGlobalTargetBrowser()
Application.DefaultWebOptions_
.TargetBrowser=msoTargetBrowserIE6
EndSub
![Page 2248: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2248.jpg)
TemplateNamePropertyReturnsthenameofthedesigntemplateassociatedwiththespecifiedpresentation.Read-onlyString.
![Page 2249: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2249.jpg)
Remarks
ThereturnedstringincludestheMS-DOSfilenameextension(forfiletypesthatareregistered)butdoesn'tincludethefullpath.
![Page 2250: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2250.jpg)
Example
ThefollowingexampleappliesthedesigntemplateProfessional.pottothepresentationPres1.pptifit'snotalreadyappliedtoit.
WithPresentations("Pres1.ppt")
If.TemplateName<>"Professional.pot"Then
.ApplyTemplate"c:\programfiles\microsoftoffice"&_
"\templates\presentationdesigns\Professional.pot"
EndIf
EndWith
![Page 2251: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2251.jpg)
ShowAll
![Page 2252: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2252.jpg)
TextPropertyTextpropertyasitappliestotheHeaderFooter,TextEffectFormat,and
TextRangeobjects.
ReturnsorsetsaStringthatrepresentsthetextcontainedinthespecifiedobject.Read/write.
expression.Text
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
TextpropertyasitappliestotheCommentobject.
ReturnsaStringthatrepresentsthetextinacomment.Read-only.
expression.Text
expressionRequired.AnexpressionthatreturnsaCommentobject.
![Page 2253: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2253.jpg)
Example
AsitappliestotheTextRangeobject.
Thisexamplesetsthetextandfontstyleforthetitleonslideoneintheactivepresentation.
SetmyPres=Application.ActivePresentation
WithmyPres.Slides(1).Shapes.Title.TextFrame.TextRange
.Text="Welcome!"
.Font.Italic=True
EndWith
![Page 2254: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2254.jpg)
ShowAll
![Page 2255: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2255.jpg)
TextDirectionPropertyReturnsorsetsthetextdirectionforthespecifiedparagraph.Read/writePpDirection.Thedefaultvaluedependsonthelanguagesupportyouhaveselectedorinstalled.
PpDirectioncanbeoneofthesePpDirectionconstants.ppDirectionLeftToRightppDirectionMixedppDirectionRightToLeft
expression.TextDirection
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2256: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2256.jpg)
Example
Thisexampledisplaysthetextdirectionfortheparagraphsinshapetwoonslideoneintheactivepresentation.
MsgBoxActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange_
.ParagraphFormat.TextDirection
![Page 2257: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2257.jpg)
TextEffectPropertyReturnsaTextEffectFormatobjectthatcontainstext-effectformattingpropertiesforthespecifiedshape.AppliestoShapeorShapeRangeobjectsthatrepresentWordArt.
expression.TextEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2258: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2258.jpg)
Example
ThisexamplesetsthefontstyletoboldforshapethreeonmyDocumentiftheshapeisWordArt.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3)
If.Type=msoTextEffectThen
.TextEffect.FontBold=True
EndIf
EndWith
![Page 2259: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2259.jpg)
TextFramePropertyReturnsaTextFrameobjectthatcontainsthealignmentandanchoringpropertiesforthespecifiedshapeormastertextstyle.
![Page 2260: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2260.jpg)
Remarks
UsetheTextRangepropertyoftheTextFrameobjecttoreturnthetextinthetextframe.
UsetheHasTextFramepropertytodeterminewhetherashapecontainsatextframebeforeyouapplytheTextFrameproperty.
![Page 2261: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2261.jpg)
Example
ThisexampleaddsarectangletomyDocument,addstexttotherectangle,andsetsthetopmarginforthetextframe.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes_
.AddShape(msoShapeRectangle,180,175,350,140).TextFrame
.TextRange.Text="Hereissometesttext"
.MarginTop=10
EndWith
![Page 2262: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2262.jpg)
ShowAll
![Page 2263: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2263.jpg)
TextLevelEffectPropertyReturnsorsetsaPpTextLevelEffectconstantthatindicateswhetherthetextinthespecifiedshapeisanimatedbyfirst-levelparagraphs,second-levelparagraphs,orsomeotherlevel(uptofifth-levelparagraphs).Read/write.
PpTextLevelEffectcanbeoneofthesePpTextLevelEffectconstants.ppAnimateByAllLevelsppAnimateByFifthLevelppAnimateByFirstLevelppAnimateByFourthLevelppAnimateBySecondLevelppAnimateByThirdLevelppAnimateLevelMixedppAnimateLevelNone
expression.TextLevelEffect
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2264: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2264.jpg)
Remarks
FortheTextLevelEffectpropertysettingtotakeeffect,theAnimatepropertymustbesettoTrue.
![Page 2265: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2265.jpg)
Example
Thisexampleaddsatitleslideandtitletexttotheactivepresentationandsetsthetitletobebuiltletterbyletter.
WithActivePresentation.Slides.Add(1,ppLayoutTitleOnly).Shapes(1)
.TextFrame.TextRange.Text="Sampletitle"
With.AnimationSettings
.Animate=True
.TextLevelEffect=ppAnimateByFirstLevel
.TextUnitEffect=ppAnimateByCharacter
.EntryEffect=ppEffectFlyFromLeft
EndWith
EndWith
![Page 2266: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2266.jpg)
TextRangePropertyReturnsaTextRangeobjectthatrepresentstheselectedtext(Selectionobject)orthetextinthespecifiedtextframe(TextFrameobject).
expression.TextRange
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 2267: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2267.jpg)
Remarks
Youcanconstructatextrangefromaselectionwhenthepresentationisinslideview,normalview,outlineview,notespageview,oranymasterview.
![Page 2268: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2268.jpg)
Example
Thisexamplemakestheselectedtextboldinthefirstwindow.
Windows(1).Selection.TextRange.Font.Bold=True
![Page 2269: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2269.jpg)
TextRangeLengthPropertyReturnsorsetsanLongthatrepresentsthelengthofatextrange.Read-only.
expression.TextRangeLength
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2270: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2270.jpg)
Example
Thisexampleaddsashapewithtextandrotatestheshapewithoutrotatingthetext.
SubSetTextRange()
DimshpStarAsShape
DimsldOneAsSlide
DimeffNewAsEffect
SetsldOne=ActivePresentation.Slides(1)
SetshpStar=sldOne.Shapes.AddShape(Type:=msoShape5pointStar,_
Left:=32,Top:=32,Width:=300,Height:=300)
shpStar.TextFrame.TextRange.Text="Animatedshape."
SeteffNew=sldOne.TimeLine.MainSequence.AddEffect(Shape:=shpStar,_
EffectId:=msoAnimEffectPath5PointStar,Level:=msoAnimateTextByAllLevels,_
Trigger:=msoAnimTriggerAfterPrevious)
WitheffNew
If.TextRangeStart=0And.TextRangeLength>0Then
With.Behaviors.Add(Type:=msoAnimTypeRotation).RotationEffect
.From=0
.To=360
EndWith
.Timing.AutoReverse=msoTrue
EndIf
EndWith
EndSub
![Page 2271: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2271.jpg)
TextRangeStartPropertyReturnsorsetsanLongthatrepresentsthestartofatextrange.Read-only.
expression.TextRangeStart
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2272: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2272.jpg)
Example
Thisexampleaddsashapewithtextandrotatestheshapewithoutrotatingthetext.
SubSetTextRange()
DimshpStarAsShape
DimsldOneAsSlide
DimeffNewAsEffect
SetsldOne=ActivePresentation.Slides(1)
SetshpStar=sldOne.Shapes.AddShape(Type:=msoShape5pointStar,_
Left:=32,Top:=32,Width:=300,Height:=300)
shpStar.TextFrame.TextRange.Text="Animatedshape."
SeteffNew=sldOne.TimeLine.MainSequence.AddEffect(Shape:=shpStar,_
EffectId:=msoAnimEffectPath5PointStar,Level:=msoAnimateTextByAllLevels,_
Trigger:=msoAnimTriggerAfterPrevious)
WitheffNew
If.TextRangeStart=0And.TextRangeLength>0Then
With.Behaviors.Add(Type:=msoAnimTypeRotation).RotationEffect
.From=0
.To=360
EndWith
.Timing.AutoReverse=msoTrue
EndIf
EndWith
EndSub
![Page 2273: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2273.jpg)
TextShapePropertyReturnsaShapeobjectrepresentingtheshapeofthetextboxassociatedwithadiagramnode.
expression.TextShape
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2274: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2274.jpg)
Example
Thefollowingexampleaddschildnodestoaparentnode,anddisplaystextintheparentnodeindicatingthenumberofchildnodescreated.
SubCountChildNodes()
DimdgnNodeAsDiagramNode
DimshpDiagramAsShape
DimintNodesAsInteger
DimshpTextAsShape
'Addsdiagramandfirstnodetofirstslide
SetshpDiagram=ActivePresentation.Slides(1).Shapes_
.AddDiagram(Type:=msoDiagramRadial,Left:=200,Top:=75,_
Width:=300,Height:=475)
SetdgnNode=shpDiagram.DiagramNode.Children.AddNode
'Addsthreechildnodestofirstnode
ForintNodes=1To3
dgnNode.Children.AddNode
NextintNodes
'Entersnodenumberintoeachchildnode
ForintNodes=1TodgnNode.Children.Count
SetshpText=shpDiagram.DiagramNode.Children(1)_
.Children(intNodes).TextShape
shpText.TextFrame.TextRange.Text=CStr(intNodes)
NextintNodes
EndSub
![Page 2275: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2275.jpg)
TextStylesPropertyReturnsaTextStylescollectionthatrepresentsthreetextstyles—titletext,bodytext,anddefaulttext—forthespecifiedslidemaster.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 2276: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2276.jpg)
Example
Thisexamplesetsthefontnameandfontsizeforlevel-onebodytextonslidesintheactivepresentation.
WithActivePresentation.SlideMaster_
.TextStyles(ppBodyStyle).Levels(1)
With.Font
.Name="arial"
.Size=36
EndWith
EndWith
![Page 2277: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2277.jpg)
TextToDisplayPropertyReturnsorsetsthedisplaytextforahyperlinknotassociatedwithagraphic.Read/writeString.
![Page 2278: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2278.jpg)
Remarks
Thispropertywillcausearun-timeerrorifusedwithahyperlinkthatisnotassociatedwithatextrange.Youcanusecodesimilartothefollowingtotestwhetherornotagivenhyperlink,representedherebymyHyperlink,isassociatedwithatextrange.
IfTypeName(myHyperlink.Parent.Parent)="TextRange"Then
strTRtest="True"
EndIf
![Page 2279: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2279.jpg)
Example
Thisexamplecreatesanassociatedhyperlinkwiththetextinshapetwoonslideone.Itthensetsthedisplaytextto"MicrosoftHomePage"andsetsthehyperlinkaddresstothecorrectURL.
WithActivePresentation.Slides(1).Shapes(2)_
.TextFrame.TextRange
With.ActionSettings(ppMouseClick)
.Action=ppActionHyperlink
.Hyperlink.TextToDisplay="MicrosoftHomePage"
.Hyperlink.Address="http://www.microsoft.com/"
EndWith
EndWith
![Page 2280: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2280.jpg)
ShowAll
![Page 2281: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2281.jpg)
TextUnitEffectPropertyTextUnitEffectpropertyasitappliestotheAnimationSettingsobject.
ReturnsorsetsaPpTextUnitEffectconstantthatindicateswhetherthetextinthespecifiedshapeisanimatedparagraphbyparagraph,wordbyword,orletterbyletter.Read/write.
PpTextUnitEffectcanbeoneofthesePpTextUnitEffectconstants.ppAnimateByCharacterppAnimateByParagraphppAnimateByWordppAnimateUnitMixed
expression.TextUnitEffect
expressionRequired.AnexpressionthatreturnsanAnimationSettingsobject.
![Page 2282: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2282.jpg)
Remarks
FortheTextUnitEffectpropertysettingtotakeeffect,theTextLevelEffectpropertyforthespecifiedshapemusthaveavalueotherthanppAnimateLevelNoneorppAnimateByAllLevels,andtheAnimatepropertymustbesettoTrue.
TextUnitEffectpropertyasitappliestotheEffectInformationobject.
ReturnsanMsoAnimTextUnitEffectconstantthatindicateswhetherthetextinthespecifiedshapeisanimatedparagraphbyparagraph,wordbyword,orletterbyletter.Read-only.
MsoAnimTextUnitEffectcanbeoneoftheseMsoAnimTextUnitEffectconstants.msoAnimTextUnitEffectByCharactermsoAnimTextUnitEffectByParagraphmsoAnimTextUnitEffectByWordmsoAnimTextUnitEffectMixed
expression.TextUnitEffect
expressionRequired.AnexpressionthatreturnsanEffectInformationobject.
![Page 2283: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2283.jpg)
Example
AsitappliestotheAnimationSettingsobject.
Thisexampleaddsatitleslideandtitletexttotheactivepresentationandsetsthetitletobebuiltletterbyletter.
WithActivePresentation.Slides.Add(Index:=1,_
Layout:=ppLayoutTitleOnly).Shapes(1)
.TextFrame.TextRange.Text="Sampletitle"
With.AnimationSettings
.Animate=True
.TextLevelEffect=ppAnimateByFirstLevel
.TextUnitEffect=ppAnimateByCharacter
.EntryEffect=ppEffectFlyFromLeft
EndWith
EndWith
![Page 2284: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2284.jpg)
TextureNamePropertyReturnsthenameofthecustomtexturefileforthespecifiedfill.Read-onlyString.
Thispropertyisread-only.UsetheUserTexturedmethodtosetthetexturefileforthefill.
![Page 2285: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2285.jpg)
Example
ThisexampleaddsanovaltomyDocument.IfshapeoneonmyDocumenthasauser-definedtexturedfill,thenewovalwillhavethesamefillasshapeone.Ifshapeonehasanyothertypeoffill,thenewovalwillhaveagreenmarblefill.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
SetnewFill=.AddShape(msoShapeOval,0,0,200,90).Fill
With.Item(1).Fill
If.Type=msoFillTexturedAnd_
.TextureType=msoTextureUserDefinedThen
newFill.UserTextured.TextureName
Else
newFill.PresetTexturedmsoTextureGreenMarble
EndIf
EndWith
EndWith
![Page 2286: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2286.jpg)
ShowAll
![Page 2287: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2287.jpg)
TextureTypePropertyReturnsthetexturetypeforthespecifiedfill.Read-onlyMsoTextureType.UsethePresetTexturedorUserTexturedmethodtosetthetexturetypeforthefill.
MsoTextureTypecanbeoneoftheseMsoTextureTypeconstants.msoTexturePresetmsoTextureTypeMixedmsoTextureUserDefined
expression.TextureType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2288: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2288.jpg)
Example
ThisexamplechangesthefilltocanvasforallshapesonmyDocumentthathaveacustomtexturedfill.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Withs.Fill
If.TextureType=msoTextureUserDefinedThen
.PresetTexturedmsoTextureCanvas
EndIf
EndWith
Next
![Page 2289: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2289.jpg)
ThreeDPropertyReturnsaThreeDFormatobjectthatcontains3-D–effectformattingpropertiesforthespecifiedshape.Read-only.
![Page 2290: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2290.jpg)
Example
Thisexamplesetsthedepth,extrusioncolor,extrusiondirection,andlightingdirectionforthe3-DeffectsappliedtoshapeoneonmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1).ThreeD
.Visible=True
.Depth=50
'RGBvalueforpurple
.ExtrusionColor.RGB=RGB(255,100,255)
.SetExtrusionDirectionmsoExtrusionTop
.PresetLightingDirection=msoLightingLeft
EndWith
![Page 2291: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2291.jpg)
TimePropertySetsorreturnsaSinglethatrepresentsthetimeatagivenanimationpoint.Read/write.
expression.Time
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2292: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2292.jpg)
Remarks
ThevalueoftheTimepropertycanbeanyfloating-pointvaluebetween0and1,representingapercentageoftheentiretimelinefrom0%to100%.Forexample,avalueof0.2wouldcorrespondtoapointintimeat20%oftheentiretimelinedurationfromlefttoright.
![Page 2293: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2293.jpg)
Example
Thisexampleinsertsthreefillcoloranimationpointsinthemainsequenceanimationtimelineonthefirstslide.
SubBuildTimeLine()
DimshpFirstAsShape
DimeffMainAsEffect
DimtmlMainAsTimeLine
DimaniBhvrAsAnimationBehavior
DimaniPointAsAnimationPoint
SetshpFirst=ActivePresentation.Slides(1).Shapes(1)
SettmlMain=ActivePresentation.Slides(1).TimeLine
SeteffMain=tmlMain.MainSequence.AddEffect(Shape:=shpFirst,_
EffectId:=msoAnimEffectBlinds)
SetaniBhvr=tmlMain.MainSequence(1).Behaviors.Add_
(Type:=msoAnimTypeProperty)
WithaniBhvr.PropertyEffect
.Property=msoAnimShapeFillColor
SetaniPoint=.Points.Add
aniPoint.Time=0.2
aniPoint.Value=RGB(0,0,0)
SetaniPoint=.Points.Add
aniPoint.Time=0.5
aniPoint.Value=RGB(0,255,0)
SetaniPoint=.Points.Add
aniPoint.Time=1
aniPoint.Value=RGB(0,255,255)
EndWith
EndSub
![Page 2294: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2294.jpg)
TimeLinePropertyReturnsaTimeLineobjectrepresentingtheanimationtimelinefortheslide.
expression.TimeLine
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2295: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2295.jpg)
Example
Thefollowingexampleaddsabouncinganimationtothefirstshapeonthefirstslide.
SubNewTimeLineEffect()
DimsldFirstAsSlide
DimshpFirstAsShape
SetsldFirst=ActivePresentation.Slides(1)
SetshpFirst=sldFirst.Shapes(1)
sldFirst.TimeLine.MainSequence.AddEffect_
Shape:=shpFirst,EffectId:=msoAnimEffectBounce
EndSub
![Page 2296: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2296.jpg)
TimingPropertyReturnsaTimingobjectthatrepresentsthetimingpropertiesforananimationsequence.
expression.Timing
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2297: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2297.jpg)
Example
Thefollowingexamplesetsthedurationofthefirstanimationsequenceonthefirstslide.
SubSetTiming()
ActivePresentation.Slides(1).TimeLine_
.MainSequence(1).Timing.Duration=1
EndSub
![Page 2298: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2298.jpg)
TintAndShadePropertyReturnsaSinglethatrepresentsthelighteningordarkeningofthethecolorofaspecifiedshape.Read/write.
expression.TintAndShade
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2299: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2299.jpg)
Remarks
Youcanenteravaluefrom-1(darkest)to1(lightest)fortheTintAndShadeproperty,0(zero)beingneutral.
![Page 2300: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2300.jpg)
Example
Thisexamplecreatesanewshapeintheactivedocument,setsthefillcolor,andlightensthecolorshade.
SubPrinterPlate()
DimshpHeartAsShape
SetshpHeart=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeHeart,Left:=150,_
Top:=150,Width:=250,Height:=250)
WithshpHeart.Fill.ForeColor
.CMYK=16111872
.TintAndShade=0.3
.OverPrint=msoTrue
.Ink(Index:=1)=0
.Ink(Index:=2)=1
.Ink(Index:=3)=1
.Ink(Index:=4)=0
EndWith
EndSub
![Page 2301: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2301.jpg)
TitlePropertyReturnsaShapeobjectthatrepresentstheslidetitle.Read-only.
![Page 2302: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2302.jpg)
Remarks
YoucanalsousetheItemmethodoftheShapesorPlaceholderscollectiontoreturntheslidetitle.
![Page 2303: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2303.jpg)
Example
ThisexamplesetsthetitletextonmyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.Title.TextFrame.TextRange.Text="Welcome!"
![Page 2304: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2304.jpg)
TitleMasterPropertyReturnsaMasterobjectthatrepresentsthetitlemasterforthespecifiedpresentation.Ifthepresentationdoesn'thaveatitlemaster,anerroroccurs.
expression.TitleMaster
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2305: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2305.jpg)
Remarks
UsetheAddTitleMastermethodtoaddatitlemastertoapresentation.
![Page 2306: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2306.jpg)
Example
Iftheactivepresentationhasatitlemaster,thisexamplesetsthefootertextforthetitlemaster.
WithApplication.ActivePresentation
If.HasTitleMasterThen
.TitleMaster.HeadersFooters.Footer.Text="Introduction"
EndIf
EndWith
![Page 2307: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2307.jpg)
ShowAll
![Page 2308: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2308.jpg)
ToPropertyTopropertyasitappliestotheColorEffectobject.
SetsorreturnsaColorFormatobjectthatrepresentstheRGBcolorvalueofananimationbehavior.Read/write.
expression.To
expressionRequired.AnexpressionthatreturnsaColorEffectobject.
![Page 2309: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2309.jpg)
Remarks
UsethispropertyinconjunctionwiththeFrompropertytotransitionfromonecolortoanother.
TopropertyasitappliestotheRotationEffectobject.
SetsorreturnsaSinglethatrepresentstheendingrotationofanobjectindegrees,specifiedrelativetothescreen(forexample,90degreesiscompletelyhorizontal).Read/write.
expression.To
expressionRequired.AnexpressionthatreturnsaRotationEffectobject.
![Page 2310: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2310.jpg)
Remarks
UsethispropertyinconjunctionwiththeFrompropertytotransitionfromonerotationangletoanother.
ThedefaultvalueisEmptyinwhichcasethecurrentpositionoftheobjectisused.
TopropertyasitappliestothePropertyEffectobject.
SetsorreturnsaVariantthatrepresentstheendingvalueofanobject’sproperty.Read/write.
expression.To
expressionRequired.AnexpressionthatreturnsaPropertyEffectobject.
![Page 2311: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2311.jpg)
Remarks
ThedefaultvalueisEmpty,inwhichcasethecurrentpositionoftheobjectisused.
TopropertyasitappliestotheSetEffectobject.
SetsorreturnsaVariantthatrepresentsthevalueorendingvalueoftheSetEffectobject'sTypeproperty.Read/write.
expression.To
expressionRequired.AnexpressionthatreturnsaSetEffectobject.
![Page 2312: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2312.jpg)
Remarks
DonotconfusethispropertywiththeToXorToYpropertiesoftheScaleEffectandMotionEffectobjects,whichareonlyusedforscalingormotioneffects.
![Page 2313: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2313.jpg)
Example
AsitappliestotheColorEffectobject.
Thefollowingexampleaddsacoloreffectandchangesitscolorfromalightbluishgreentoyellow.
SubAddAndChangeColorEffect()
DimeffBlindsAsEffect
DimtmlTimingAsTimeLine
DimshpRectangleAsShape
DimanimColorAsAnimationBehavior
DimclrEffectAsColorEffect
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SettmlTiming=ActivePresentation.Slides(1).TimeLine
SeteffBlinds=tmlTiming.MainSequence.AddEffect(Shape:=shpRectangle,_
effectId:=msoAnimEffectBlinds)
SetanimColor=tmlTiming.MainSequence(1).Behaviors_
.Add(Type:=msoAnimTypeColor)
SetclrEffect=animColor.ColorEffect
clrEffect.From.RGB=RGB(Red:=255,Green:=255,Blue:=0)
clrEffect.To.RGB=RGB(Red:=0,Green:=255,Blue:=255)
EndSub
AsitappliestotheRotationEffectobject.
Thefollowingexampleaddsarotationeffectandimmediatelychangesitsrotationanglefrom90degreesto270degrees.
SubAddAndChangeRotationEffect()
DimeffBlindsAsEffect
DimtmlTimingAsTimeLine
DimshpRectangleAsShape
DimanimColorAsAnimationBehavior
DimrtnEffectAsRotationEffect
SetshpRectangle=ActivePresentation.Slides(1).Shapes(1)
SettmlTiming=ActivePresentation.Slides(1).TimeLine
SeteffBlinds=tmlTiming.MainSequence.AddEffect(Shape:=shpRectangle,_
![Page 2314: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2314.jpg)
effectId:=msoAnimEffectBlinds)
SetanimColor=tmlTiming.MainSequence(1).Behaviors.Add(Type:=msoAnimTypeRotation)
SetrtnEffect=animColor.RotationEffect
rtnEffect.From=90
rtnEffect.To=270
EndSub
![Page 2315: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2315.jpg)
ShowAll
![Page 2316: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2316.jpg)
TopPropertyToppropertyasitappliestotheApplication,DocumentWindow,Shape,
ShapeRange,andSlideShowWindowobjects.
Application,DocumentWindowandSlideShowWindowobjects:ReturnsorsetsaSinglethatrepresentsthedistanceinpointsfromthetopedgeofthedocument,application,andslideshowwindowtothetopedgeoftheapplicationwindow'sclientarea.Settingthispropertytoaverylargepositiveornegativevaluemaypositionthewindowcompletelyoffthedesktop.Read/write.
Shapeobject:ReturnsorsetsaSinglethatrepresentsthedistancefromthetopedgeoftheshape'sboundingboxtothetopedgeofthedocument.Read/write.
ShapeRangeobject:ReturnsorsetsaSinglethatrepresentsthedistancefromthetopedgeofthetopmostshapeintheshaperangetothetopedgeofthedocument.Read/write.
expression.Top
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
ToppropertyasitappliestotheCommentobject.
Commentobject:ReturnsaSinglethatrepresentsthedistanceinpointsfromtheleftedgeofthecommenttotheleftedgeoftheslide.Read-only.
expression.Top
expressionRequired.AnexpressionthatreturnsaCommentobject.
![Page 2317: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2317.jpg)
Example
AsitappliestotheApplication,DocumentWindow,Shape,ShapeRange,andSlideShowWindowobjects.
Thisexamplearrangeswindowsoneandtwohorizontally;inotherwords,eachwindowoccupieshalftheavailableverticalspaceandalltheavailablehorizontalspaceintheapplicationwindow'sclientarea.Forthisexampletowork,theremustbeonlytwodocumentwindowsopen.
Windows.ArrangeppArrangeTiled
sngHeight=Windows(1).Height'availableheight
sngWidth=Windows(1).Width+Windows(2).Width'availablewidth
WithWindows(1)
.Width=sngWidth
.Height=sngHeight/2
.Left=0
EndWith
WithWindows(2)
.Width=sngWidth
.Height=sngHeight/2
.Top=sngHeight/2
.Left=0
EndWith
![Page 2318: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2318.jpg)
ToXPropertySetsorreturnsaSinglethatrepresentstheendingwidthorhorizontalpositionofaScaleEffectorMotionEffectobject,respectively,specifiedasapercentofthescreenwidth.Read/write.
expression.ToX
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2319: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2319.jpg)
Remarks
ThedefaultvalueofthispropertyisEmpty,inwhichcasethecurrentpositionoftheobjectisused.
UsethispropertyinconjunctionwiththeFromXpropertytoresizeorjumpfromonepositiontoanother.
DonotconfusethispropertywiththeTopropertyoftheColorEffect,RotationEffect,orPropertyEffectobjects,whichisusedtosetorchangecolors,rotations,orotherpropertiesofananimationbehavior,respectively.
![Page 2320: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2320.jpg)
Example
Thefollowingexampleaddsananimationpathandsetsthestartingandendinghorizontalandverticalpositions.
SubAddMotionPath()
DimeffCustomAsEffect
DimanimMotionAsAnimationBehavior
DimshpRectangleAsShape
'Addsshapeandsetseffectandanimationproperties
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffCustom=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectCustom)
SetanimMotion=effCustom.Behaviors.Add(msoAnimTypeMotion)
'Setsstartingandendinghorizontalandverticalpositions
WithanimMotion.MotionEffect
.FromX=0
.FromY=0
.ToX=50
.ToY=50
EndWith
EndSub
![Page 2321: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2321.jpg)
ToYPropertyReturnsorsetsaSinglethatrepresentstheendingheightorverticalpositionofaScaleEffectorMotionEffectobject,respectively,specifiedasapercentageofthescreenwidth.Read/write.
expression.ToY
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2322: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2322.jpg)
Remarks
ThedefaultvalueofthispropertyisEmpty,inwhichcasethecurrentpositionoftheobjectisused.
UsethispropertyinconjunctionwiththeFromYpropertytoresizeorjumpfromonepositiontoanother.
DonotconfusethispropertywiththeTopropertyoftheColorEffect,RotationEffect,orPropertyEffectobjects,whichisusedtosetorchangecolors,rotations,orotherpropertiesofananimationbehavior,respectively.
![Page 2323: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2323.jpg)
Example
Thefollowingexampleaddsananimationpathandsetsthestartingandendinghorizontalandverticalpositions.
SubAddMotionPath()
DimeffCustomAsEffect
DimanimMotionAsAnimationBehavior
DimshpRectangleAsShape
'Addsshapeandsetseffectandanimationproperties
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffCustom=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectCustom)
SetanimMotion=effCustom.Behaviors.Add(msoAnimTypeMotion)
'Setsstartingandendinghorizontalandverticalpositions
WithanimMotion.MotionEffect
.FromX=0
.FromY=0
.ToX=50
.ToY=50
EndWith
EndSub
![Page 2324: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2324.jpg)
TrackingPropertyReturnsorsetstheratioofthehorizontalspaceallottedtoeachcharacterinthespecifiedWordArttothewidthofthecharacter.Canbeavaluefrom0(zero)through5.(Largevaluesforthispropertyspecifyamplespacebetweencharacters;valueslessthan1canproducecharacteroverlap.)Read/writeSingle.
ThefollowingtablegivesthevaluesoftheTrackingpropertythatcorrespondtothesettingsavailableintheuserinterface.
Userinterfacesetting EquivalentTrackingpropertyvalueVeryTight 0.8Tight 0.9Normal 1.0Loose 1.2VeryLoose 1.5
![Page 2325: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2325.jpg)
Example
ThisexampleaddsWordArtthatcontainsthetext"Test"tomyDocumentandspecifiesthatthecharactersbeverytightlyspaced.
SetmyDocument=ActivePresentation.Slides(1)
SetnewWordArt=myDocument.Shapes.AddTextEffect_
(PresetTextEffect:=msoTextEffect1,Text:="Test",_
FontName:="ArialBlack",FontSize:=36,_
FontBold:=False,FontItalic:=False,Left:=100,Top:=100)
newWordArt.TextEffect.Tracking=0.8
![Page 2326: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2326.jpg)
TransparencyPropertyReturnsorsetsthedegreeoftransparencyofthespecifiedfill,shadow,orlineasavaluebetween0.0(opaque)and1.0(clear).Read/writeSingle.
![Page 2327: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2327.jpg)
Remarks
Thevalueofthispropertyaffectstheappearanceofsolid-coloredfillsandlinesonly;ithasnoeffectontheappearanceofpatternedlinesorpatterned,gradient,picture,ortexturedfills.
![Page 2328: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2328.jpg)
Example
ThisexamplesetstheshadowforshapethreeonmyDocumenttosemitransparentred.Iftheshapedoesn'talreadyhaveashadow,thisexampleaddsonetoit.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Shadow
.Visible=True
.ForeColor.RGB=RGB(255,0,0)
.Transparency=0.5
EndWith
![Page 2329: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2329.jpg)
ShowAll
![Page 2330: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2330.jpg)
TransparencyColorPropertyReturnsorsetsthetransparentcolorforthespecifiedpictureasared-green-blue(RGB)value.Forthispropertytotakeeffect,theTransparentBackgroundpropertymustbesettoTrue.Appliestobitmapsonly.Read/writeLong.
![Page 2331: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2331.jpg)
Remarks
Ifyouwanttobeabletoseethroughthetransparentpartsofthepictureallthewaytotheobjectsbehindthepicture,youmustsettheVisiblepropertyofthepicture'sFillFormatobjecttoFalse.IfyourpicturehasatransparentcolorandtheVisiblepropertyofthepicture'sFillFormatobjectissettoTrue,thepicture'sfillwillbevisiblethroughthetransparentcolor,butobjectsbehindthepicturewillbeobscured.
![Page 2332: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2332.jpg)
Example
ThisexamplesetsthecolorthathastheRGBvaluereturnedbythefunctionRGB(0,0,255)asthetransparentcolorforshapeoneonmyDocument.Fortheexampletowork,shapeonemustbeabitmap.
blueScreen=RGB(0,0,255)
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1)
With.PictureFormat
.TransparentBackground=True
.TransparencyColor=blueScreen
EndWith
.Fill.Visible=False
EndWith
![Page 2333: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2333.jpg)
ShowAll
![Page 2334: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2334.jpg)
TransparentBackgroundPropertyDetermineswhetherpartsofthepicturethatarethecolordefinedasthetransparentcolorappeartransparent.Read/writeMsoTriState.Appliestobitmapsonly.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTruePartsofthepicturethatarethecolordefinedasthetransparentcolorappeartransparent.
![Page 2335: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2335.jpg)
Remarks
UsetheTransparencyColorpropertytosetthetransparentcolor.
Ifyouwanttobeabletoseethroughthetransparentpartsofthepictureallthewaytotheobjectsbehindthepicture,youmustsettheVisiblepropertyofthepicture'sFillFormatobjecttomsoFalse.IfyourpicturehasatransparentcolorandtheVisiblepropertyofthepicture'sFillFormatobjectissettomsoTrue,thepicture'sfillwillbevisiblethroughthetransparentcolor,butobjectsbehindthepicturewillbeobscured.
![Page 2336: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2336.jpg)
Example
ThisexamplesetsthecolorthathastheRGBvaluereturnedbythefunctionRGB(0,24,240)asthetransparentcolorforshapeoneonmyDocument.Fortheexampletowork,shapeonemustbeabitmap.
blueScreen=RGB(0,0,255)
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1)
With.PictureFormat
.TransparentBackground=msoTrue
.TransparencyColor=blueScreen
EndWith
.Fill.Visible=msoFalse
EndWith
![Page 2337: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2337.jpg)
TriggerDelayTimePropertySetsorreturnsaSinglethatrepresentsthedelay,inseconds,fromwhenananimationtriggerisenabled.Read/write.
expression.TriggerDelayTime
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2338: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2338.jpg)
Example
Thefollowingexampleaddsashapetoaslide,addsananimationtotheshape,andinstructstheshapetobegintheanimationthreesecondsafteritisclicked.
SubAddShapeSetTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectPathDiamond)
WitheffDiamond.Timing
.Duration=5
.TriggerShape=shpRectangle
.TriggerType=msoAnimTriggerOnShapeClick
.TriggerDelayTime=3
EndWith
EndSub
![Page 2339: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2339.jpg)
TriggerShapePropertySetsorreturnsaShapeobjectthatrepresentstheshapeassociatedwithananimationtrigger.Read/write.
expression.TriggerShape
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2340: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2340.jpg)
Example
Thefollowingexampleaddstwoshapestoaslide,addsananimationtoashape,andbeginstheanimationwhentheothershapeisclicked.
SubAddShapeSetTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
SetshpOval=_
ActivePresentation.Slides(1).Shapes._
AddShape(Type:=msoShapeOval,Left:=400,Top:=100,Width:=100,Height:=50)
SetshpRectangle=ActivePresentation.Slides(1).Shapes._
AddShape(Type:=msoShapeRectangle,Left:=100,Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine._
InteractiveSequences.Add().AddEffect(Shape:=shpRectangle,_
effectId:=msoAnimEffectPathDiamond,trigger:=msoAnimTriggerOnShapeClick)
WitheffDiamond.Timing
.Duration=5
.TriggerShape=shpOval
EndWith
EndSub
![Page 2341: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2341.jpg)
ShowAll
![Page 2342: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2342.jpg)
TriggerTypePropertySetsorreturnsanMsoAnimTriggerTypeconstantthatrepresentsthetriggerthatstartsananimation.Read/write.
MsoAnimTriggerTypecanbeoneoftheseMsoAnimTriggerTypeconstants.msoAnimTriggerAfterPreviousmsoAnimTriggerMixedmsoAnimTriggerNonemsoAnimTriggerOnPageClickDefault.msoAnimTriggerOnShapeClickmsoAnimTriggerWithPrevious
expression.TriggerType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2343: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2343.jpg)
Example
Thefollowingexampleaddsashapetoaslide,addsananimationtotheshape,andinstructstheshapetobegintheanimationthreesecondsafteritisclicked.
SubAddShapeSetTiming()
DimeffDiamondAsEffect
DimshpRectangleAsShape
SetshpRectangle=ActivePresentation.Slides(1).Shapes_
.AddShape(Type:=msoShapeRectangle,Left:=100,_
Top:=100,Width:=50,Height:=50)
SeteffDiamond=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpRectangle,effectId:=msoAnimEffectPathDiamond)
WitheffDiamond.Timing
.Duration=5
.TriggerType=msoAnimTriggerOnShapeClick
.TriggerDelayTime=3
EndWith
EndSub
![Page 2344: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2344.jpg)
ShowAll
![Page 2345: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2345.jpg)
TypePropertyTypepropertyasitappliestotheAnimationBehaviorobject.
ReturnsorsetsanMsoAnimTypeconstantthatrepresentsthetypeofanimation.Read/write.
MsoAnimTypecanbeoneoftheseMsoAnimTypeconstants.MsoAnimTypeColorMsoAnimTypeMixedMsoAnimTypeMotionMsoAnimTypeNoneMsoAnimTypePropertyMsoAnimTypeRoatationMsoAnimTypeScaleMsoAnimTypeTransition
expression.Type
expressionRequired.AnexpressionthatreturnsanAnimationBehaviorobject.
TypepropertyasitappliestotheBulletFormatobject.
ReturnsorsetsaPpBulletTypeconstantthatrepresentsthetypeofbullet.Read/write.
PpBulletTypecanbeoneofthesePpBulletTypeconstants.ppBulletMixedppBulletNoneppBulletNumberedppBulletPictureppBulletUnnumbered
![Page 2346: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2346.jpg)
expression.Type
expressionRequired.AnexpressionthatreturnsaBulletFormatobject.
TypepropertyasitappliestotheCalloutFormatobject.
ReturnsorsetsanMsoCalloutTypeconstantthatrepresentsthetypeofcallout.Read/write.
MsoCalloutTypecanbeoneoftheseMsoCalloutTypeconstants.msoCalloutFourmsoCalloutMixedmsoCalloutOnemsoCalloutThreemsoCalloutTwo
expression.Type
expressionRequired.AnexpressionthatreturnsaCalloutFormatobject.
TypepropertyasitappliestotheColorFormatobject.
ReturnstheMsoColorTypeconstantthatrepresentsthetypeofcolor.Read-only.
MsoColorTypecanbeoneoftheseMsoColorTypeconstants.msoColorTypeCMSmsoColorTypeCMYKmsoColorTypeInkmsoColorTypeMixedmsoColorTypeRGBmsoColorTypeScheme
expression.Type
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
TypepropertyasitappliestotheConnectorFormatobject.
![Page 2347: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2347.jpg)
ReturnsorsetsanMsoConnectorTypeconstantthatrepresentsthetypeofconnector.Read/write.
MsoConnectorTypecanbeoneoftheseMsoConnectorTypeconstants.msoConnectorCurvemsoConnectorElbowmsoConnectorStraightmsoConnectorTypeMixed
expression.Type
expressionRequired.AnexpressionthatreturnsaConnectorFormatobject.
TypepropertyasitappliestotheDiagramobject.
ReturnsanMsoDiagramTypeconstantthatrepresentsthetypeofdiagram.Read-only.
MsoDiagramTypecanbeoneoftheseMsoDiagramTypeconstants.msoDiagramCyclemsoDiagramMixedmsoDiagramOrgChartmsoDiagramPyramidmsoDiagramRadialmsoDiagramTargetmsoDiagramVenn
expression.Type
expressionRequired.AnexpressionthatreturnsaDiagramobject.
TypepropertyasitappliestotheFillFormatobject.
ReturnsanMsoFillTypeconstantthatrepresentthetypeoffill.Read-only.
MsoFillTypecanbeoneoftheseMsoFillTypeconstants.msoFillBackground
![Page 2348: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2348.jpg)
msoFillGradientmsoFillMixedmsoFillPatternedmsoFillPicturemsoFillSolidmsoFillTextured
expression.Type
expressionRequired.AnexpressionthatreturnsaFillFormatobject.
TypepropertyasitappliestotheHyperlinkobject.
ReturnsanMsoHyperlinkTypeconstantthatrepresentsthetypeofhyperlink.Read-only.
MsoHyperlinkTypecanbeoneoftheseMsoHyperlinkTypeconstants.msoHyperlinkInlineShapeForuseinMicrosoftWordonly.msoHyperlinkRangemsoHyperlinkShape
expression.Type
expressionRequired.AnexpressionthatreturnsaHyperlinkobject.
TypepropertyasitappliestothePlaceholderFormatobject.
ReturnsaPpPlaceholderTypeconstantthatrepresentsthetypeofplaceholder.Read-only.
PpPlaceholderTypecanbeoneofthesePpPlaceholderTypeconstants.ppPlaceholderBitmapppPlaceholderBodyppPlaceholderCenterTitleppPlaceholderChartppPlaceholderDate
![Page 2349: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2349.jpg)
ppPlaceholderFooterppPlaceholderHeaderppPlaceholderMediaClipppPlaceholderMixedppPlaceholderObjectppPlaceholderOrgChartppPlaceholderSlideNumberppPlaceholderSubtitleppPlaceholderTableppPlaceholderTitleppPlaceholderVerticalBodyppPlaceholderVerticalTitle
expression.Type
expressionRequired.AnexpressionthatreturnsaPlaceholderFormatobject.
TypepropertyasitappliestotheSelectionobject.
ReturnsaPpSelectionTypeconstantthatrepresentsthetypeofobjectsinaselection.Read-only.
PpSelectionTypecanbeoneofthesePpSelectionTypeconstants.ppSelectionNoneppSelectionShapesppSelectionSlidesppSelectionText
expression.Type
expressionRequired.AnexpressionthatreturnsaSelectionobject.
TypepropertyasitappliestotheShadowFormatobject.
ReturnsorsetsanMsoShadowTypeconstantthatrepresentsthetypeofshadow.Read/write.
![Page 2350: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2350.jpg)
MsoShadowTypecanbeoneoftheseMsoShadowTypeconstants.msoShadow1msoShadow10msoShadow11msoShadow12msoShadow13msoShadow14msoShadow15msoShadow16msoShadow17msoShadow18msoShadow19msoShadow2msoShadow20msoShadow3msoShadow4msoShadow5msoShadow6msoShadow7msoShadow8msoShadow9msoShadowMixed
expression.Type
expressionRequired.AnexpressionthatreturnsaShadowFormatobject.
TypepropertyasitappliestotheShapeandShapeRangeobjects.
ReturnsanMsoShapeTypeconstantthatrepresentsthetypeofshapeorshapesinarangeofshapes.Read-only.
MsoShapeTypecanbeoneoftheseMsoShapeTypeconstants.msoAutoShapemsoCallout
![Page 2351: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2351.jpg)
msoCanvasmsoChartmsoCommentmsoDiagrammsoEmbeddedOLEObjectmsoFormControlmsoFreeformmsoGroupmsoLinemsoLinkedOLEObjectmsoLinkedPicturemsoMediamsoOLEControlObjectmsoPicturemsoPlaceholdermsoScriptAnchormsoShapeTypeMixedmsoTablemsoTextBoxmsoTextEffect
expression.Type
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
TypepropertyasitappliestotheSoundEffectobject.
ReturnsorsetsaPpSoundEffectTypeconstantthatrepresentsthetypeofsoundeffect.Read/write.
PpSoundEffectTypecanbeoneofthesePpSoundEffectTypeconstants.ppSoundEffectsMixedppSoundFileppSoundNoneppSoundStopPrevious
![Page 2352: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2352.jpg)
expression.Type
expressionRequired.AnexpressionthatreturnsaSoundEffectobject.
TypepropertyasitappliestotheTabStopobject.
ReturnsorsetsaPpTabStopTypeconstantthatrepresentstheformattingofatabstop.Read/write.
PpTabStopTypecanbeoneofthesePpTabStopTypeconstants.ppTabStopCenterppTabStopDecimalppTabStopLeftppTabStopMixedppTabStopRight
expression.Type
expressionRequired.AnexpressionthatreturnsaTabStopobject.
TypepropertyasitappliestotheViewobject.
ReturnsaPpViewTypeconstantthatrepresentsthetypeofview.Read-only.
PpViewTypecanbeoneofthesePpViewTypeconstants.ppViewHandoutMasterppViewMasterThumbnailsppViewNormalppViewNotesMasterppViewNotesPageppViewOutlineppViewPrintPreviewppViewSlideppViewSlideMasterppViewSlideSorter
![Page 2353: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2353.jpg)
ppViewThumbnailsppViewTitleMaster
expression.Type
expressionRequired.AnexpressionthatreturnsaViewobject.
![Page 2354: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2354.jpg)
Example
AsitappliestotheShapeobject.
ThisexampleloopsthroughalltheshapesonalltheslidesintheactivepresentationandsetsalllinkedMicrosoftExcelworksheetstobeupdatedmanually.
ForEachsldInActivePresentation.Slides
ForEachshInsld.Shapes
Ifsh.Type=msoLinkedOLEObjectThen
Ifsh.OLEFormat.ProgID="Excel.Sheet"Then
sh.LinkFormat.AutoUpdate=ppUpdateOptionManual
EndIf
EndIf
Next
Next
![Page 2355: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2355.jpg)
ShowAll
![Page 2356: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2356.jpg)
UnderlinePropertyDetermineswhetherthespecifiedtext(fortheFontobject)orthefontstyle(fortheFontInfoobject)isunderlined.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThespecifiedtext(orfontstyle)isn'tunderlined.msoTriStateMixedSomecharactersareunderlined(forthespecifiedtext)andsomearen't.msoTriStateTogglemsoTrueThespecifiedtext(orfontstyle)isunderlined.
expression.Underline
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2357: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2357.jpg)
Example
Thisexamplesetstheformattingforthetextinshapetwoonslideoneintheactivepresentation.
WithApplication.ActivePresentation.Slides(1).Shapes(2)
With.TextFrame.TextRange.Font
.Size=32
.Name="Palatino"
.Underline=msoTrue
EndWith
EndWith
![Page 2358: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2358.jpg)
ShowAll
![Page 2359: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2359.jpg)
UpdateLinksOnSavePropertyDetermineswhetherhyperlinksandpathstoallsupportingfilesareautomaticallyupdatedbeforeyousaveorpublishthepresentationasaWebpage.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseHyperlinksandpathstoallsupportingfilesarenotautomaticallyupdatedbeforeyousaveorpublishthepresentationasaWebpage.msoTriStateMixedmsoTriStateTogglemsoTrueDefault.HyperlinksandpathstoallsupportingfilesareautomaticallyupdatedbeforeyousaveorpublishthepresentationasaWebpage,ensuringthatthelinksareup-to-dateatthetimethepresentationissaved.
![Page 2360: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2360.jpg)
Remarks
YoushouldsetthispropertytoFalseifthelocationwherethepresentationissavedisdifferentfromthefinallocationontheWebserverandthesupportingfilesarenotavailableatthefirstlocation.
![Page 2361: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2361.jpg)
Example
Thisexamplespecifiesthatlinksarenotupdatedbeforethepresentationissaved.
Application.DefaultWebOptions.UpdateLinksOnSave=msoFalse
![Page 2362: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2362.jpg)
ShowAll
![Page 2363: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2363.jpg)
UseFormatPropertyDetermineswhetherthedateandtimeobjectcontainsautomaticallyupdatedinformation.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThedateandtimeobjectisafixedstring.msoTriStateMixedmsoTriStateTogglemsoTrueThedateandtimeobjectcontainsautomaticallyupdatedinformation.
![Page 2364: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2364.jpg)
Remarks
ThispropertyappliesonlytoaHeaderFooterobjectthatrepresentsadateandtime(returnedbytheDateAndTimeproperty).SettheUseFormatpropertyofadateandtimeHeaderFooterobjecttoTruewhenyouwanttosetorreturnthedateandtimeformatbyusingtheFormatproperty.SettheUseFormatpropertytomsoFalsewhenyouwanttosetorreturnthetextstringforthefixeddateandtime.
![Page 2365: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2365.jpg)
Example
Thisexamplesetsthedateandtimefortheslidemasteroftheactivepresentationtobeupdatedautomaticallyandthenitsetsthedateandtimeformattoshowhours,minutes,andseconds.
SetmyPres=Application.ActivePresentation
WithmyPres.SlideMaster.HeadersFooters.DateAndTime
.UseFormat=msoTrue
.Format=ppDateTimeHmmss
EndWith
![Page 2366: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2366.jpg)
ShowAll
![Page 2367: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2367.jpg)
UseLongFileNamesPropertyDetermineswhetherlongfilenamesareused.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseLongfilenamesarenotusedandtheDOSfilenameformat(8.3)isused.msoTriStateMixedmsoTriStateTogglemsoTrueDefault.LongfilenamesareusedwhenyousaveorpublishacompleteorpartialpresentationasaWebpage.
![Page 2368: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2368.jpg)
Remarks
Ifyoudon'tuselongfilenamesandyourpresentationhassupportingfiles,MicrosoftPowerPointautomaticallyorganizesthosefilesinaseparatefolder.Otherwise,usetheOrganizeInFolderpropertytodeterminewhethersupportingfilesareorganizedinaseparatefolder.
![Page 2369: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2369.jpg)
Example
Thisexampledisallowstheuseoflongfilenamesastheglobaldefaultfortheapplication.
Application.DefaultWebOptions.UseLongFileNames=msoFalse
![Page 2370: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2370.jpg)
ShowAll
![Page 2371: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2371.jpg)
UseTextColorPropertyDetermineswhetherthespecifiedbulletsaresettothecolorofthefirsttextcharacterintheparagraph.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThespecifiedbulletsaresettoanyothercolor.msoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedbulletsaresettothecolorofthefirsttextcharacterintheparagraph.
![Page 2372: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2372.jpg)
Remarks
YoucannotexplicitlysetthispropertytomsoFalse.Settingthebulletformatcolor(usingtheColorpropertyoftheFontobject)setsthispropertytomsoFalse.WhenUseTextColorismsoFalse,youcansetittomsoTruetoresetthebulletformattothedefaultcolor.
![Page 2373: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2373.jpg)
Example
Thisexampleresetsbulletsinshapetwoonslideoneintheactivepresentationtotheirdefaultcharacter,font,andcolor.
WithActivePresentation.Slides(1).Shapes(2)
With.TextFrame.TextRange.ParagraphFormat.Bullet
.RelativeSize=1
.UseTextColor=msoTrue
.UseTextFont=msoTrue
.Character=8226
EndWith
EndWith
![Page 2374: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2374.jpg)
ShowAll
![Page 2375: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2375.jpg)
UseTextFontPropertyDetermineswhetherthespecifiedbulletsaresettothefontofthefirsttextcharacterintheparagraph.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseThespecifiedbulletsaresettoacustomfont.msoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedbulletsaresettothefontofthefirsttextcharacterintheparagraph.
![Page 2376: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2376.jpg)
Remarks
YoucannotexplicitlysetthispropertytomsoFalse.Settingthebulletformatfont(usingtheNamepropertyoftheFontobject)setsthispropertytomsoFalse.WhenUseTextFontismsoFalse,youcansetittomsoTruetoresetthebulletformattothedefaultfont.
![Page 2377: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2377.jpg)
Example
Thisexampleresetsbulletsinshapetwoonslideoneintheactivepresentationtotheirdefaultcharacter,font,andcolor.
WithActivePresentation.Slides(1).Shapes(2)
With.TextFrame.TextRange.ParagraphFormat.Bullet
.RelativeSize=1
.UseTextColor=msoTrue
.UseTextFont=msoTrue
.Character=8226
EndWith
EndWith
![Page 2378: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2378.jpg)
ValuePropertySetsorreturnsaVariantthatrepresentsthevalueofapropertyforananimationpoint.
expression.Value
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2379: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2379.jpg)
Example
Thisexampleinsertsthreefillcoloranimationpointsinthemainsequenceanimationtimelineonthefirstslide.
SubBuildTimeLine()
DimshpFirstAsShape
DimeffMainAsEffect
DimtmlMainAsTimeLine
DimaniBhvrAsAnimationBehavior
DimaniPointAsAnimationPoint
SetshpFirst=ActivePresentation.Slides(1).Shapes(1)
SettmlMain=ActivePresentation.Slides(1).TimeLine
SeteffMain=tmlMain.MainSequence.AddEffect(Shape:=shpFirst,_
EffectId:=msoAnimEffectBlinds)
SetaniBhvr=tmlMain.MainSequence(1).Behaviors.Add_
(Type:=msoAnimTypeProperty)
WithaniBhvr.PropertyEffect
.Property=msoAnimShapeFillColor
SetaniPoint=.Points.Add
aniPoint.Time=0.2
aniPoint.Value=RGB(0,0,0)
SetaniPoint=.Points.Add
aniPoint.Time=0.5
aniPoint.Value=RGB(0,255,0)
SetaniPoint=.Points.Add
aniPoint.Time=1
aniPoint.Value=RGB(0,255,255)
EndWith
EndSub
![Page 2380: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2380.jpg)
ShowAll
![Page 2381: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2381.jpg)
VBASignedPropertyDetermineswhethertheVisualBasicforApplications(VBA)projectforthespecifieddocumenthasbeendigitallysigned.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueTheVBAprojectforthespecifieddocumenthasbeendigitallysigned.
![Page 2382: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2382.jpg)
Example
ThisexampleloadsapresentationcalledMyPres.pptandteststoseewhetherornotithasadigitalsignature.Ifthere'snodigitalsignature,thecodedisplaysawarningmessage.
Presentations.OpenFileName:="c:\MyDocuments\MyPres.ppt",_
ReadOnly:=msoFalse,WithWindow:=msoTrue
WithActivePresentation
If.VBASigned=msoFalseAnd_
.VBProject.VBComponents.Count>0Then
MsgBox"Warning!TheVisualBasicprojectfor"_
&vbCrLf&"thispresentationhasnot"_
&vbCrLf&"beendigitallysigned."_
,vbCritical,"DigitalSignatureWarning"
EndIf
EndWith
![Page 2383: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2383.jpg)
VBEPropertyReturnsaVBEobjectthatrepresentstheVisualBasicEditor.Read-only.
![Page 2384: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2384.jpg)
Example
ThisexamplesetsthenameoftheactiveprojectintheVisualBasicEditor.
Application.VBE.ActiveVBProject.Name="TestProject"
![Page 2385: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2385.jpg)
VBProjectPropertyReturnsaVBProjectobjectthatrepresentstheindividualVisualBasicprojectforthepresentation.Read-only.
![Page 2386: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2386.jpg)
Example
ThisexamplechangesthenameoftheVisualBasicprojectfortheactivepresentation.
ActivePresentation.VBProject.Name="TestProject"
![Page 2387: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2387.jpg)
VersionPropertyReturnsthePowerPointversionnumber.Read-onlyString.
![Page 2388: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2388.jpg)
Example
ThisexampledisplaysamessageboxthatcontainsthePowerPointversionnumberandbuildnumber,andthenameoftheoperatingsystem.
WithApplication
MsgBox"WelcometoPowerPointversion"&.Version&_
",build"&.Build&",runningon"&.OperatingSystem&"!"
EndWith
![Page 2389: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2389.jpg)
ShowAll
![Page 2390: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2390.jpg)
VerticalAnchorPropertyReturnsorsetstheverticalalignmentoftextinatextframe.Read/writeMsoVerticalAnchor.
MsoVerticalAnchorcanbeoneoftheseMsoVerticalAnchorconstants.msoAnchorBottommsoAnchorBottomBaseLineAnchorsthebottomofthetextstringtothecurrentpositionregardlessoftheresizingoftext.Whenyouresizetextwithoutbaselineanchoring,thetextcentersitselfonthepreviousposition.msoAnchorMiddlemsoAnchorTopmsoAnchorTopBaselineAnchorsthebottomofthetextstringtothecurrentpositionregardlessoftheresizingoftext.Whenyouresizetextwithoutbaselineanchoring,thetextcentersitselfonthepreviousposition.msoVerticalAnchorMixedRead-only.Returnedwhentwoormoretextboxeswithinashaperangehavethispropertysettodifferentvalues.
expression.VerticalAnchor
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2391: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2391.jpg)
Example
ThisexamplesetsthealignmentofthetextinshapeoneonmyDocumenttotopcentered.
SetmyDocument=ActivePresentation.SlideMaster
WithmyDocument.Shapes(1)
.TextFrame.HorizontalAnchor=msoAnchorCenter
.TextFrame.VerticalAnchor=msoAnchorTop
EndWith
![Page 2392: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2392.jpg)
ShowAll
![Page 2393: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2393.jpg)
VerticalFlipPropertyDetermineswhetherthespecifiedshapeisflippedaroundtheverticalaxis.Read-onlyMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedshapeisflippedaroundtheverticalaxis.
![Page 2394: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2394.jpg)
Example
ThisexamplerestoreseachshapeonmyDocumenttoitsoriginalstateifit'sbeenflippedhorizontallyorvertically.
SetmyDocument=ActivePresentation.Slides(1)
ForEachsInmyDocument.Shapes
Ifs.HorizontalFlipThens.FlipmsoFlipHorizontal
Ifs.VerticalFlipThens.FlipmsoFlipVertical
Next
![Page 2395: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2395.jpg)
ShowAll
![Page 2396: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2396.jpg)
VerticesPropertyReturnsthecoordinatesofthespecifiedfreeformdrawing'svertices(andcontrolpointsforBéziercurves)asaseriesofcoordinatepairs.YoucanusethearrayreturnedbythispropertyasanargumenttotheAddCurvemethodorAddPolylinemethod.Read-onlyVariant.
ThefollowingtableshowshowtheVerticespropertyassociatesthevaluesinthearrayvertArray()withthecoordinatesofatriangle'svertices.
VertArrayelement Contains
VertArray(1,
1)
Thehorizontaldistancefromthefirstvertextotheleftsideoftheslide
VertArray(1,
2)
Theverticaldistancefromthefirstvertextothetopoftheslide
VertArray(2,
1)
Thehorizontaldistancefromthesecondvertextotheleftsideoftheslide
VertArray(2,
2)
Theverticaldistancefromthesecondvertextothetopoftheslide
VertArray(3,
1)
Thehorizontaldistancefromthethirdvertextotheleftsideoftheslide
VertArray(3,
2)
Theverticaldistancefromthethirdvertextothetopoftheslide
![Page 2397: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2397.jpg)
Example
ThisexampleassignsthevertexcoordinatesforshapeoneonmyDocumenttothearrayvariablevertArray()anddisplaysthecoordinatesforthefirstvertex.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(1)
vertArray=.Vertices
x1=vertArray(1,1)
y1=vertArray(1,2)
MsgBox"Firstvertexcoordinates:"&x1&","&y1
EndWith
ThisexamplecreatesacurvethathasthesamegeometricdescriptionasshapeoneonmyDocument.Shapeonemustcontain3n+1verticesforthisexampletosucceed.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes
.AddCurve.Item(1).Vertices
EndWith
![Page 2398: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2398.jpg)
ShowAll
![Page 2399: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2399.jpg)
ViewPropertyViewpropertyasitappliestotheSlideShowWindowobject.
ReturnsaSlideShowViewobject.Read-only.
expression.View
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
ViewpropertyasitappliestotheDocumentWindowobject.
ReturnsaViewobjectthatrepresentstheviewinthespecifieddocumentwindow.Read-only.
expression.View
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 2400: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2400.jpg)
Example
AsitappliestotheSlideShowWindowobject.
ThisexampleusestheViewpropertytoexitthecurrentslideshow,setstheviewintheactivewindowtoslideview,andthendisplaysslidethree.
Application.SlideShowWindows(1).View.Exit
WithApplication.ActiveWindow
.ViewType=ppViewSlide
.View.GotoSlide3
EndWith
![Page 2401: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2401.jpg)
ShowAll
![Page 2402: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2402.jpg)
ViewTypePropertyViewTypepropertyasitappliestotheDocumentWindowobject.
Returnsorsetsthetypeoftheviewcontainedinthespecifieddocumentwindow.Read/writePpViewType.
PpViewTypecanbeoneofthesePpViewTypeconstants.ppViewHandoutMasterppViewMasterThumbnailsppViewNormalppViewNotesMasterppViewNotesPageppViewOutlineppViewPrintPreviewppViewSlideppViewSlideMasterppViewSlideSorterppViewThumbnailsppViewTitleMaster
expression.ViewType
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
ViewTypepropertyasitappliestothePaneobject.
nanyviewwithpanes,returnsthetypeofviewforthespecifiedpane.Whenreferencingaviewwithoutpanes,returnsthetypeofviewfortheparentDocumentWindowobject.Read-onlyPpViewType.
PpViewTypecanbeoneofthesePpViewTypeconstants.ppViewHandoutMasterppViewMasterThumbnails
![Page 2403: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2403.jpg)
ppViewNormalppViewNotesMasterppViewNotesPageppViewOutlineppViewPrintPreviewppViewSlideppViewSlideMasterppViewSlideSorterppViewThumbnailsppViewTitleMaster
expression.ViewType
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 2404: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2404.jpg)
Example
AsitappliestotheDocumentWindowobject.
Thisexamplechangestheviewintheactivewindowtoslidesorterviewifthewindowiscurrentlydisplayedinnormalview.
WithApplication.ActiveWindow
If.ViewType=ppViewNormalThen
.ViewType=ppViewSlideSorter
EndIf
EndWith
AsitappliestothePaneobject.
Iftheviewintheactivepaneisslideview,thisexamplemakesthenotespanetheactivepane.ThenotespaneisthethirdmemberofthePanescollection.
WithActiveWindow
If.ActivePane.ViewType=ppViewSlideThen
.Panes(3).Activate
EndIf
EndWith
![Page 2405: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2405.jpg)
ShowAll
![Page 2406: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2406.jpg)
VisiblePropertyReturnsorsetsthevisibilityofthespecifiedobjectortheformattingappliedtothespecifiedobject.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueThespecifiedobjectorobjectformattingisvisible.
![Page 2407: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2407.jpg)
Example
Thisexamplesetsthehorizontalandverticaloffsetsfortheshadowofshapethreeonthefirstslideintheactivepresentation.Theshadowisoffset5pointstotherightoftheshapeand3pointsaboveit.Iftheshapedoesn'talreadyhaveashadow,thisexampleaddsonetoit.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes(3).Shadow
.Visible=msoTrue
.OffsetX=5
.OffsetY=-3
EndWith
![Page 2408: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2408.jpg)
WebOptionsPropertyReturnstheWebOptionsobject,whichcontainspresentation-levelattributesusedbyMicrosoftPowerPointwhenyousaveorpublishacompleteorpartialpresentationasaWebpageoropenaWebpage.Read-only.
![Page 2409: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2409.jpg)
Example
ThisexamplespecifiesthatwhensavingorpublishingtheactivepresentationasaWebpage,PortableNetworkGraphics(PNG)areallowed,andthetextcolorfortheoutlinepaneiswhiteandthebackgroundcolorfortheoutlineandslidepanesisblack.
WithActivePresentation.WebOptions
.FrameColors=ppFrameColorsWhiteTextOnBlack
.AllowPNG=True
EndWith
![Page 2410: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2410.jpg)
WeightPropertyReturnsorsetsthethicknessofthespecifiedline,inpoints.Read/writeSingle.
![Page 2411: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2411.jpg)
Example
ThisexampleaddsagreendashedlinetwopointsthicktomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddLine(10,10,250,250).Line
.DashStyle=msoLineDashDotDot
.ForeColor.RGB=RGB(0,255,255)
.Weight=2
EndWith
![Page 2412: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2412.jpg)
WidthPropertyReturnsorsetsthewidthofthespecifiedobject,inpoints.Read-onlySinglefortheMasterobject,read/writeSingleforallotherobjects.
![Page 2413: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2413.jpg)
Example
Thisexamplearrangeswindowsoneandtwohorizontally;inotherwords,eachwindowoccupieshalftheavailableverticalspaceandalltheavailablehorizontalspaceintheapplicationwindow'sclientarea.Forthisexampletowork,theremustbeonlytwodocumentwindowsopen.
Windows.ArrangeppArrangeTiled
ah=Windows(1).Height'availableheight
aw=Windows(1).Width+Windows(2).Width'availablewidth
WithWindows(1)
.Width=aw
.Height=ah/2
.Left=0
EndWith
WithWindows(2)
.Width=aw
.Height=ah/2
.Top=ah/2
.Left=0
EndWith
Thisexamplesetsthewidthforcolumnoneinthespecifiedtableto80points(72pointsperinch).
ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Width=80
![Page 2414: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2414.jpg)
ShowAll
![Page 2415: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2415.jpg)
WindowsPropertyWindowspropertyasitappliestotheApplicationobject.
ReturnsaDocumentWindowscollectionthatrepresentsallopendocumentwindows.Read-only.
WindowspropertyasitappliestothePresentationobject.
ReturnsaDocumentWindowscollectionthatrepresentsalldocumentwindowsassociatedwiththespecifiedpresentation.Thispropertydoesn'treturnanyslideshowwindowsassociatedwiththepresentation.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 2416: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2416.jpg)
Example
AsitappliestotheApplicationobject.
Thisexampleclosesallwindowsexcepttheactivewindow.
WithApplication.Windows
Fori=.CountTo2Step-1
.Item(i).Close
Next
EndWith
![Page 2417: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2417.jpg)
ShowAll
![Page 2418: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2418.jpg)
WindowStatePropertyReturnsorsetsthestateofthespecifiedwindow.Read/writePpWindowState.
PpWindowStatecanbeoneofthesePpWindowStateconstants.ppWindowMaximizedppWindowMinimizedppWindowNormal
expression.WindowState
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2419: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2419.jpg)
Remarks
WhenthestateofthewindowisppWindowNormal,thewindowisneithermaximizednorminimized.
![Page 2420: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2420.jpg)
Example
Thisexamplemaximizestheactivewindow.
Application.ActiveWindow.WindowState=ppWindowMaximized
![Page 2421: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2421.jpg)
ShowAll
![Page 2422: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2422.jpg)
WordWrapPropertyWordWrappropertyasitappliestotheTextFrameobject.
Determineswhetherlinesbreakautomaticallytofitinsidetheshape.Read/writeMsoTriState.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueLinesbreakautomaticallytofitinsidetheshape.
expression.WordWrap
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
WordWrappropertyasitappliestotheParagraphFormatobject.
UsedonlywithKanjicharacters.Read/writeLong.
![Page 2423: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2423.jpg)
Example
AsitappliestotheTextFrameobject.
ThisexampleaddsarectanglethatcontainstexttomyDocument,andthenturnsoffwordwrappinginthenewrectangle.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(msoShapeRectangle,_
0,0,100,300).TextFrame
.TextRange.Text=_
"Hereissometesttextthatistoolongforthisbox"
.WordWrap=False
EndWith
![Page 2424: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2424.jpg)
WritePasswordPropertySetsorreturnsaStringthatrepresentsapasswordforsavingchangestothespecifieddocument.Read/write.
expression.WritePassword
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2425: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2425.jpg)
Example
Thisexamplesetsthepasswordforsavingchangestotheactivepresentation.
SubSetSavePassword()
ActivePresentation.WritePassword=complexstrPWD'globalvariable
EndSub
![Page 2426: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2426.jpg)
ShowAll
![Page 2427: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2427.jpg)
ZoomPropertyZoompropertyasitappliestotheViewobject.
Returnsorsetsthezoomsettingofthespecifiedviewasapercentageofnormalsize.Canbeavaluefrom10to400percent.Read/writeInteger.
expression.Zoom
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
ZoompropertyasitappliestotheSlideShowViewobject.
Returnsthezoomsettingofthespecifiedslideshowwindowviewasapercentageofnormalsize.Canbeavaluefrom10to400percent.Read-onlyInteger.
expression.Zoom
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 2428: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2428.jpg)
Example
AsitappliestotheViewobject.
Thefollowingexamplesetsthezoomto30percentfortheviewindocumentwindowone.
Windows(1).View.Zoom=30
![Page 2429: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2429.jpg)
ShowAll
![Page 2430: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2430.jpg)
ZoomToFitPropertyDetermineswhethertheviewiszoomedtofitthedimensionsofthedocumentwindoweverytimethedocumentwindowisresized.Read/writeMsoTriState.Thispropertyappliesonlytoslideview,notespageview,ormasterview.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalsemsoTriStateMixedmsoTriStateTogglemsoTrueTheviewiszoomedtofitthedimensionsofthedocumentwindoweverytimethedocumentwindowisresized.
![Page 2431: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2431.jpg)
Remarks
WhenthevalueoftheZoompropertyisexplicitlyset,thevalueoftheZoomToFitpropertyisautomaticallysettomsoFalse.
![Page 2432: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2432.jpg)
Example
Thefollowingexamplesetstheviewindocumentwindowonetoslideview,withthezoomautomaticallysettofitthedimensionsofthewindow.
WithWindows(1)
.ViewType=ppViewSlide
.View.ZoomToFit=msoTrue
EndWith
![Page 2433: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2433.jpg)
ZOrderPositionPropertyReturnsthepositionofthespecifiedshapeinthez-order.Shapes(1)returnstheshapeatthebackofthez-order,andShapes(Shapes.Count)returnstheshapeatthefrontofthez-order.Read-onlyLong.
Thispropertyisread-only.Tosettheshape'spositioninthez-order,usetheZOrdermethod.
![Page 2434: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2434.jpg)
Remarks
Ashape'spositioninthez-ordercorrespondstotheshape'sindexnumberintheShapescollection.Forexample,iftherearefourshapesontheslide,theexpressionmyDocument.Shapes(1)returnstheshapeatthebackofthez-order,andtheexpressionmyDocument.Shapes(4)returnstheshapeatthefrontofthez-order.
Wheneveryouaddanewshapetoacollection,it'saddedtothefrontofthez-orderbydefault.
![Page 2435: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2435.jpg)
Example
ThisexampleaddsanovaltomyDocumentandthenplacestheovalsecondfromthebackinthez-orderifthereisatleastoneothershapeontheslide.
SetmyDocument=ActivePresentation.Slides(1)
WithmyDocument.Shapes.AddShape(msoShapeOval,100,100,100,300)
While.ZOrderPosition>2
.ZOrdermsoSendBackward
Wend
EndWith
![Page 2436: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2436.jpg)
ShowAll
![Page 2437: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2437.jpg)
AfterNewPresentationEventOccursafterapresentationiscreated.
expression.AfterNewPresentation(Pres)
expressionRequired.AnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
PresRequiredPresentation.Thepresentationthatiscreated.
![Page 2438: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2438.jpg)
Example
ThisexampleusestheRGBfunctiontosettheslidemasterbackgroundcolorforthenewpresentationtosalmonpink,andthenappliesthethirdcolorschemetothenewpresentation.
PrivateSubApp_AfterNewPresentation(ByValPresAsPresentation)
WithPres
SetCS3=.ColorSchemes(3)
CS3.Colors(ppBackground).RGB=RGB(240,115,100)
.SlideMaster.ColorScheme=CS3
EndWith
EndSub
![Page 2439: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2439.jpg)
ShowAll
![Page 2440: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2440.jpg)
AfterPresentationOpenEventOccursafteranexistingpresentationisopened.
expression.AfterPresentationOpen(Pres)
expressionRequired.AnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
PresRequiredPresentation.Thepresentationthatisopened.
![Page 2441: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2441.jpg)
Example
Thisexamplemodifiesthebackgroundcolorforcolorschemethree,appliesthemodifiedcolorschemetothepresentationthatwasopened,anddisplaysthepresentationinSlideview.
PrivateSubApp_AfterPresentationOpen(ByValPresAsPresentation)
WithPres
SetCS3=.ColorSchemes(3)
CS3.Colors(ppBackground).RGB=RGB(240,115,100)
WithWindows(1)
.Selection.SlideRange.ColorScheme=CS3
.ViewType=ppViewSlide
EndWith
EndWith
EndSub
![Page 2442: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2442.jpg)
ColorSchemeChangedEventOccursafteracolorschemeischanged.
PrivateSubobject_ColorSchemeChanged(ByValSldRangeAsSlideRange)
objectAvariablethatreferencesanobjectoftypeApplicationdeclaredwitheventsinaclassmodule.
SldRangeTherangeofslidesaffectedbythechange.
![Page 2443: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2443.jpg)
Remarks
Actionswhichtriggerthiseventwouldincludeactionssuchasmodifyingaslide'sorslidemaster'scolorscheme,orapplyingatemplate.
ToaccesstheApplicationevents,declareanApplicationvariableintheGeneralDeclarationssectionofyourcode.ThensetthevariableequaltotheApplicationobjectforwhichyouwanttoaccessevents.ForinformationaboutusingeventswiththeMicrosoftPowerPointApplicationobject,seeUsingEventswiththeApplicationObject.
![Page 2444: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2444.jpg)
Example
Thisexampledisplaysamessagewhenthecolorschemefortheselectedslideorslidesischanged.ThisexampleassumesanApplicationobjectcalledPPTApphasbeendeclaredusingtheWithEventskeyword.
PrivateSubPPTApp_ColorSchemeChanged(ByValSldRangeAsSlideRange)
IfSldRange.Count=1Then
MsgBox"You'vechangedthecolorschemefor"_
&SldRange.Name&"."
Else
MsgBox"You'vechangedthecolorschemefor"_
&SldRange.Count&"slides."
EndIf
EndSub
![Page 2445: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2445.jpg)
ShowAll
![Page 2446: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2446.jpg)
NewPresentationEventOccursafterapresentationiscreated,asitisaddedtothePresentationscollection.
PrivateSubapplication_NewPresentation(ByValPresAsPresentation)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
PresThenewpresentation.
![Page 2447: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2447.jpg)
Example
ThisexampleusestheRGBfunctiontosettheslidemasterbackgroundcolorforthenewpresentationtosalmonpink,andthenappliesthethirdcolorschemetothenewpresentation.
PrivateSubApp_NewPresentation(ByValPresAsPresentation)
WithPres
SetCS3=.ColorSchemes(3)
CS3.Colors(ppBackground).RGB=RGB(240,115,100)
.SlideMaster.ColorScheme=CS3
EndWith
EndSub
![Page 2448: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2448.jpg)
PresentationBeforeSaveEventOccursbeforeapresentationissaved.
PrivateSubobject_PresentationBeforeSave(ByValPresAsPresentation,CancelAsBoolean)
objectAvariablethatreferencesanobjectoftypeApplicationdeclaredwitheventsinaclassmodule.
PresThepresentationbeingsaved.
CancelTruetocancelthesaveprocess.
![Page 2449: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2449.jpg)
Remarks
ThiseventistriggeredastheSaveAsdialogboxappears.
ToaccesstheApplicationevents,declareanApplicationvariableintheGeneralDeclarationssectionofyourcode.ThensetthevariableequaltotheApplicationobjectforwhichyouwanttoaccessevents.ForinformationaboutusingeventswiththeMicrosoftPowerPointApplicationobject,seeUsingEventswiththeApplicationObject.
![Page 2450: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2450.jpg)
Example
Thisexamplechecksiftherearerevisionsinapresentationand,ifthereare,askswhethertosavethepresentation.Ifauser'sresponseisno,thesaveprocessiscancelled.ThisexampleassumesanApplicationobjectcalledPPTApphasbeendeclaredusingtheWithEventskeyword.
PrivateSubPPTApp_PresentationBeforeSave(ByValPresAsPresentation,_
CancelAsBoolean)
DimintResponseAsInteger
SetPres=ActivePresentation
IfPres.HasRevisionInfoThen
intResponse=MsgBox(Prompt:="Thepresentationcontainsrevisions."&_
"Doyouwanttoaccepttherevisionsbeforesaving?",Buttons:=vbYesNo)
IfintResponse=vbYesThen
Cancel=True
MsgBox"Yourpresentationwasnotsaved."
EndIf
EndIf
EndSub
![Page 2451: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2451.jpg)
ShowAll
![Page 2452: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2452.jpg)
PresentationCloseEventOccursimmediatelybeforeanyopenpresentationcloses,asitisremovedfromthePresentationscollection.
PrivateSubapplication_PresentationClose(ByValPresAsPresentation)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
PresThepresentationthatisbeingclosed.
![Page 2453: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2453.jpg)
Example
ThisexamplesavesacopyoftheactivepresentationasanHTMLfile,withthesamenameandwithinthesamefolder.
PrivateSubApp_PresentationClose(ByValPresAsPresentation)
FindNum=InStr(1,Pres.FullName,".")
HTMLName=Mid(Pres.FullName,1,FindNum-1)_
&".htm"
Pres.SaveCopyAsHTMLName,ppSaveAsHTML
EndSub
![Page 2454: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2454.jpg)
ShowAll
![Page 2455: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2455.jpg)
PresentationNewSlideEventOccurswhenanewslideiscreatedinanyopenpresentation,astheslideisaddedtotheSlidescollection.
PrivateSubapplication_PresentationNewSlide(ByValSldAsSlide)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
SldThenewslide.
![Page 2456: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2456.jpg)
Example
Thisexamplemodifiesthebackgroundcolorforcolorschemethreeandthenappliesthemodifiedcolorschemetothenewslide.Next,itaddsdefaulttexttoshapeoneifithasatextframe.
PrivateSubApp_PresentationNewSlide(ByValSldAsSlide)
WithActivePresentation
SetCS3=.ColorSchemes(3)
CS3.Colors(ppBackground).RGB=RGB(240,115,100)
Windows(1).Selection.SlideRange.ColorScheme=CS3
EndWith
IfSld.Layout<>ppLayoutBlankThen
WithSld.Shapes(1)
If.HasTextFrame=msoTrueThen
.TextFrame.TextRange.Text="KingSalmon"
EndIf
EndWith
EndIf
EndSub
![Page 2457: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2457.jpg)
ShowAll
![Page 2458: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2458.jpg)
PresentationOpenEventOccursafteranexistingpresentationisopened,asitisaddedtothePresentationscollection.
PrivateSubapplication_PresentationOpen(ByValPresAsPresentation)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
PresThepresentationthatisopened.
![Page 2459: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2459.jpg)
Example
Thisexamplemodifiesthebackgroundcolorforcolorschemethree,appliesthemodifiedcolorschemetothepresentationthatwasjustopened,anddisplaysthepresentationinslideview.
PrivateSubApp_PresentationOpen(ByValPresAsPresentation)
WithPres
SetCS3=.ColorSchemes(3)
CS3.Colors(ppBackground).RGB=RGB(240,115,100)
WithWindows(1)
.Selection.SlideRange.ColorScheme=CS3
.ViewType=ppViewSlide
EndWith
EndWith
EndSub
![Page 2460: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2460.jpg)
ShowAll
![Page 2461: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2461.jpg)
PresentationPrintEventOccursbeforeapresentationisprinted.
PrivateSubapplication_PresentationPrint(ByValPresAsPresentation)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
PresThepresentationtobeprinted.
![Page 2462: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2462.jpg)
Example
ThisexamplesetsthePrintHiddenSlidespropertytoTruesothateverytimetheactivepresentationisprinted,thehiddenslidesareprintedaswell.
PrivateSubApp_PresentationPrint(ByValPresAsPresentation)
Pres.PrintOptions.PrintHiddenSlides=True
EndSub
![Page 2463: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2463.jpg)
ShowAll
![Page 2464: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2464.jpg)
PresentationSaveEventOccursbeforeanyopenpresentationissaved.
PrivateSubapplication_PresentationSave(ByValPresAsPresentation)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
PresThepresentationtobesaved.
![Page 2465: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2465.jpg)
Example
ThisexamplesavesthecurrentpresentationasanHTMLversion4.0filewiththename"mallard.htm."ItthendisplaysamessageindicatingthatthecurrentnamedpresentationisbeingsavedinbothPowerPointandHTMLformats.
PrivateSubApp_PresentationSave(ByValPresAsPresentation)
WithPres.PublishObjects(1)
PresName=.SlideShowName
.SourceType=ppPublishAll
.FileName="C:\HTMLPres\mallard.htm"
.HTMLVersion=ppHTMLVersion4
MsgBox("Savingpresentation"&"'"_
&PresName&"'"&"inPowerPoint"_
&Chr(10)&Chr(13)_
&"formatandHTMLversion4.0format")
.Publish
EndWith
EndSub
![Page 2466: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2466.jpg)
ShowAll
![Page 2467: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2467.jpg)
PresentationSyncEventOccurswhenthelocalcopyofapresentationthatispartofaDocumentWorkspaceissynchronizedwiththecopyontheserver.Providesimportantstatusinformationregardingthesuccessorfailureofthesynchronizationofthepresentation.
expression.PresentationSync(Pres,SyncEventType)
expressionRequired.AnexpressionthatreturnstheApplicationobject.
PresThepresentationthatisbeingsynchronized.
SyncEventTypeAnmsoSyncEventTypevalue.Thestatusofthesynchronization.
MsoSyncEventTypecanbeoneofthefollowingmsoSyncEventTypeconstants.msoSyncEventDownloadInitiated(0)msoSyncEventDownloadSucceeded(1)msoSyncEventDownloadFailed(2)msoSyncEventUploadInitiated(3)msoSyncEventUploadSucceeded(4)msoSyncEventUploadFailed(5)msoSyncEventDownloadNoChange(6)msoSyncEventOffline(7)
![Page 2468: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2468.jpg)
Example
ThefollowingexampledisplaysamessageifthesynchronizationofapresentationinaDocumentWorkspacefails.
PrivateSubapp_PresentationSync(ByValPresAsPresentation,_
ByValSyncEventTypeAsOffice.MsoSyncEventType)
IfSyncEventType=msoSyncEventDownloadFailedOr_
SyncEventType=msoSyncEventUploadFailedThen
MsgBox"Synchronizationfailed."&_
"Pleasecontactyouradministrator,"&vbCrLf&_
"ortryagainlater."
EndIf
EndSub
![Page 2469: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2469.jpg)
SlideSelectionChangedEventThiseventoccursatdifferenttimesdependingonthecurrentview.
View DescriptionNormal,Master Occurswhentheslideintheslidepanechanges.SlideSorter Occurswhentheselectionchanges.Slide,Notes Occurswhentheslidechanges.Outline Doesnotoccur.
PrivateSubobject_SlideSelectionChanged(ByValSldRangeAsSlideRange)
objectAvariablethatreferencesanobjectoftypeApplicationdeclaredwitheventsinaclassmodule.
SldRangeTheselectionofslides.Inmostcasesthiswouldbeasingleslide(forexample,inSlideViewyounavigatetothenextslide),butinsomecasesthiscouldbemultipleslides(forexample,amarqueeselectioninSlideSorterView).
![Page 2470: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2470.jpg)
Remarks
ToaccesstheApplicationevents,declareanApplicationvariableintheGeneralDeclarationssectionofyourcode.ThensetthevariableequaltotheApplicationobjectforwhichyouwanttoaccessevents.ForinformationaboutusingeventswiththeMicrosoftPowerPointApplicationobject,seeUsingEventswiththeApplicationObject.
![Page 2471: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2471.jpg)
Example
Thisexampledisplaysamessageeverytimeauserselectsadifferentslide.ThisexampleassumesanApplicationobjectcalledPPTApphasbeendeclaredusingtheWithEventskeyword.
PrivateSubPPTApp_SlideSelectionChanged(ByValSldRangeAsSlideRange)
MsgBox"Slideselectionchanged."
EndSub
![Page 2472: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2472.jpg)
ShowAll
![Page 2473: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2473.jpg)
SlideShowBeginEventOccurswhenyoustartaslideshow.MicrosoftPowerPointcreatestheslideshowwindowandpassesittothisevent.Ifoneslideshowbranchestoanother,theSlideShowBegineventdoesnotoccuragainwhenthesecondslideshowbegins.
PrivateSubapplication_SlideShowBegin(ByValWnAsSlideShowWindow)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
WnTheslideshowwindowinitializedpriortothisevent.
![Page 2474: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2474.jpg)
Example
Thisexampleadjuststhesizeandpositionoftheslideshowwindowandthenreactivatesit.
PrivateSubApp_SlideShowBegin(ByValWnAsSlideShowWindow)
WithWn
.Height=325
.Width=400
.Left=100
.Activate
EndWith
EndSub
![Page 2475: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2475.jpg)
ShowAll
![Page 2476: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2476.jpg)
SlideShowEndEventOccursafteraslideshowends—immediatelyafterthelastSlideShowNextSlideeventoccurs.
PrivateSubapplication_SlideShowEnd(ByValPresAsPresentation)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
PresThepresentationclosedwhenthiseventoccurs.
![Page 2477: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2477.jpg)
Remarks
TheSlideShowEndeventalwaysoccursbeforeaslideshowendsiftheSlideShowBegineventhasoccurred.YoucanusetheSlideShowEndeventtoreturnanypropertysettingsandvariableinitializationsthatoccurintheSlideShowBegineventtotheiroriginalsettings.
![Page 2478: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2478.jpg)
Example
Thisexampleturnsofftheentryeffectandautomaticadvancetimingslideshowtransitioneffectsforslidesonethroughfourattheendoftheslideshow.Italsosetstheslidestoadvancemanually.
PrivateSubApp_SlideShowEnd(ByValPresAsPresentation)
WithPres.Slides.Range(Array(1,4))_
.SlideShowTransition
.EntryEffect=ppEffectNone
.AdvanceOnTime=msoFalse
EndWith
WithPres.SlideShowSettings
.AdvanceMode=ppSlideShowManualAdvance
EndWith
EndSub
![Page 2479: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2479.jpg)
ShowAll
![Page 2480: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2480.jpg)
SlideShowNextBuildEventOccursuponmouse-clickortiminganimation,butbeforetheanimatedobjectbecomesvisible.
PrivateSubapplication_SlideShowNextBuild(ByValWnAsSlideShowWindow)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
WnTheactiveslideshowwindow.
![Page 2481: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2481.jpg)
Example
Ifthecurrentshapeonslideoneisamovie,thisexampleplaysthemoviecontinuouslyuntilstoppedmanuallybythepresenter.ThiscodeisdesignedtobeusedwiththesecondSlideShowNextSlideeventexample.
PrivateSubApp_SlideShowNextBuild(ByValWnAsSlideShowWindow)
IfEvtCounter<>0Then
WithActivePresentation.Slides(1)_
.Shapes(shpAnimArray(2,EvtCounter))
If.Type=msoMediaThen
If.MediaType=ppMediaTypeMovie
.AnimationSettings.PlaySettings_
.LoopUntilStopped
EndIf
EndIf
EndWith
EndIf
EvtCounter=EvtCounter+1
EndSub
![Page 2482: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2482.jpg)
ShowAll
![Page 2483: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2483.jpg)
SlideShowNextClickEventOccursonthenextclickontheslide.
PrivateSubapplication_SlideShowNextClick(ByValWnAsSlideShowWindow,ByValnEffectAsEffect)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
WnTheslideshowwindowinitializedpriortothisevent.
nEffectTheeffecttoanimateonnextclick.
![Page 2484: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2484.jpg)
ShowAll
![Page 2485: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2485.jpg)
SlideShowNextSlideEventOccursimmediatelybeforethetransitiontothenextslide.Forthefirstslide,occursimmediatelyaftertheSlideShowBeginevent.
PrivateSubapplication_SlideShowNextSlide(ByValWnAsSlideShowWindow)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
WnTheactiveslideshowwindow.
![Page 2486: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2486.jpg)
Example
ThisexampledeterminestheslidepositionfortheslidefollowingtheSlideShowNextSlideevent.Ifthenextslideisslidethree,theexamplechangesthetypeofpointertoapenandthepencolortored.
PrivateSubApp_SlideShowNextSlide(ByValWnAsSlideShowWindow)
DimShowposAsInteger
Showpos=Wn.View.CurrentShowPosition+1
IfShowpos=3Then
WithActivePresentation.SlideShowSettings.Run.View
.PointerColor.RGB=RGB(255,0,0)
.PointerType=ppSlideShowPointerPen
EndWith
Else
WithActivePresentation.SlideShowSettings.Run.View
.PointerColor.RGB=RGB(0,0,0)
.PointerType=ppSlideShowPointerArrow
EndWith
EndIf
EndSub
Thisexamplesetsaglobalcountervariabletozero.Thenitcalculatesthenumberofshapesontheslidefollowingthisevent,determineswhichshapeshaveanimation,andfillsaglobalarraywiththeanimationorderandthenumberofeachshape.
NoteThearraycreatedinthisexampleisalsousedintheSlideShowNextBuildeventexample.
PrivateSubApp_SlideShowNextSlide(ByValWnAsSlideShowWindow)
DimiasInteger,jasInteger,numShapesAsInteger
DimobjSldAsSlide
SetobjSld=ActivePresentation.Slides_
(ActivePresentation.SlideShowWindow.View_
.CurrentShowPosition+1)
WithobjSld.Shapes
![Page 2487: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2487.jpg)
numShapes=.Count
IfnumShapes>0Then
j=1
ReDimshpAnimArray(1To2,1TonumShapes)
Fori=1TonumShapes
If.Item(i).AnimationSettings.AnimateThen
shpAnimArray(1,j)=_
.Item(i).AnimationSettings.AnimationOrder
shpAnimArray(2,j)=i
j=j+1
EndIf
Next
EndIf
EndWith
EndSub
![Page 2488: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2488.jpg)
ShowAll
![Page 2489: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2489.jpg)
WindowActivateEventOccurswhentheapplicationwindoworanydocumentwindowisactivated.
PrivateSubapplication_WindowActivate(ByValPresAsPresentation,ByValWnAsDocumentWindow)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
PresThepresentationdisplayedintheactivatedwindow.
WnTheactivateddocumentwindow.
![Page 2490: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2490.jpg)
Example
Thisexampleopenseveryactivatedpresentationinslidesorterview.
PrivateSubApp_WindowActivate_(ByValPresAsPresentation,ByValWnAsDocumentWindow)
Wn.ViewType=ppViewSlideSorter
EndSub
![Page 2491: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2491.jpg)
ShowAll
![Page 2492: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2492.jpg)
WindowBeforeDoubleClickEventOccurswhenyoudouble-clicktheitemsintheviewslistedinthefollowingtable.
View ItemNormalorslideview ShapeSlidesorterview SlideNotespageview Slideimage
Thedefaultdouble-clickactionoccursafterthiseventunlesstheCancelargumentissettoTrue.
PrivateSubapplication_WindowBeforeDoubleClick(ByValSelAsSelection,ByValCancelAsBoolean)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
SelTheselectionbelowthemousepointerwhenthedouble-clickoccurs.
CancelFalsewhentheeventoccurs.IftheeventproceduresetsthisargumenttoTrue,thedefaultdouble-clickactionisn'tperformedwhentheprocedureisfinished.
![Page 2493: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2493.jpg)
Example
Inslidesorterview,thedefaultdouble-clickeventforanyslideistochangetoslideview.Inthisexample,iftheactivepresentationisdisplayedinslidesorterview,thedefaultactionispreemptedbytheWindowBeforeDoubleClickevent.TheeventprocedurechangestheviewtonormalviewandthencancelsthechangetoslideviewbysettingtheCancelargumenttoTrue.
PrivateSubApp_WindowBeforeDoubleClick_(ByValSelAsSelection,ByValCancelAsBoolean)
WithApplication.ActiveWindow
If.ViewType=ppViewSlideSorterThen
.ViewType=ppViewNormal
Cancel=True
EndIf
EndWith
EndSub
![Page 2494: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2494.jpg)
ShowAll
![Page 2495: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2495.jpg)
WindowBeforeRightClickEventOccurswhenyouright-clickashape,aslide,anotespage,orsometext.ThiseventistriggeredbytheMouseUpevent.
PrivateSubapplication_WindowBeforeRightClick(ByValSelAsSelection,ByValCancelAsBoolean)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
SelTheselectionbelowthemousepointerwhentheright-clickoccurred.
CancelFalsewhentheeventoccurs.IftheeventproceduresetsthisargumenttoTrue,thedefaultcontextmenudoesnotappearwhentheprocedureisfinished.
![Page 2496: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2496.jpg)
Example
Thisexamplecreatesaduplicateoftheselectedshape.Iftheshapehasatextframe,itaddsthetext"DuplicateShape"tothenewshape.SettingtheCancelargumenttoTruethenpreventsthedefaultcontextmenufromappearing.
PrivateSubApp_WindowBeforeRightClick_(ByValSelAsSelection,ByValCancelAsBoolean)
WithActivePresentation.Selection.ShapeRange
If.HasTextFrameThen
.Duplicate.TextFrame.TextRange.Text="DuplicateShape"
Else
.Duplicate
EndIf
Cancel=True
EndWith
EndSub
![Page 2497: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2497.jpg)
ShowAll
![Page 2498: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2498.jpg)
WindowDeactivateEventOccurswhentheapplicationwindoworanydocumentwindowisdeactivated.
PrivateSubapplication_WindowDeactivate(ByValPresAsPresentation,ByValWnAsDocumentWindow)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
PresThepresentationdisplayedinthedeactivatedwindow.
WnThedeactivateddocumentwindow.
![Page 2499: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2499.jpg)
Example
Thisexamplefindsthefilename(withoutitsextension)forthepresentationinthewindowthatisbeingdeactivated.Itthenappendsthe.htmextensiontothefilenameandsavesitasaWebpageinthesamefolderasthepresentation.
PrivateSubApp_WindowDeactivate_(ByValPresAsPresentation,ByValWnAsDocumentWindow)
FindNum=InStr(1,Wn.Presentation.FullName,".")
IfFindNum=0Then
HTMLName=Wn.Presentation.FullName&".htm"
Else
HTMLName=Mid(Wn.Presentation.FullName,1,FindNum-1)_
&".htm"
EndIf
Wn.Presentation.SaveCopyAsHTMLName,ppSaveAsHTML
MsgBox"PresentationbeingsavedinHTMLformatas"_
&HTMLName&"."
EndSub
![Page 2500: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2500.jpg)
ShowAll
![Page 2501: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2501.jpg)
WindowSelectionChangeEventOccurswhentheselectionoftext,ashape,oraslideintheactivedocumentwindowchanges,whetherthroughtheuserinterfaceorthroughcode.
PrivateSubapplication_WindowSelectionChange(ByValSelAsSelection)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.ForinformationaboutusingeventswiththeApplicationobject,seeUsingEventswiththeApplicationObject.
SelRepresentstheobjectselected.
![Page 2502: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2502.jpg)
Example
Thisexampledetermineswhenadifferentslideisbeingselectedandchangesthebackgroundcolorofthenewlyselectedslide.
PrivateSubApp_WindowSelectionChange(ByValSelAsSelection)
WithSel
If.Type=ppSelectionNoneThen
With.SlideRange(1)
.ColorScheme.Colors(ppBackground).RGB=_
RGB(240,115,100)
EndWith
EndIf
EndWith
EndSub
![Page 2503: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2503.jpg)
ShowAll
![Page 2504: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2504.jpg)
PowerPointConstantsThistopicprovidesalistofallconstantsinthePowerPointobjectmodel.
MsoAnimAccumulate
Constant ValuemsoAnimAccumulateAlways 2msoAnimAccumulateNone 1
MsoAnimAdditive
Constant ValuemsoAnimAdditiveAddBase 1msoAnimAdditiveAddSum 2
MsoAnimAfterEffect
Constant ValuemsoAnimAfterEffectDim 1msoAnimAfterEffectHide 2msoAnimAfterEffectHideOnNextClick 3msoAnimAfterEffectMixed -1msoAnimAfterEffectNone 0
MsoAnimateByLevel
Constant ValuemsoAnimateChartAllAtOnce 7msoAnimateChartByCategory 8msoAnimateChartByCategoryElements 9msoAnimateChartBySeries 10msoAnimateChartBySeriesElements 11
![Page 2505: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2505.jpg)
msoAnimateDiagramAllAtOnce 12msoAnimateDiagramBreadthByLevel 16msoAnimateDiagramBreadthByNode 15msoAnimateDiagramClockwise 17msoAnimateDiagramClockwiseIn 18msoAnimateDiagramClockwiseOut 19msoAnimateDiagramCounterClockwise 20msoAnimateDiagramCounterClockwiseIn 21msoAnimateDiagramCounterClockwiseOut 22msoAnimateDiagramDepthByBranch 14msoAnimateDiagramDepthByNode 13msoAnimateDiagramDown 26msoAnimateDiagramInByRing 23msoAnimateDiagramOutByRing 24msoAnimateDiagramUp 25msoAnimateLevelMixed -1msoAnimateLevelNone 0msoAnimateTextByAllLevels 1msoAnimateTextByFifthLevel 6msoAnimateTextByFirstLevel 2msoAnimateTextByFourthLevel 5msoAnimateTextBySecondLevel 3msoAnimateTextByThirdLevel 4
MsoAnimCommandType
Constant ValuemsoAnimCommandTypeCall 1msoAnimCommandTypeEvent 0msoAnimCommandTypeVerb 2
MsoAnimDirection
![Page 2506: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2506.jpg)
Constant ValuemsoAnimDirectionAcross 18msoAnimDirectionBottom 11msoAnimDirectionBottomLeft 15msoAnimDirectionBottomRight 14msoAnimDirectionCenter 28msoAnimDirectionClockwise 21msoAnimDirectionCounterclockwise 22msoAnimDirectionCycleClockwise 43msoAnimDirectionCycleCounterclockwise 44msoAnimDirectionDown 3msoAnimDirectionDownLeft 9msoAnimDirectionDownRight 8msoAnimDirectionFontAllCaps 40msoAnimDirectionFontBold 35msoAnimDirectionFontItalic 36msoAnimDirectionFontShadow 39msoAnimDirectionFontStrikethrough 38msoAnimDirectionFontUnderline 37msoAnimDirectionGradual 42msoAnimDirectionHorizontal 16msoAnimDirectionHorizontalIn 23msoAnimDirectionHorizontalOut 24msoAnimDirectionIn 19msoAnimDirectionInBottom 31msoAnimDirectionInCenter 30msoAnimDirectionInSlightly 29msoAnimDirectionInstant 41msoAnimDirectionLeft 4msoAnimDirectionNone 0msoAnimDirectionOrdinalMask 5msoAnimDirectionOut 20msoAnimDirectionOutBottom 34
![Page 2507: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2507.jpg)
msoAnimDirectionOutCenter 33msoAnimDirectionOutSlightly 32msoAnimDirectionRight 2msoAnimDirectionSlightly 27msoAnimDirectionTop 10msoAnimDirectionTopLeft 12msoAnimDirectionTopRight 13msoAnimDirectionUp 1msoAnimDirectionUpLeft 6msoAnimDirectionUpRight 7msoAnimDirectionVertical 17msoAnimDirectionVerticalIn 25msoAnimDirectionVerticalOut 26
MsoAnimEffect
Constant ValuemsoAnimEffectAppear 1msoAnimEffectArcUp 47msoAnimEffectAscend 39msoAnimEffectBlast 64msoAnimEffectBlinds 3msoAnimEffectBoldFlash 63msoAnimEffectBoldReveal 65msoAnimEffectBoomerang 25msoAnimEffectBounce 26msoAnimEffectBox 4msoAnimEffectBrushOnColor 66msoAnimEffectBrushOnUnderline 67msoAnimEffectCenterRevolve 40msoAnimEffectChangeFillColor 54msoAnimEffectChangeFont 55msoAnimEffectChangeFontColor 56
![Page 2508: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2508.jpg)
msoAnimEffectChangeFontSize 57msoAnimEffectChangeFontStyle 58msoAnimEffectChangeLineColor 60msoAnimEffectCheckerboard 5msoAnimEffectCircle 6msoAnimEffectColorBlend 68msoAnimEffectColorReveal 27msoAnimEffectColorWave 69msoAnimEffectComplementaryColor 70msoAnimEffectComplementaryColor2 71msoAnimEffectContrastingColor 72msoAnimEffectCrawl 7msoAnimEffectCredits 28msoAnimEffectCustom 0msoAnimEffectDarken 73msoAnimEffectDesaturate 74msoAnimEffectDescend 42msoAnimEffectDiamond 8msoAnimEffectDissolve 9msoAnimEffectEaseIn 29msoAnimEffectExpand 50msoAnimEffectFade 10msoAnimEffectFadedSwivel 41msoAnimEffectFadedZoom 48msoAnimEffectFlashBulb 75msoAnimEffectFlashOnce 11msoAnimEffectFlicker 76msoAnimEffectFlip 51msoAnimEffectFloat 30msoAnimEffectFly 2msoAnimEffectFold 53msoAnimEffectGlide 49msoAnimEffectGrowAndTurn 31
![Page 2509: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2509.jpg)
msoAnimEffectGrowShrink 59msoAnimEffectGrowWithColor 77msoAnimEffectLighten 78msoAnimEffectLightSpeed 32msoAnimEffectMediaPause 84msoAnimEffectMediaPlay 83msoAnimEffectMediaStop 85msoAnimEffectPath4PointStar 101msoAnimEffectPath5PointStar 90msoAnimEffectPath6PointStar 96msoAnimEffectPath8PointStar 102msoAnimEffectPathArcDown 122msoAnimEffectPathArcLeft 136msoAnimEffectPathArcRight 143msoAnimEffectPathArcUp 129msoAnimEffectPathBean 116msoAnimEffectPathBounceLeft 126msoAnimEffectPathBounceRight 139msoAnimEffectPathBuzzsaw 110msoAnimEffectPathCircle 86msoAnimEffectPathCrescentMoon 91msoAnimEffectPathCurvedSquare 105msoAnimEffectPathCurvedX 106msoAnimEffectPathCurvyLeft 133msoAnimEffectPathCurvyRight 146msoAnimEffectPathCurvyStar 108msoAnimEffectPathDecayingWave 145msoAnimEffectPathDiagonalDownRight 134msoAnimEffectPathDiagonalUpRight 141msoAnimEffectPathDiamond 88msoAnimEffectPathDown 127msoAnimEffectPathEqualTriangle 98msoAnimEffectPathFigure8Four 113
![Page 2510: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2510.jpg)
msoAnimEffectPathFootball 97msoAnimEffectPathFunnel 137msoAnimEffectPathHeart 94msoAnimEffectPathHeartbeat 130msoAnimEffectPathHexagon 89msoAnimEffectPathHorizontalFigure8 111msoAnimEffectPathInvertedSquare 119msoAnimEffectPathInvertedTriangle 118msoAnimEffectPathLeft 120msoAnimEffectPathLoopdeLoop 109msoAnimEffectPathNeutron 114msoAnimEffectPathOctagon 95msoAnimEffectPathParallelogram 99msoAnimEffectPathPeanut 112msoAnimEffectPathPentagon 100msoAnimEffectPathPlus 117msoAnimEffectPathPointyStar 104msoAnimEffectPathRight 149msoAnimEffectPathRightTriangle 87msoAnimEffectPathSCurve1 144msoAnimEffectPathSCurve2 124msoAnimEffectPathSineWave 125msoAnimEffectPathSpiralLeft 140msoAnimEffectPathSpiralRight 131msoAnimEffectPathSpring 138msoAnimEffectPathSquare 92msoAnimEffectPathStairsDown 147msoAnimEffectPathSwoosh 115msoAnimEffectPathTeardrop 103msoAnimEffectPathTrapezoid 93msoAnimEffectPathTurnDown 135msoAnimEffectPathTurnRight 121msoAnimEffectPathTurnUp 128
![Page 2511: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2511.jpg)
msoAnimEffectPathTurnUpRight 142msoAnimEffectPathUp 148msoAnimEffectPathVerticalFigure8 107msoAnimEffectPathWave 132msoAnimEffectPathZigzag 123msoAnimEffectPeek 12msoAnimEffectPinwheel 33msoAnimEffectPlus 13msoAnimEffectRandomBars 14msoAnimEffectRandomEffects 24msoAnimEffectRiseUp 34msoAnimEffectShimmer 52msoAnimEffectSling 43msoAnimEffectSpin 61msoAnimEffectSpinner 44msoAnimEffectSpiral 15msoAnimEffectSplit 16msoAnimEffectStretch 17msoAnimEffectStretchy 45msoAnimEffectStrips 18msoAnimEffectStyleEmphasis 79msoAnimEffectSwish 35msoAnimEffectSwivel 19msoAnimEffectTeeter 80msoAnimEffectThinLine 36msoAnimEffectTransparency 62msoAnimEffectUnfold 37msoAnimEffectVerticalGrow 81msoAnimEffectWave 82msoAnimEffectWedge 20msoAnimEffectWheel 21msoAnimEffectWhip 38msoAnimEffectWipe 22
![Page 2512: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2512.jpg)
msoAnimEffectZip 46msoAnimEffectZoom 23
MsoAnimEffectAfter
Constant ValuemsoAnimEffectAfterFreeze 1msoAnimEffectAfterHold 3msoAnimEffectAfterRemove 2msoAnimEffectAfterTransition 4
MsoAnimEffectRestart
Constant ValuemsoAnimEffectRestartAlways 1msoAnimEffectRestartNever 3msoAnimEffectRestartWhenOff 2
MsoAnimFilterEffectSubtype
Constant ValuemsoAnimFilterEffectSubtypeAcross 9msoAnimFilterEffectSubtypeDown 25msoAnimFilterEffectSubtypeDownLeft 14msoAnimFilterEffectSubtypeDownRight 16msoAnimFilterEffectSubtypeFromBottom 13msoAnimFilterEffectSubtypeFromLeft 10msoAnimFilterEffectSubtypeFromRight 11msoAnimFilterEffectSubtypeFromTop 12msoAnimFilterEffectSubtypeHorizontal 5msoAnimFilterEffectSubtypeIn 7msoAnimFilterEffectSubtypeInHorizontal 3msoAnimFilterEffectSubtypeInVertical 1msoAnimFilterEffectSubtypeLeft 23
![Page 2513: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2513.jpg)
msoAnimFilterEffectSubtypeNone 0msoAnimFilterEffectSubtypeOut 8msoAnimFilterEffectSubtypeOutHorizontal 4msoAnimFilterEffectSubtypeOutVertical 2msoAnimFilterEffectSubtypeRight 24msoAnimFilterEffectSubtypeSpokes1 18msoAnimFilterEffectSubtypeSpokes2 19msoAnimFilterEffectSubtypeSpokes3 20msoAnimFilterEffectSubtypeSpokes4 21msoAnimFilterEffectSubtypeSpokes8 22msoAnimFilterEffectSubtypeUp 26msoAnimFilterEffectSubtypeUpLeft 15msoAnimFilterEffectSubtypeUpRight 17msoAnimFilterEffectSubtypeVertical 6
MsoAnimFilterEffectType
Constant ValuemsoAnimFilterEffectTypeBarn 1msoAnimFilterEffectTypeBlinds 2msoAnimFilterEffectTypeBox 3msoAnimFilterEffectTypeCheckerboard 4msoAnimFilterEffectTypeCircle 5msoAnimFilterEffectTypeDiamond 6msoAnimFilterEffectTypeDissolve 7msoAnimFilterEffectTypeFade 8msoAnimFilterEffectTypeImage 9msoAnimFilterEffectTypeNone 0msoAnimFilterEffectTypePixelate 10msoAnimFilterEffectTypePlus 11msoAnimFilterEffectTypeRandomBar 12msoAnimFilterEffectTypeSlide 13msoAnimFilterEffectTypeStretch 14
![Page 2514: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2514.jpg)
msoAnimFilterEffectTypeStrips 15msoAnimFilterEffectTypeWedge 16msoAnimFilterEffectTypeWheel 17msoAnimFilterEffectTypeWipe 18
MsoAnimProperty
Constant ValuemsoAnimColor 7msoAnimHeight 4msoAnimHeigth 4msoAnimNone 0msoAnimOpacity 5msoAnimRotation 6msoAnimShapeFillBackColor 1007msoAnimShapeFillColor 1005msoAnimShapeFillOn 1004msoAnimShapeFillOpacity 1006msoAnimShapeLineColor 1009msoAnimShapeLineOn 1008msoAnimShapePictureBrightness 1001msoAnimShapePictureContrast 1000msoAnimShapePictureCropFromBottom 1001msoAnimShapePictureCropFromLeft 1002msoAnimShapePictureCropFromRight 1003msoAnimShapePictureCropFromTop 1000msoAnimShapePictureGamma 1002msoAnimShapePictureGrayscale 1003msoAnimShapeShadowColor 1012msoAnimShapeShadowOffsetX 1014msoAnimShapeShadowOffsetY 1015msoAnimShapeShadowOn 1010msoAnimShapeShadowOpacity 1013
![Page 2515: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2515.jpg)
msoAnimShapeShadowType 1011msoAnimTextBulletCharacter 111msoAnimTextBulletColor 114msoAnimTextBulletFontName 112msoAnimTextBulletNumber 113msoAnimTextBulletRelativeSize 115msoAnimTextBulletStyle 116msoAnimTextBulletType 117msoAnimTextFontBold 100msoAnimTextFontColor 101msoAnimTextFontEmboss 102msoAnimTextFontItalic 103msoAnimTextFontName 104msoAnimTextFontShadow 105msoAnimTextFontSize 106msoAnimTextFontStrikeThrough 110msoAnimTextFontSubscript 107msoAnimTextFontSuperscript 108msoAnimTextFontUnderline 109msoAnimVisibility 8msoAnimWidth 3msoAnimX 1msoAnimY 2
MsoAnimTextUnitEffect
Constant ValuemsoAnimTextUnitEffectByCharacter 1msoAnimTextUnitEffectByParagraph 0msoAnimTextUnitEffectByWord 2msoAnimTextUnitEffectMixed -1
MsoAnimTriggerType
![Page 2516: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2516.jpg)
Constant ValuemsoAnimTriggerAfterPrevious 3msoAnimTriggerMixed -1msoAnimTriggerNone 0msoAnimTriggerOnPageClick 1msoAnimTriggerOnShapeClick 4msoAnimTriggerWithPrevious 2
MsoAnimType
Constant ValuemsoAnimTypeColor 2msoAnimTypeCommand 6msoAnimTypeFilter 7msoAnimTypeMixed -2msoAnimTypeMotion 1msoAnimTypeNone 0msoAnimTypeProperty 5msoAnimTypeRotation 4msoAnimTypeScale 3msoAnimTypeSet 8
PpActionType
Constant ValueppActionEndShow 6ppActionFirstSlide 3ppActionHyperlink 7ppActionLastSlide 4ppActionLastSlideViewed 5ppActionMixed -2ppActionNamedSlideShow 10ppActionNextSlide 1ppActionNone 0
![Page 2517: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2517.jpg)
ppActionOLEVerb 11ppActionPlay 12ppActionPreviousSlide 2ppActionRunMacro 8ppActionRunProgram 9
PpAdvanceMode
Constant ValueppAdvanceModeMixed -2ppAdvanceOnClick 1ppAdvanceOnTime 2
PpAfterEffect
Constant ValueppAfterEffectDim 2ppAfterEffectHide 1ppAfterEffectHideOnClick 3ppAfterEffectMixed -2ppAfterEffectNothing 0
PpAlertLevel
Constant ValueppAlertsAll 2ppAlertsNone 1
PpArrangeStyle
Constant ValueppArrangeCascade 2ppArrangeTiled 1
![Page 2518: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2518.jpg)
PpAutoSize
Constant ValueppAutoSizeMixed -2ppAutoSizeNone 0ppAutoSizeShapeToFitText 1
PpBaselineAlignment
Constant ValueppBaselineAlignBaseline 1ppBaselineAlignCenter 3ppBaselineAlignFarEast50 4ppBaselineAlignMixed -2ppBaselineAlignTop 2
PpBorderType
Constant ValueppBorderBottom 3ppBorderDiagonalDown 5ppBorderDiagonalUp 6ppBorderLeft 2ppBorderRight 4ppBorderTop 1
PpBulletType
Constant ValueppBulletMixed -2ppBulletNone 0ppBulletNumbered 2ppBulletPicture 3ppBulletUnnumbered 1
![Page 2519: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2519.jpg)
PpChangeCase
Constant ValueppCaseLower 2ppCaseSentence 1ppCaseTitle 4ppCaseToggle 5ppCaseUpper 3
PpChartUnitEffect
Constant ValueppAnimateByCategory 2ppAnimateByCategoryElements 4ppAnimateBySeries 1ppAnimateBySeriesElements 3ppAnimateChartAllAtOnce 5ppAnimateChartMixed -2
PpColorSchemeIndex
Constant ValueppAccent1 6ppAccent2 7ppAccent3 8ppBackground 1ppFill 5ppForeground 2ppNotSchemeColor 0ppSchemeColorMixed -2ppShadow 3ppTitle 4
PpDateTimeFormat
![Page 2520: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2520.jpg)
Constant ValueppDateTimeddddMMMMddyyyy 2ppDateTimedMMMMyyyy 3ppDateTimedMMMyy 5ppDateTimeFigureOut 14ppDateTimeFormatMixed -2ppDateTimeHmm 10ppDateTimehmmAMPM 12ppDateTimeHmmss 11ppDateTimehmmssAMPM 13ppDateTimeMdyy 1ppDateTimeMMddyyHmm 8ppDateTimeMMddyyhmmAMPM 9ppDateTimeMMMMdyyyy 4ppDateTimeMMMMyy 6ppDateTimeMMyy 7
PpDirection
Constant ValueppDirectionLeftToRight 1ppDirectionMixed -2ppDirectionRightToLeft 2
PpEntryEffect
Constant ValueppEffectAppear 3844ppEffectBlindsHorizontal 769ppEffectBlindsVertical 770ppEffectBoxIn 3074ppEffectBoxOut 3073ppEffectCheckerboardAcross 1025
![Page 2521: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2521.jpg)
ppEffectCheckerboardDown 1026ppEffectCircleOut 3845ppEffectCombHorizontal 3847ppEffectCombVertical 3848ppEffectCoverDown 1284ppEffectCoverLeft 1281ppEffectCoverLeftDown 1287ppEffectCoverLeftUp 1285ppEffectCoverRight 1283ppEffectCoverRightDown 1288ppEffectCoverRightUp 1286ppEffectCoverUp 1282ppEffectCrawlFromDown 3344ppEffectCrawlFromLeft 3341ppEffectCrawlFromRight 3343ppEffectCrawlFromUp 3342ppEffectCut 257ppEffectCutThroughBlack 258ppEffectDiamondOut 3846ppEffectDissolve 1537ppEffectFade 1793ppEffectFadeSmoothly 3849ppEffectFlashOnceFast 3841ppEffectFlashOnceMedium 3842ppEffectFlashOnceSlow 3843ppEffectFlyFromBottom 3332ppEffectFlyFromBottomLeft 3335ppEffectFlyFromBottomRight 3336ppEffectFlyFromLeft 3329ppEffectFlyFromRight 3331ppEffectFlyFromTop 3330ppEffectFlyFromTopLeft 3333ppEffectFlyFromTopRight 3334
![Page 2522: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2522.jpg)
ppEffectMixed -2ppEffectNewsflash 3850ppEffectNone 0ppEffectPeekFromDown 3338ppEffectPeekFromLeft 3337ppEffectPeekFromRight 3339ppEffectPeekFromUp 3340ppEffectPlusOut 3851ppEffectPushDown 3852ppEffectPushLeft 3853ppEffectPushRight 3854ppEffectPushUp 3855ppEffectRandom 513ppEffectRandomBarsHorizontal 2305ppEffectRandomBarsVertical 2306ppEffectSpiral 3357ppEffectSplitHorizontalIn 3586ppEffectSplitHorizontalOut 3585ppEffectSplitVerticalIn 3588ppEffectSplitVerticalOut 3587ppEffectStretchAcross 3351ppEffectStretchDown 3355ppEffectStretchLeft 3352ppEffectStretchRight 3354ppEffectStretchUp 3353ppEffectStripsDownLeft 2563ppEffectStripsDownRight 2564ppEffectStripsLeftDown 2567ppEffectStripsLeftUp 2565ppEffectStripsRightDown 2568ppEffectStripsRightUp 2566ppEffectStripsUpLeft 2561ppEffectStripsUpRight 2562
![Page 2523: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2523.jpg)
ppEffectSwivel 3356ppEffectUncoverDown 2052ppEffectUncoverLeft 2049ppEffectUncoverLeftDown 2055ppEffectUncoverLeftUp 2053ppEffectUncoverRight 2051ppEffectUncoverRightDown 2056ppEffectUncoverRightUp 2054ppEffectUncoverUp 2050ppEffectWedge 3856ppEffectWheel1Spoke 3857ppEffectWheel2Spokes 3858ppEffectWheel3Spokes 3859ppEffectWheel4Spokes 3860ppEffectWheel8Spokes 3861ppEffectWipeDown 2820ppEffectWipeLeft 2817ppEffectWipeRight 2819ppEffectWipeUp 2818ppEffectZoomBottom 3350ppEffectZoomCenter 3349ppEffectZoomIn 3345ppEffectZoomInSlightly 3346ppEffectZoomOut 3347ppEffectZoomOutSlightly 3348
PpFarEastLineBreakLevel
Constant ValueppFarEastLineBreakLevelCustom 3ppFarEastLineBreakLevelNormal 1ppFarEastLineBreakLevelStrict 2
![Page 2524: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2524.jpg)
PpFollowColors
Constant ValueppFollowColorsMixed -2ppFollowColorsNone 0ppFollowColorsScheme 1ppFollowColorsTextAndBackground 2
PpFrameColors
Constant ValueppFrameColorsBlackTextOnWhite 5ppFrameColorsBrowserColors 1ppFrameColorsPresentationSchemeAccentColor 3ppFrameColorsPresentationSchemeTextColor 2ppFrameColorsWhiteTextOnBlack 4
PpHTMLVersion
Constant ValueppHTMLAutodetect 4ppHTMLDual 3ppHTMLv3 1ppHTMLv4 2
PpIndentControl
Constant ValueppIndentControlMixed -2ppIndentKeepAttr 2ppIndentReplaceAttr 1
PpMediaType
![Page 2525: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2525.jpg)
Constant ValueppMediaTypeMixed -2ppMediaTypeMovie 3ppMediaTypeOther 1ppMediaTypeSound 2
PpMouseActivation
Constant ValueppMouseClick 1ppMouseOver 2
PpNumberedBulletStyle
Constant ValueppBulletAlphaLCParenBoth 8ppBulletAlphaLCParenRight 9ppBulletAlphaLCPeriod 0ppBulletAlphaUCParenBoth 10ppBulletAlphaUCParenRight 11ppBulletAlphaUCPeriod 1ppBulletArabicAbjadDash 24ppBulletArabicAlphaDash 23ppBulletArabicDBPeriod 29ppBulletArabicDBPlain 28ppBulletArabicParenBoth 12ppBulletArabicParenRight 2ppBulletArabicPeriod 3ppBulletArabicPlain 13ppBulletCircleNumDBPlain 18ppBulletCircleNumWDBlackPlain 20ppBulletCircleNumWDWhitePlain 19ppBulletHebrewAlphaDash 25ppBulletHindiAlpha1Period 40
![Page 2526: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2526.jpg)
ppBulletHindiAlphaPeriod 36ppBulletHindiNumParenRight 39ppBulletHindiNumPeriod 37ppBulletKanjiKoreanPeriod 27ppBulletKanjiKoreanPlain 26ppBulletKanjiSimpChinDBPeriod 38ppBulletRomanLCParenBoth 4ppBulletRomanLCParenRight 5ppBulletRomanLCPeriod 6ppBulletRomanUCParenBoth 14ppBulletRomanUCParenRight 15ppBulletRomanUCPeriod 7ppBulletSimpChinPeriod 17ppBulletSimpChinPlain 16ppBulletStyleMixed -2ppBulletThaiAlphaParenBoth 32ppBulletThaiAlphaParenRight 31ppBulletThaiAlphaPeriod 30ppBulletThaiNumParenBoth 35ppBulletThaiNumParenRight 34ppBulletThaiNumPeriod 33ppBulletTradChinPeriod 22ppBulletTradChinPlain 21
PpParagraphAlignment
Constant ValueppAlignCenter 2ppAlignDistribute 5ppAlignJustify 4ppAlignJustifyLow 7ppAlignLeft 1ppAlignmentMixed -2
![Page 2527: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2527.jpg)
ppAlignRight 3ppAlignThaiDistribute 6
PpPasteDataType
Constant ValueppPasteBitmap 1ppPasteDefault 0ppPasteEnhancedMetafile 2ppPasteGIF 4ppPasteHTML 8ppPasteJPG 5ppPasteMetafilePicture 3ppPasteOLEObject 10ppPastePNG 6ppPasteRTF 9ppPasteShape 11ppPasteText 7
PpPlaceholderType
Constant ValueppPlaceholderBitmap 9ppPlaceholderBody 2ppPlaceholderCenterTitle 3ppPlaceholderChart 8ppPlaceholderDate 16ppPlaceholderFooter 15ppPlaceholderHeader 14ppPlaceholderMediaClip 10ppPlaceholderMixed -2ppPlaceholderObject 7ppPlaceholderOrgChart 11ppPlaceholderSlideNumber 13
![Page 2528: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2528.jpg)
ppPlaceholderSubtitle 4ppPlaceholderTable 12ppPlaceholderTitle 1ppPlaceholderVerticalBody 6ppPlaceholderVerticalTitle 5
PpPrintColorType
Constant ValueppPrintBlackAndWhite 2ppPrintColor 1ppPrintPureBlackAndWhite 3
PpPrintHandoutOrder
Constant ValueppPrintHandoutHorizontalFirst 2ppPrintHandoutVerticalFirst 1
PpPrintOutputType
Constant ValueppPrintOutputBuildSlides 7ppPrintOutputFourSlideHandouts 8ppPrintOutputNineSlideHandouts 9ppPrintOutputNotesPages 5ppPrintOutputOneSlideHandouts 10ppPrintOutputOutline 6ppPrintOutputSixSlideHandouts 4ppPrintOutputSlides 1ppPrintOutputThreeSlideHandouts 3ppPrintOutputTwoSlideHandouts 2
PpPrintRangeType
![Page 2529: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2529.jpg)
Constant ValueppPrintAll 1ppPrintCurrent 3ppPrintNamedSlideShow 5ppPrintSelection 2ppPrintSlideRange 4
PpPublishSourceType
Constant ValueppPublishAll 1ppPublishNamedSlideShow 3ppPublishSlideRange 2
PpRevisionInfo
Constant ValueppRevisionInfoBaseline 1ppRevisionInfoMerged 2ppRevisionInfoNone 0
PpSaveAsFileType
Constant ValueppSaveAsAddIn 8ppSaveAsBMP 19ppSaveAsDefault 11ppSaveAsEMF 23ppSaveAsGIF 16ppSaveAsHTML 12ppSaveAsHTMLDual 14ppSaveAsHTMLv3 13ppSaveAsJPG 17ppSaveAsMetaFile 15
![Page 2530: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2530.jpg)
ppSaveAsPNG 18ppSaveAsPowerPoint3 4ppSaveAsPowerPoint4 3ppSaveAsPowerPoint4FarEast 10ppSaveAsPowerPoint7 2ppSaveAsPresentation 1ppSaveAsPresForReview 22ppSaveAsRTF 6ppSaveAsShow 7ppSaveAsTemplate 5ppSaveAsTIF 21ppSaveAsWebArchive 20
PpSelectionType
Constant ValueppSelectionNone 0ppSelectionShapes 2ppSelectionSlides 1ppSelectionText 3
PpSlideLayout
Constant ValueppLayoutBlank 12ppLayoutChart 8ppLayoutChartAndText 6ppLayoutClipartAndText 10ppLayoutClipArtAndVerticalText 26ppLayoutFourObjects 24ppLayoutLargeObject 15ppLayoutMediaClipAndText 18ppLayoutMixed -2ppLayoutObject 16
![Page 2531: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2531.jpg)
ppLayoutObjectAndText 14ppLayoutObjectAndTwoObjects 30ppLayoutObjectOverText 19ppLayoutOrgchart 7ppLayoutTable 4ppLayoutText 2ppLayoutTextAndChart 5ppLayoutTextAndClipart 9ppLayoutTextAndMediaClip 17ppLayoutTextAndObject 13ppLayoutTextAndTwoObjects 21ppLayoutTextOverObject 20ppLayoutTitle 1ppLayoutTitleOnly 11ppLayoutTwoColumnText 3ppLayoutTwoObjects 29ppLayoutTwoObjectsAndObject 31ppLayoutTwoObjectsAndText 22ppLayoutTwoObjectsOverText 23ppLayoutVerticalText 25ppLayoutVerticalTitleAndText 27ppLayoutVerticalTitleAndTextOverChart 28
PpSlideShowAdvanceMode
Constant ValueppSlideShowManualAdvance 1ppSlideShowRehearseNewTimings 3ppSlideShowUseSlideTimings 2
PpSlideShowPointerType
Constant ValueppSlideShowPointerAlwaysHidden 3
![Page 2532: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2532.jpg)
ppSlideShowPointerArrow 1ppSlideShowPointerAutoArrow 4ppSlideShowPointerEraser 5ppSlideShowPointerNone 0ppSlideShowPointerPen 2
PpSlideShowRangeType
Constant ValueppShowAll 1ppShowNamedSlideShow 3ppShowSlideRange 2
PpSlideShowState
Constant ValueppSlideShowBlackScreen 3ppSlideShowDone 5ppSlideShowPaused 2ppSlideShowRunning 1ppSlideShowWhiteScreen 4
PpSlideShowType
Constant ValueppShowTypeKiosk 3ppShowTypeSpeaker 1ppShowTypeWindow 2
PpSlideSizeType
Constant ValueppSlideSize35MM 4ppSlideSizeA3Paper 9
![Page 2533: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2533.jpg)
ppSlideSizeA4Paper 3ppSlideSizeB4ISOPaper 10ppSlideSizeB4JISPaper 12ppSlideSizeB5ISOPaper 11ppSlideSizeB5JISPaper 13ppSlideSizeBanner 6ppSlideSizeCustom 7ppSlideSizeHagakiCard 14ppSlideSizeLedgerPaper 8ppSlideSizeLetterPaper 2ppSlideSizeOnScreen 1ppSlideSizeOverhead 5
PpSoundEffectType
Constant ValueppSoundEffectsMixed -2ppSoundFile 2ppSoundNone 0ppSoundStopPrevious 1
PpSoundFormatType
Constant ValueppSoundFormatCDAudio 3ppSoundFormatMIDI 2ppSoundFormatMixed -2ppSoundFormatNone 0ppSoundFormatWAV 1
PpTabStopType
Constant ValueppTabStopCenter 2
![Page 2534: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2534.jpg)
ppTabStopDecimal 4ppTabStopLeft 1ppTabStopMixed -2ppTabStopRight 3
PpTextLevelEffect
Constant ValueppAnimateByAllLevels 16ppAnimateByFifthLevel 5ppAnimateByFirstLevel 1ppAnimateByFourthLevel 4ppAnimateBySecondLevel 2ppAnimateByThirdLevel 3ppAnimateLevelMixed -2ppAnimateLevelNone 0
PpTextStyleType
Constant ValueppBodyStyle 3ppDefaultStyle 1ppTitleStyle 2
PpTextUnitEffect
Constant ValueppAnimateByCharacter 2ppAnimateByParagraph 0ppAnimateByWord 1ppAnimateUnitMixed -2
PpTransitionSpeed
![Page 2535: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2535.jpg)
Constant ValueppTransitionSpeedFast 3ppTransitionSpeedMedium 2ppTransitionSpeedMixed -2ppTransitionSpeedSlow 1
PpUpdateOption
Constant ValueppUpdateOptionAutomatic 2ppUpdateOptionManual 1ppUpdateOptionMixed -2
PpViewType
Constant ValueppViewHandoutMaster 4ppViewMasterThumbnails 12ppViewNormal 9ppViewNotesMaster 5ppViewNotesPage 3ppViewOutline 6ppViewPrintPreview 10ppViewSlide 1ppViewSlideMaster 2ppViewSlideSorter 7ppViewThumbnails 11ppViewTitleMaster 8
PpWindowState
Constant ValueppWindowMaximized 3ppWindowMinimized 2
![Page 2536: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2536.jpg)
ppWindowNormal 1
![Page 2537: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2537.jpg)
ShowAll
![Page 2538: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2538.jpg)
AddingcontrolstoadocumentToaddcontrolstoadocument,displaytheControlToolbox,clickthecontrolyouwanttoadd,andthenclickonthedocument.Draganadjustmenthandleofthecontroluntilthecontrol'soutlineisthesizeandshapeyouwant.
NoteDraggingacontrol(oranumberof"grouped"controls)fromtheformbacktotheControlToolboxcreatesatemplateofthatcontrol,whichcanbereused.Thisisausefulfeatureforimplementingastandard"lookandfeel"foryourapplications.
![Page 2539: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2539.jpg)
ShowAll
![Page 2540: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2540.jpg)
SettingcontrolpropertiesYoucansetsomecontrolpropertiesatdesigntime(beforeanymacroisrunning).Indesignmode,right-clickacontrolandclickPropertiestodisplaythePropertieswindow.Propertynamesareshownintheleftcolumninthewindow,propertyvaluesintherightcolumn.Yousetapropertyvaluebyenteringthenewvaluetotherightofthepropertyname.
![Page 2541: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2541.jpg)
ShowAll
![Page 2542: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2542.jpg)
InitializingcontrolpropertiesYoucaninitializecontrolsatruntimebyusingVisualBasiccodeinamacro.Forexample,youcouldfillalistbox,settextvalues,orsetoptionbuttons.
ThefollowingexampleusestheAddItemmethodtoadddatatoalistbox.Thenitsetsthevalueofatextboxanddisplaystheform.
PrivateSubGetUserName()
WithUserForm1
.lstRegions.AddItem"North"
.lstRegions.AddItem"South"
.lstRegions.AddItem"East"
.lstRegions.AddItem"West"
.txtSalesPersonID.Text="00000"
.Show
'...
EndWith
EndSub
YoucanalsousecodeintheInitializeeventofaformtosetinitialvaluesforcontrolsontheform.AnadvantagetosettinginitialcontrolvaluesintheInitializeeventisthattheinitializationcodestayswiththeform.Youcancopytheformtoanotherproject,andwhenyouruntheShowmethodtodisplaythedialogbox,thecontrolswillbeinitialized.
PrivateSubUserForm_Initialize()
WithUserForm1
With.lstRegions
.AddItem"North"
.AddItem"South"
.AddItem"East"
.AddItem"West"
EndWith
.txtSalesPersonID.Text="00000"
EndWith
EndSub
![Page 2543: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2543.jpg)
![Page 2544: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2544.jpg)
ShowAll
![Page 2545: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2545.jpg)
ControlanddialogboxeventsAfteryouhaveaddedcontrolstoyourdialogboxordocument,youaddeventprocedurestodeterminehowthecontrolsrespondtouseractions.
UserFormsandcontrolshaveapredefinedsetofevents.Forexample,acommandbuttonhasaClickeventthatoccurswhentheuserclicksthecommandbutton,andUserFormshaveanInitializeeventthatrunswhentheformisloaded.
Towriteacontrolorformeventprocedure,openamodulebydouble-clickingtheformorcontrol,andselecttheeventfromtheProceduredrop-downlistbox.
Eventproceduresincludethenameofthecontrol.Forexample,thenameoftheClickeventprocedureforacommandbuttonnamedCommand1isCommand1_Click.
Ifyouaddcodetoaneventprocedureandthenchangethenameofthecontrol,yourcoderemainsinprocedureswiththepreviousname.
Forexample,assumeyouaddcodetotheClickeventforCommmand1andthenrenamethecontroltoCommand2.Whenyoudouble-clickCommand2,youwillnotseeanycodeintheClickeventprocedure.YouwillneedtomovecodefromCommand1_ClicktoCommand2_Click.
Tosimplifydevelopment,itisagoodpracticetonameyourcontrolsbeforewritingcode.
![Page 2546: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2546.jpg)
ShowAll
![Page 2547: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2547.jpg)
UsingcontrolvalueswhilecodeisrunningSomecontrolpropertiescanbesetandreturnedwhileVisualBasiccodeisrunning.ThefollowingexamplesetstheTextpropertyofatextboxto"Hello."
TextBox1.Text="Hello"
Thedataenteredonaformbyauserislostwhentheformisclosed.Ifyoureturnthevaluesofcontrolsonaformaftertheformhasbeenunloaded,yougettheinitialvaluesforthecontrolsratherthanthevaluestheuserentered.
Ifyouwanttosavethedataenteredonaform,youcansavetheinformationtomodule-levelvariableswhiletheformisstillrunning.Thefollowingexampledisplaysaformandsavestheformdata.
'Codeinmoduletodeclarepublicvariables
PublicstrRegionAsString
PublicintSalesPersonIDAsInteger
PublicblnCancelledAsBoolean
'Codeinform
PrivateSubcmdCancel_Click()
Module1.blnCancelled=True
UnloadMe
EndSub
PrivateSubcmdOK_Click()
'Savedata
intSalesPersonID=txtSalesPersonID.Text
strRegion=lstRegions.List(lstRegions.ListIndex)
Module1.blnCancelled=False
UnloadMe
EndSub
PrivateSubUserForm_Initialize()
Module1.blnCancelled=True
EndSub
'Codeinmoduletodisplayform
SubLaunchSalesPersonForm()
![Page 2548: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2548.jpg)
frmSalesPeople.Show
IfblnCancelled=TrueThen
MsgBox"OperationCancelled!",vbExclamation
Else
MsgBox"TheSalesperson'sIDis:"&
intSalesPersonID&_
"TheRegionis:"&strRegion
EndIf
EndSub
![Page 2549: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2549.jpg)
CreatingaUserFormTocreateacustomdialogbox,youmustcreateaUserForm.TocreateaUserForm,clickUserFormontheInsertmenuintheVisualBasicEditor.
UsethePropertieswindowtochangethename,behavior,andappearanceoftheform.Forexample,tochangethecaptiononaform,settheCaptionproperty.
![Page 2550: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2550.jpg)
ShowAll
![Page 2551: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2551.jpg)
AddingcontrolstoaUserFormToaddcontrolstoauserform,findthecontrolyouwanttoaddintheToolbox,dragthecontrolontotheform,andthendraganadjustmenthandleonthecontroluntilthecontrol'soutlineisthesizeandshapeyouwant.
NoteDraggingacontrol(oranumberof"grouped"controls)fromtheformbacktotheToolboxcreatesatemplateofthatcontrol,whichcanbereused.Thisisausefulfeatureforimplementingastandard"lookandfeel"foryourapplications.
Whenyou'veaddedcontrolstotheform,usethecommandsontheFormatmenuintheVisualBasicEditortoadjustthecontrolalignmentandspacing.
![Page 2552: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2552.jpg)
DisplayingacustomdialogboxTotestyourdialogboxintheVisualBasicEditor,clickRunSub/UserFormontheRunmenuintheVisualBasicEditor.
TodisplayadialogboxfromVisualBasic,usetheShowmethod.ThefollowingexampledisplaysthedialogboxnamedUserForm1.
PrivateSubGetUserName()
UserForm1.Show
EndSub
![Page 2553: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2553.jpg)
ShowAll
![Page 2554: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2554.jpg)
AddOLEObjectMethodCreatesanOLEobject.ReturnsaShapeobjectthatrepresentsthenewOLEobject.
expression.AddOLEObject(Left,Top,Width,Height,ClassName,FileName,DisplayAsIcon,IconFileName,IconIndex,IconLabel,Link)
expressionRequired.AnexpressionthatreturnsaShapesobject.
Left,TopOptionalFloat.Theposition(inpoints)oftheupper-leftcornerofthenewobjectrelativetotheupper-leftcorneroftheslide.Thedefaultvalueis0(zero).
Width,HeightOptionalFloat.TheinitialdimensionsoftheOLEobject,inpoints.
ClassNameOptionalString.TheOLElongclassnameortheProgIDfortheobjectthat'stobecreated.YoumustspecifyeithertheClassNameorFileNameargumentfortheobject,butnotboth.
FileNameOptionalString.Thefilefromwhichtheobjectistobecreated.Ifthepathisn'tspecified,thecurrentworkingfolderisused.YoumustspecifyeithertheClassNameorFileNameargumentfortheobject,butnotboth.
DisplayAsIconOptionalMsoTriState.DetermineswhethertheOLEobjectwillbedisplayedasanicon.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.msoTriStateMixedmsoTriStateTogglemsoTrueDisplaystheOLEobjectasanicon.
IconFileNameOptionalString.Thefilethatcontainstheicontobedisplayed.
![Page 2555: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2555.jpg)
IconIndexOptionalInteger.TheindexoftheiconwithinIconFileName.TheorderoficonsinthespecifiedfilecorrespondstotheorderinwhichtheiconsappearintheChangeIcondialogbox(accessedfromtheInsertObjectdialogboxwhentheDisplayasiconcheckboxisselected).Thefirsticoninthefilehastheindexnumber0(zero).Ifaniconwiththegivenindexnumberdoesn'texistinIconFileName,theiconwiththeindexnumber1(thesecondiconinthefile)isused.Thedefaultvalueis0(zero).
IconLabelOptionalString.Alabel(caption)tobedisplayedbeneaththeicon.
LinkOptionalMsoTriState.DetermineswhethertheOLEobjectwillbelinkedtothefilefromwhichitwascreated.IfyouspecifiedavalueforClassName,thisargumentmustbemsoFalse.
MsoTriStatecanbeoneoftheseMsoTriStateconstants.msoCTruemsoFalseDefault.MakestheOLEobjectanindependentcopyofthefile.msoTriStateMixedmsoTriStateTogglemsoTrueLinkstheOLEobjecttothefilefromwhichitwascreated.
![Page 2556: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2556.jpg)
Example
ThisexampleaddsalinkedWorddocumenttomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddOLEObjectLeft:=100,Top:=100,_
Width:=200,Height:=300,_
FileName:="c:\mydocuments\testing.doc",Link:=msoTrue
ThisexampleaddsanewMicrosoftExcelworksheettomyDocument.Theworksheetwillbedisplayedasanicon.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddOLEObjectLeft:=100,Top:=100,_
Width:=200,Height:=300,_
ClassName:="Excel.Sheet",DisplayAsIcon:=True
ThisexampleaddsacommandbuttontomyDocument.
SetmyDocument=ActivePresentation.Slides(1)
myDocument.Shapes.AddOLEObjectLeft:=100,Top:=100,_
Width:=150,Height:=50,ClassName:="Forms.CommandButton.1"
![Page 2557: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2557.jpg)
HyperlinkObjectMultipleobjects Hyperlinks
Hyperlink
Representsahyperlinkassociatedwithanon-placeholdershapeortext.YoucanuseahyperlinktojumptoanInternetorintranetsite,toanotherfile,ortoaslidewithintheactivepresentation.TheHyperlinkobjectisamemberoftheHyperlinkscollection.TheHyperlinkscollectioncontainsallthehyperlinksonaslideoramaster.
![Page 2558: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2558.jpg)
UsingtheHyperlinkObject
UsetheHyperlinkpropertytoreturnahyperlinkforashape.Ashapecanhavetwodifferenthyperlinksassignedtoit:onethat'sfollowedwhentheuserclickstheshapeduringaslideshow,andanotherthat'sfollowedwhentheuserpassesthemousepointerovertheshapeduringaslideshow.Forthehyperlinktobeactiveduringaslideshow,theActionpropertymustbesettoppActionHyperlink.Thefollowingexamplesetsthemouse-clickactionforshapethreeonslideoneintheactivepresentationtoanInternetlink.
WithActivePresentation.Slides(1).Shapes(3)_
.ActionSettings(ppMouseClick)
.Action=ppActionHyperlink
.Hyperlink.Address="http://www.microsoft.com"
EndWith
Aslidecancontainmorethanonehyperlink.Eachnon-placeholdershapecanhaveahyperlink;thetextwithinashapecanhaveitsownhyperlink;andeachindividualcharactercanhaveitsownhyperlink.UseHyperlinks(index),whereindexisthehyperlinknumber,toreturnasingleHyperlinkobject.Thefollowingexampleaddstheshapethreemouse-clickhyperlinktotheFavoritesfolder.
ActivePresentation.Slides(1).Shapes(3)_
.ActionSettings(ppMouseClick).Hyperlink.AddToFavorites
NoteWhenyouusethismethodtoaddahyperlinktotheMicrosoftInternetExplorerFavoritesfolder,aniconisaddedtotheFavoritesmenuwithoutacorrespondingname.YoumustaddthenamefromwithinInternetExplorer.
![Page 2559: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2559.jpg)
ShowAll
![Page 2560: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2560.jpg)
ReturninganObjectfromaCollectionTheItemmethodreturnsasingleobjectfromacollection.ThefollowingexamplesetsthefirstPresvariabletoaPresentationobjectthatrepresentspresentationone.
SetfirstPres=Presentations.Item(1)
TheItemmethodisthedefaultmethodformostcollections,soyoucanwritethesamestatementmoreconciselybyomittingtheItemkeyword.
SetfirstPres=Presentations(1)
Formoreinformationaboutaspecificcollection,seetheHelptopicforthatcollectionortheItemmethodforthecollection.
![Page 2561: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2561.jpg)
NamedObjects
AlthoughyoucanusuallyspecifyanintegervaluewiththeItemmethod,itmaybemoreconvenienttoreturnanobjectbyname.Manyobjectsaregivenautomaticallygeneratednameswhentheyarecreated.Forexample,thefirstslideyoucreatewillbeautomaticallynamed"Slide1."Ifthefirsttwoshapesyoucreatearearectangleandanoval,theirdefaultnameswillbe"Rectangle1"and"Oval2".Youmaywanttogiveanobjectamoremeaningfulnametomakeiteasiertorefertolater.Mostoften,thisisdonebysettingtheobject'sNameproperty.Thefollowingexamplesetsameaningfulnameforaslideasitisadded.Thenamecanthenbeusedinsteadoftheindexnumbertorefertotheslide.
ActivePresentation.Slides.Add(1,1).Name="HomePageSlide"
WithActivePresentation.Slides("HomePageSlide")
.FollowMasterBackground=False
.Background.Fill.PresetGradient_
msoGradientDiagonalDown,1,msoGradientBrass
EndWith
PredefinedIndexValues
Somecollectionshavepredefinedindexvaluesyoucanusetoreturnsingleobjects.Eachpredefinedindexvalueisrepresentedbyaconstant.Forexample,youspecifyaPpTextStyleTypeconstantwiththeItemmethodoftheTextStylescollectiontoreturnasingletextstyle.
Thefollowingexamplesetsthemarginsforthebodyareaonslidesintheactivepresentation.
WithActivePresentation.SlideMaster_
.TextStyles(ppBodyStyle).TextFrame
.MarginBottom=50
.MarginLeft=50
.MarginRight=50
.MarginTop=50
EndWith
![Page 2562: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2562.jpg)
![Page 2563: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2563.jpg)
ScaleEffectObjectAnimationBehavior ScaleEffect
RepresentsascalingeffectforanAnimationBehaviorobject.
![Page 2564: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2564.jpg)
UsingtheScaleEffectobject
UsetheScaleEffectpropertyoftheAnimationBehaviorobjecttoreturnaScaleEffectobject.Thefollowingexamplereferstothescaleeffectforagivenanimationbehavior.
ActivePresentation.Slides(1).TimeLine.MainSequence.Item.Behaviors(1).ScaleEffect
UsetheByX,ByY,FromX,FromY,ToX,andToYpropertiesoftheScaleEffectobjecttomanipulateanobject'sscale.Thisexamplescalesthefirstshapeonthefirstslidestartingatzeroincreasinginsizeuntilitreaches100percentofitsoriginalsize.Thisexampleassumesthatthereisashapeonthefirstslide.
SubChangeScale()
DimshpFirstAsShape
DimeffNewAsEffect
DimaniScaleAsAnimationBehavior
SetshpFirst=ActivePresentation.Slides(1).Shapes(1)
SeteffNew=ActivePresentation.Slides(1).TimeLine.MainSequence_
.AddEffect(Shape:=shpFirst,effectId:=msoAnimEffectCustom)
SetaniScale=effNew.Behaviors.Add(msoAnimTypeScale)
WithaniScale.ScaleEffect
'Startingsize
.FromX=0
.FromY=0
'Sizeafterscaleeffect
.ToX=100
.ToY=100
EndWith
EndSub
![Page 2565: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2565.jpg)
![Page 2566: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2566.jpg)
HyperlinksCollectionObjectMultipleobjects Hyperlinks
Hyperlink
AcollectionofalltheHyperlinkobjectsonaslideormaster.
![Page 2567: Microsoft Office PowerPoint 2003 Visual Basic ReferenceIn Visual Basic, there are two ways to apply properties and methods to a set of shapes. These two ways allow you to perform any](https://reader033.fdocuments.us/reader033/viewer/2022041916/5e69ce2ae77d1a543f0688ca/html5/thumbnails/2567.jpg)
UsingtheHyperlinksCollection
UsetheHyperlinkspropertytoreturntheHyperlinkscollection.Thefollowingexampleupdatesallhyperlinksonslideoneintheactivepresentationthathavethespecifiedaddress.
ForEachhlInActivePresentation.Slides(1).Hyperlinks
Ifhl.Address="c:\currentwork\sales.ppt"Then
hl.Address="c:\new\newsales.ppt"
EndIf
Next
UsetheHyperlinkpropertytocreateahyperlinkandaddittotheHyperlinkscollection.Thefollowingexamplesetsahyperlinkthatwillbefollowedwhentheuserclicksshapethreeonslideoneintheactivepresentationduringaslideshowandaddsthenewhyperlinktothecollection.Notethatifshapethreealreadyhasamouse-clickhyperlinkdefined,thefollowingexamplewilldeletethishyperlinkfromthecollectionwhenitaddsthenewone,sothenumberofitemsintheHyperlinkscollectionwon'tchange.
WithActivePresentation.Slides(1).Shapes(3)_
.ActionSettings(ppMouseClick)
.Action=ppActionHyperlink
.Hyperlink.Address="http://www.microsoft.com"
EndWith