Страницы: 1
RSS
Error 430 при вызове Power Point из Excel через VBA
 
Уважаемые!  
Помогите пожалуйста разобраться  
По кнопке вызывается код:  
 
Private Sub CommandButton1_Click()  
Dim objPPoint As New PowerPoint.application  
Dim .........  
Dim .........  
Dim .........  
   
objPPoint.Visible = True  ЗДЕСЬ ВОЗНИКАЕТ ОШИБКА 403  
objPPoint.WindowState = ppWindowMaximized  
Set objPres = objPPoint.Presentations.Open(.............  
 
Class doesn't support Automation (Error 430)    
 
Not all objects expose an Automation interface. This error has the following cause and solution:  
 
 
The class you specified in the GetObject or CreateObject function call was found, but has not exposed a programmability interface.    
You can't write code to control an object's behavior unless it has been exposed for Automation. Check the documentation of the application that created the object for limitations on the use of Automation with this class of object.  
 
You changed a project from .dll to .exe, or vice versa. If, for example, you have a .dll server already compiled and registered, and then you change the project type to .exe and recompile it, the fact that the .dll and .exe are already registered on your system prevents you from creating either object. You must manually unregister the old .dll or .exe to avoid the problem.    
This is caused by the combination of project compatibility and changing a project from an .exe to a .dll. In project compatibility, the CLSID is preserved, but not the IID. Since the CLSID is preserved, the class ends up being registered with two servers — one an in-process server, the other a local server. When an instance is created, the in-process one is chosen. When the querying of the interface occurs, the .dll does not support the IID because it's new.  
 
Все в Офисе 2010.  
На некоторых ПК все работает как надо, а на нескольких представленная ситуация  
Безопасность в Power Point и Excel поставил в минимальное положение.  
 
Помогите пожалуйста!!!
 
Извините, не представился
 
Мож там билиотека в референсах не подключена. Попробуйте так:  
Private Sub CommandButton1_Click()  
Dim objPPoint As Object    
Set objPPoint = CreateObject("Powerpoint.Application")  
objPPoint.ActiveWindow.Visible = -1 'ЗДЕСЬ ВОЗНИКАЕТ ОШИБКА 403  
objPPoint.ActiveWindow.WindowState = 0
Я сам - дурнее всякого примера! ...
 
Для Power Point:  
objPPoint.ActiveWindow.WindowState = 3
Я сам - дурнее всякого примера! ...
 
{quote}{login=KukLP}{date=16.09.2011 01:11}{thema=}{post}Для Power Point:  
objPPoint.ActiveWindow.WindowState = 3{/post}{/quote}  
 
Да, такой вариант начал проходить.  
Но почему мой первоначальный вариант затыкается?  
И библиотеки подключены, и защита офиса убрана ....  
Может быть это уже блокировки Винды (XP) ?
Страницы: 1
Читают тему
Наверх