Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / VS Tools for Office / March 2008

Tip: Looking for answers? Try searching our database.

VSTO 2008  Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim@aol.com - 03 Mar 2008 12:35 GMT
In VB 2008 the following code

Dim ActWinSlideRange As
Microsoft.Office.Interop.PowerPoint.ActiveWindow.Selection.SlideRange

generates an error

Error    1    Type
'Microsoft.Office.Interop.PowerPoint.ActiveWindow.Selection.SlideRange'
is not defined.   

How come if it worked in VB 2005
McLean Schofield [MSFT] - 03 Mar 2008 23:06 GMT
Strange, it looks to me like this code shouldn't work in any VB project that
automates PowerPoint, regardless of the version of Visual Studio being used.
There is no class called "ActiveWindow" in the
Microsoft.Office.Interop.PowerPoint namespace. However, there is an
Application.ActiveWindow property.

I think the following code accomplishes what you are really trying to do.
This code works for me in a PowerPoint add-in created in Visual Studio 2008:

       Dim ActWinSlideRange As
Microsoft.Office.Interop.PowerPoint.SlideRange = _
           Me.Application.ActiveWindow.Selection.SlideRange

I hope this helps,
McLean Schofield

> In VB 2008 the following code
>
[quoted text clipped - 8 lines]
>
> How come if it worked in VB 2005

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.