Open Form in Word

  • 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
 
So you did not post the actual code, in the first place!

This is probably what you need:
http://support.microsoft.com/?kbid=244264

Michael, not to beat up on you further, but - the best way to get advice is
to stay within the original thread. In your newsreader, go to the post that
you want to reply to, then click "Reply to group" (or whatever it is in your
newsreader). Do not click "Post new message" (or whatever it is in your
nesreader). With method #1, it all stays together in a single thread, so
everyone can follow along. With method #2, your question gets split up all
over the place, & no-one else can easily see what's going on.

Metho #1 will defintely increase your chance of getting effecyive help.

HTH,
TC
 
Back
Top