I lang tid har samarbejdsbranchen fokuseret på at forbedre enhedsfunktioner – bedre kameraer, klarere lyd og smartere software. Men den virkelige forvandling handler ikke om funktioner.
Dim oApp As PowerPoint.Application Dim oPres As PowerPoint.Presentation Dim oSlide As PowerPoint.Slide Dim bAssistantOn As Boolean
'Start Powerpoint and make its window visible but minimized. oApp = New PowerPoint.Application oApp.Visible = True oApp.WindowState = PowerPoint.PpWindowState.ppWindowMinimized
'Create a new presentation based on the specified template. oPres = oApp.Presentations.Open(sTemplate, , , True)
'Build Slide #1: 'Add text to the slide, change the font and insert/position a 'picture on the first slide. Dim i As Integer
For i = 1 To 10 oSlide = oPres.Slides.Add(i, PowerPoint.PpSlideLayout.ppLayoutTitleOnly) With oSlide.Shapes.Item(1).TextFrame.TextRange .Text = "Side " & i.ToString .Font.Name = "Comic Sans MS" .Font.Size = 48 End With oSlide.Shapes.AddPicture(sPic, False, True, 150, 150, 500, 350)
Next oSlide = Nothing
'Modify the slide show transition settings for all 3 slides in 'the presentation. Dim slideidx(10) As Integer
For i = 1 To 10 slideidx(i) = i Next
With oPres.Slides.Range(slideidx).SlideShowTransition .AdvanceOnTime = False .EntryEffect = PowerPoint.PpEntryEffect.ppEffectBoxOut End With
Dim oSettings As PowerPoint.SlideShowSettings oSettings = oPres.SlideShowSettings oSettings.StartingSlide = 1 oSettings.EndingSlide = 10
'Close the presentation without saving changes and quit PowerPoint. oPres.Export("C:\temp.ppt", "PPT", , ) oPres.Saved = True oPres.Close() oPres = Nothing oApp.Quit() oApp = Nothing GC.Collect()
Relativt simpelt når man ved hvordan ;-)
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.