How do I start Excel and open an Excel file from within Word?

D

dennis@gate

....having problems with setting the reference to Excel. I found "Microsoft
Excel 11.0 Object Library" as a reference but when I step through the macro
which I copy/pasted from the link you provided I get the message
"User-defined type not defined" at the "Dim oXL As Excel.Application" line.
 
J

Jay Freedman

You said you found the library in the reference list. Did you click to check the
box next to it?

In the editor, before running the macro, delete the line "Dim oXL As
Excel.Application" and then start typing it in by hand. When you type the 'Ex'
in Excel, you should see 'Excel' selected in the popup list. Does that happen?
When you get to the '.Ap' part, does it suggest 'Application'?
 
D

dennis@gate

Yes, I found it and it works now. Thanks.

Jay Freedman said:
You said you found the library in the reference list. Did you click to check the
box next to it?

In the editor, before running the macro, delete the line "Dim oXL As
Excel.Application" and then start typing it in by hand. When you type the 'Ex'
in Excel, you should see 'Excel' selected in the popup list. Does that happen?
When you get to the '.Ap' part, does it suggest 'Application'?




--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
 

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