Word 2007 (on Vista) crashes when using CreateObject in VBA

T

Tim

Can anyone help with this? I think it may be the config of my laptop,
but don't know what specifically.

I'm trying to open an app in VBA using CreateObject but Word crashes
every time with a 'Microsoft Office Word has stopped working' message.
Sample code here:-

Sub excelcalltest()
Dim objExcel
On Error GoTo Err
Set objExcel = CreateObject("Excel.Application") - it crashes once it
gets to this line
objExcel.Visible = True
Err:
MsgBox Err.description
End Sub

I'm not a programmer but know basics. I don't need anything ticked in
Tools/References do I? Could it be permissions in some way?

Cheers

Tim
 
T

Tim

Further info on this:-

Seems the problem relates to late binding in Word 2007, as the early
and late binding version of this script work in Outlook VBA

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top