473,695 Members | 2,577 Online
Bytes | Software Development & Data Engineering Community
+ 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 10205
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.Offic e.Interop.Power Point

Dim present As New Application

present.Activat e()

present.SlideSh owWindows(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***@Comporiu m.org> wrote in message
news:B8******** *************** ***********@mic rosoft.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. SlideShowWindow s 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(s Location)
Dim present As New PowerPoint.Appl ication
Dim oPres as PowerPoint.Pres entation
' I don't know why, but I had to dimension a variable (oPres) as
PowerPoint.Pres entation inorder to get the next line to work....

present.Present ations.Item(1). Slides.FindBySl ideID(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.Offic e.Interop.Power Point

Dim present As New Application

present.Activat e()

present.SlideSh owWindows(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***@Comporiu m.org> wrote in message
news:B8******** *************** ***********@mic rosoft.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
1635
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 PowerPoint.Application ppApp = CreateObject("Powerpoint.Application") ' Make it visible.
0
568
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 Windows clipboard. Then, using automation, I am trying to copy this information from the clipboard to a PowerPoint slide. However, I get an error at slide.Shapes.PasteSpecial. I am able create a System.Drawing.Bitmap object from the memory...
2
668
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 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. ...
0
2017
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 computer, instate of a blank page. Also i want to controle the presentation with a mouse click(or both). Now it's changing a slide after 5 sec. if i press the mouse button nothing hapens. thank you for helping me.... :) here is the code:
1
2177
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 excel file has links to other excel files within it. When my program reaches this slide, it opens the powerpoint slide, then opens the excel file, then it prompts the user to select whether or not they want to update the links within excel. ...
1
4036
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 to the PC and Powerpoint changes to the corresponding slide. For example: 01n - Go to slide 1 05n - Go to slide 5 02n - Go to slide 2, etc I have managed to get a VBscript macro going in Powerpoint. Once the show begins I click a button to...
1
2279
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 into a slide. the problem is that the information is database driven and the user may not have visted the pages tha/ thankst he is requestion to download. my question is is this possable and is there an example out there that i can look at
3
8111
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 professional applications. First, you'll need to prepare the PowerPoint files. Make sure you are not using any complicated gradients or animations. These will be interpreted poorly when they are brought into Flash. Also, make sure there are no objects that...
2
6414
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 net. It copies the data in each chart/datasheet and slide in powerpoint but I'm struggling with the bit to get the data into excel. Below it I've tried incoporating some code to paste into excel but it does not seem to work. Hope someone can...
0
8559
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9112
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8975
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8826
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6487
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5832
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4338
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2261
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1971
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.