powerpoint-2010

VBA Powerpoint 2010 replacing text in Headers and Footers

£可爱£侵袭症+ 提交于 2019-12-08 07:35:40
问题 Having a challenge replacing a [DOCID#] code in the header/footer of a PowerPoint template. I notice within the PowerPoint object browser that headers and footers are found in a number of parts of a Presentation (SlideMaster, NotesMaster, HandoutMaster, TitleMaster, and then each individual Slide). I'm running the code from in XL, and have Dim'ed with references to the PowerPoint Library. Set ppPres = ppApp.Presentations.Open(sTemplate) Set ppMaster = ppPres.SlideMaster With ppMaster

VBA Powerpoint 2010 replacing text in Headers and Footers

丶灬走出姿态 提交于 2019-12-06 15:28:51
Having a challenge replacing a [DOCID#] code in the header/footer of a PowerPoint template. I notice within the PowerPoint object browser that headers and footers are found in a number of parts of a Presentation (SlideMaster, NotesMaster, HandoutMaster, TitleMaster, and then each individual Slide). I'm running the code from in XL, and have Dim'ed with references to the PowerPoint Library. Set ppPres = ppApp.Presentations.Open(sTemplate) Set ppMaster = ppPres.SlideMaster With ppMaster.HeadersFooters .Footer.Text = Replace(.Footer.Text, "[DOCID#]", sDocID) End With If ppPres.HasNotesMaster Then

Create a new slide in VBA for PowerPoint 2010 with custom layout using Master

丶灬走出姿态 提交于 2019-12-03 15:58:59
I have the following VBA code to create a new PowerPoint slide: longSlideCount = ActivePresentation.Slides.Count With ActivePresentation.Slides Set slideObject = .Add(longSlideCount + 1, ppLayoutTitle) End With ...which inserts a new slide of type 'ppLayoutTitle', but I am wondering if it is possible to create a custom layout in the 'Slide Master View' and then insert that particular slide template into the presentation? Thanks in advance!!! All your custom layouts can be accessed via VBA through the CustomLayouts collection of the SlideMaster property of a Presentation object. When you create

How to populate an array from text file in Visual Basic for PowerPoint 2010

六月ゝ 毕业季﹏ 提交于 2019-11-28 13:06:08
I'd like to define an array like: sample_array = Array( _ "foo", _ "bar", _ ... "dog", _ "cat" _ ) ...in a macro written in VB for Applications (PowerPoint 2010 in this case), but I need to define the array from a text file that would just be formatted like: foo bar ... dog cat What is the simplest way to define a text file path and read the values (assume they are always regular ascii strings) directly into an array? Thanks! Dim arr() as String dim i as Integer i=0 Open "c:\test.txt" For Input As #1 ' Open file for input. Do While Not EOF(1) ' Loop until end of file. Line Input #1, arr(i) '

How to populate an array from text file in Visual Basic for PowerPoint 2010

杀马特。学长 韩版系。学妹 提交于 2019-11-27 07:24:55
问题 I'd like to define an array like: sample_array = Array( _ "foo", _ "bar", _ ... "dog", _ "cat" _ ) ...in a macro written in VB for Applications (PowerPoint 2010 in this case), but I need to define the array from a text file that would just be formatted like: foo bar ... dog cat What is the simplest way to define a text file path and read the values (assume they are always regular ascii strings) directly into an array? Thanks! 回答1: Dim arr() as String dim i as Integer i=0 Open "c:\test.txt"