Here's the Code in Full

  • Thread starter Thread starter Michael E Phillps
  • Start date Start date
M

Michael E Phillps

Scott and Ken

Thank you gentlemen close I think.
Set the breakpoints and tried to run the code. Here I will insert the whole
command button:

___________________________________________
L1 Privat Sub Command102_Click()
L2 On Error Goto Err_Command102_Click

L3 Dim objWord As Object
L4 ' Open Microsoft Word using automation
L5 Set objWord = CreateObject ("Word.Application")

L6 objWord.Documents.Add "C:\Templates\Doc1.dot"
L7 objWord.Visible = True

L8 Exit_Command102_Click:
L9 Exit Sub

L10 Err_Command102_Click:
L11 MsgBox Err.Description
L12 Resume Exit_Command102_Click
_________________________________________________________

The L's are line markers.
Stepping through it goes as follows
L1, L2,L5, Then jumps to L11 then I get the error "ActiveX component can't
create object"

That's it, I hope I've been clear enough
Once again thanks guys, will wait and see what you think.

Mike
 
Back
Top