Open Form in Word

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
 
T

TC

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
 

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

Similar Threads

Here's the Code in Full 1
Array of Labels 4
2 questions. 4
SQL Query and Form 1
Array to Multiple Arrays 3
elseif formula 1
Nested IF functions 5
skipping blank lines - again 2

Top