473,473 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Open Powerpoint Slide from a WinForm

I have a VB.Net application and a PowerPoint presentation explaining how each
form in the application works, etc.. I would like to select and display the
slide appropriate for each form by pressing the F1 key. In other words, I
want to use the powerpoint presentation for my help system. I am calling the
SlideShow from the applications menu, and it works great; however, the same
techniques are not working for selecting individual slides.

How do I initialize the PowerPoint application and call an individual slide
from it from each Windows Form? The documentation for PowerPoint is not
adequate for my needs. Products: VB.Net 2..3 (1.1) and Powerpoint 2000
(v.9) Thanks. --
Will
Jul 21 '05 #1
2 10168
First you'll need to add a COM reference to the powerpoint library (unless
you already have the Presentation done and you want to Process.Start it)
Add this
Imports Microsoft.Office.Interop.PowerPoint

Dim present As New Application

present.Activate()

present.SlideShowWindows(Index:=1).View.Next()

The object model is pretty straightforward - if you're going to create new
slides you'll have to do that programatically - just record a macro if you
don't know the object model and that'll give you a good feel for what you
need to do.

HTH,

Bill
--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"WillRead" <wr***@Comporium.org> wrote in message
news:B8**********************************@microsof t.com...
I have a VB.Net application and a PowerPoint presentation explaining how each form in the application works, etc.. I would like to select and display the slide appropriate for each form by pressing the F1 key. In other words, I
want to use the powerpoint presentation for my help system. I am calling the SlideShow from the applications menu, and it works great; however, the same techniques are not working for selecting individual slides.

How do I initialize the PowerPoint application and call an individual slide from it from each Windows Form? The documentation for PowerPoint is not
adequate for my needs. Products: VB.Net 2..3 (1.1) and Powerpoint 2000 (v.9) Thanks. --
Will

Jul 21 '05 #2
Bill,

Thanks. The code below did not work. SlideShowWindows seems to think that it
is an array and wants to have an initial value set. However...

you did nudge me in what I assume is the right direction. Here is what I got
to work -- al least in displaying a particular slide.

Private Sub FindSlide(ByVal n as Int16)

Const sLocation = <my location>

Process.Start(sLocation)
Dim present As New PowerPoint.Application
Dim oPres as PowerPoint.Presentation
' I don't know why, but I had to dimension a variable (oPres) as
PowerPoint.Presentation inorder to get the next line to work....

present.Presentations.Item(1).Slides.FindBySlideID (n).Select()

End Sub

Now, the fun part is that Slide # 1 = SlideID 256 (not 0 or 1), Slide #2 =
SlideID 257, Slide #3 = SlideID 265, Slide #4 = 258, etc. In short, they are
not in consecutive order at all. This is going to make it interesting and a
lot of fun assigning the SlideID values for over 200 forms and slides.

I would appreciate any explanation(s) you can give for any of the above.

Thanks,

You have helped.

Will

"W.G. Ryan eMVP" wrote:
First you'll need to add a COM reference to the powerpoint library (unless
you already have the Presentation done and you want to Process.Start it)
Add this
Imports Microsoft.Office.Interop.PowerPoint

Dim present As New Application

present.Activate()

present.SlideShowWindows(Index:=1).View.Next()

The object model is pretty straightforward - if you're going to create new
slides you'll have to do that programatically - just record a macro if you
don't know the object model and that'll give you a good feel for what you
need to do.

HTH,

Bill
--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"WillRead" <wr***@Comporium.org> wrote in message
news:B8**********************************@microsof t.com...
I have a VB.Net application and a PowerPoint presentation explaining how

each
form in the application works, etc.. I would like to select and display

the
slide appropriate for each form by pressing the F1 key. In other words, I
want to use the powerpoint presentation for my help system. I am calling

the
SlideShow from the applications menu, and it works great; however, the

same
techniques are not working for selecting individual slides.

How do I initialize the PowerPoint application and call an individual

slide
from it from each Windows Form? The documentation for PowerPoint is not
adequate for my needs. Products: VB.Net 2..3 (1.1) and Powerpoint

2000
(v.9) Thanks. --
Will


Jul 21 '05 #3

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...
2
by: WillRead | last post by:
I have a VB.Net application and a PowerPoint presentation explaining how each form in the application works, etc.. I would like to select and display the slide appropriate for each form by pressing...
0
by: milkyman | last post by:
Hi there, I hope you can help me. I did download some code, from the Microsoft knolidgebase(MSDN), and it's great. I just don't know how to change the code so that it uses a template, thats on my...
1
by: psuaudi | last post by:
I’m using a vb.net app that opens a powerpoint presentation and calls the updatelinks function of powerpoint. One slide in the presentation is linked to a cell range in an excel file, and the...
1
by: EmmettBrown | last post by:
Hello, Just wondering if anyone can advise. I am trying to remotely control Powerpoint using a microprocessor. I am using RS232 (COM1). The idea is that the microprocessor sends ASCII strings...
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...
3
by: WPeterson | last post by:
Converting PowerPoint to Flash would absolutely be a good choice to distribute your bulky PowerPoint presentations. You can do the whole PowerPoint to Flash conversion manually or with...
2
by: LucasLondon | last post by:
Hi, I'm trying to use VBA to extract underlying data from charts in powerpoint to excel, i.e from the underlying powerpoint datasheet that feeds the chart. I've found the macro below on the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.