473,320 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

PowerPoint Automation from VB.net

Hello,
I'm trying to automate PP creation from VB.net. The initial code is
(as extracted from MSDN's KB209960):

Public Sub Command1_Click()
' Start PowerPoint.
Dim ppApp As PowerPoint.Application
ppApp = CreateObject("Powerpoint.Application")

' Make it visible.
ppApp.Visible = True

' Add a new presentation.
Dim ppPres As PowerPoint.Presentation
ppPres = ppApp.Presentations.Add(Microsoft.Office.Core.MsoT riState.msoTrue)

' Add a new slide.
Dim ppSlide1 As PowerPoint.Slide
ppSlide1 = ppPres.Slides.Add(1,
PowerPoint.PpSlideLayout.ppLayoutText)

' Add some text.
ppSlide1.Shapes(1).TextFrame.TextRange.Text = "My first slide"
....

The problem I have is that last line generates the following
compilation error:
"C:\temp\GeneratePP.vb(43): Interface 'PowerPoint.Shapes' cannot be
indexed because it has no default property.

Any hint?
Thanks,
careta
Nov 22 '05 #1
0 739

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: careta | last post by:
Hello, I'm trying to automate PP creation from VB.net. The initial code is (as extracted from MSDN's KB209960): Public Sub Command1_Click() ' Start PowerPoint. Dim ppApp As...
0
by: Ata | last post by:
Hello, I am trying to copy the contents of the output of SQL Reporting Services to a PowerPoint slide. For this, I am using SQL Reporting Services to obtain an IMAGE stream, which I paste to the...
6
by: Colleyville Alan | last post by:
I have an application that has an Access table that stores the locations of slides in a Powerpoint file. This used to work fine when there were about 4 files and 200 slides. The database would...
8
by: Rut | last post by:
Does anyone know how to start powerpoint from vb.net without the ppt screen appearing. I want to keep it hidden? Using this code: Try pp = New PowerPoint.Application pp.Visible =...
2
by: jack | last post by:
Hello, I would like to take a PowerPoint file and make JPGs or GIFs out of each slide. How can I do this in VB.NET. Thanks for any help, Jack
0
by: waheed iqbal | last post by:
I am using PowerPoint Automation with late binding i.e i m using CreateObject("PowerPoint.Application"). But im unable to register Events Of powerpoint with LateBinding. if i try to register any...
6
by: Stan SR | last post by:
Hi, How to generate a powerpoint document using asp.net ? The best would be to merge a ppt template with datas that I generate Thanks for your help. Stan
1
by: bsg92150 | last post by:
i have a task that requires me to provide a web use with the ability to send teh current page to a power point slide. and to further complicate matters. the user may want to put the whole site...
6
by: BWPanda | last post by:
Hi everyone, I'm wanting to use VB.NET to display a powerpoint presentation, much the same way as the presenter that comes with PowerPoint (when used on multiple monitors). Basically, I want to...
4
by: HibernatingBear | last post by:
Hello, I've been driving myself nuts trying to find a solution to this. I'm still a relative newbie to C#, and would be grateful for any helpful suggestions. I'm trying to find a way to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.