Home > Software engineering >  100 points for VB6 why cannot use PowerPoint2010 object open the document?
100 points for VB6 why cannot use PowerPoint2010 object open the document?

Time:10-09

Why can't use VB6 PowerPoint2010 object open the document?

The Set oPPTApp=CreateObject (" PowerPoint. Application ")
The Set oPPTPres=oPPTApp. Presentations. Open (FileName,,, False)

I am using the above two sentences code to create the
Originally on office2003 running very smooth
But then on the other computer office2010 is washed-up, run slowly
Especially on the slide, if there are some other actions, such as clicking fly out an answer
Is very slow, don't know why
Hope everybody to help me, if to solve the problem, an extra 100 points again

CodePudding user response:

I hope everybody help me

Online, etc...

CodePudding user response:

You should see the computer run directly PPT is very slow

CodePudding user response:

No, not at slow

Directly run smoothly

CodePudding user response:

The Set oPPTApp=CreateObject (" PowerPoint. Application ")

Closed oPPTApp object?
If you don't shut down, repeat many times oPPTApp is very slow,
Accounts for 2010 very memory drops,

CodePudding user response:

Where is closed?
How close?
In the Set oPPTApp=CreateObject (" PowerPoint. Application ")
Shut down below?

The Set oPPTApp=Nothing

Like this?




CodePudding user response:

Use early binding, don't be late binding:
 'I was using a PowerPoint 2003, the first reference PowerPoint object library: 
Option Explicit
Dim PowerPoint As PowerPoint. Application

Private Sub Command1_Click ()
On Error GoTo Errhandler
CommonDialog1. Filter="PowerPoint (*. Pot) | *. Pot | AllFile (*. *) | *. *", "
CommonDialog1. FilterIndex=1
CommonDialog1. ShowOpen
The Set PowerPoint=New PowerPoint. Application
PowerPoint. Presentations. The Open CommonDialog1. The FileName,,, msoFalse

Application. The Visible=True
'PowerPoint. Visible=True
'Application. DisplayAlerts=False don't save that

Errhandler:

End Sub

Private Sub Form_Unload (Cancel As Integer)
PowerPoint. Quit
The Set of PowerPoint=Nothing
End Sub

CodePudding user response:

What call early binding?
Which sentence is early binding code?
I'll give you points to clarify

CodePudding user response:

refer to 7th floor ok100fen response:
what call early binding?
Which sentence is early binding code?
Define that can give you points

1, early binding is the first reference PowerPoint object library;
2, late binding is directly defined object: Set oPPTApp=CreateObject (" PowerPoint. Application "), no reference object library,

CodePudding user response:

Mr, friends mean by
Dim powerpoint as powerpoint. Application to replace
Creatobject () this sentence?

CodePudding user response:

Just use computer
Use the computer now

Changed once, using the method of you in office2010 or very card
Dim oPPTApp As PowerPoint. Application
Don't know how to solve the

Trouble master help

CodePudding user response:

The up



CodePudding user response:

On two computers (2010201 3) check the PowerPoint. The Application is called this name,

  • Related