Answered by:
Controlling Powerpoint's first slide and last slide using C#

Question
-
Hello! Good day!
I want to control Powerpoint using C#. I'd like to ask if how are you going to code in which a certain button will eventually move your Ppt. to the first slide, and another button that will move your Ppt. to the last or buttom slide of the presentation?
I am using Powerpoint 2007.
Thank you so much for the help.- Moved by Cindy Meister MVP Sunday, February 3, 2013 7:52 AM not using VSTO technology
Tuesday, January 29, 2013 6:08 AM
Answers
-
Application.ActivePresentation.Slides[1].Select;
Application.ActivePresentation.Slides[Application.ActivePresentation.Slides.Count].Select;
Cindy Meister, VSTO/Word MVP, my blog
- Proposed as answer by Quist Zhang Tuesday, February 5, 2013 8:58 AM
- Marked as answer by 许阳(无锡) Wednesday, February 6, 2013 6:01 AM
Sunday, February 3, 2013 7:52 AM
All replies
-
Hi kelbee18,
Thanks for posting in the MSDN Forum.
I would recommend you clarify your goal more detailed. Where do you want to put your button? Is it on PowerPoint's ribbon or on the slide.
Have a good day,
Tom
Tom Xu [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.Wednesday, January 30, 2013 7:20 AM -
Hello!
Thank you for replying.
I would like to build a UI. The buttons will be placed in UI. The scenario is this, I have a handtracking code which is image processing using C# in Visual Studio 2012, however, I do not know how to link my handtracking code to the PowerPoint, such that if I move my hand to the right (as seen on the camera), the slide will go to the next slide, otherwise to the previous slide, and also if I move my hand upwards the slide will move to the first slide, otherwise to the last slide.
Thank you so much for the help, Sir Tom.Wednesday, January 30, 2013 8:44 AM -
Good day!
Even the command for the last and first slides please. Just these two, 'cause I just have found he next and previous slide codes in c#.Thank you again!
Saturday, February 2, 2013 3:09 PM -
Application.ActivePresentation.Slides[1].Select;
Application.ActivePresentation.Slides[Application.ActivePresentation.Slides.Count].Select;
Cindy Meister, VSTO/Word MVP, my blog
- Proposed as answer by Quist Zhang Tuesday, February 5, 2013 8:58 AM
- Marked as answer by 许阳(无锡) Wednesday, February 6, 2013 6:01 AM
Sunday, February 3, 2013 7:52 AM -
Thank you for the answer!Sunday, February 3, 2013 12:03 PM