Open Excel Workbook

M

matt

Is there a way to open an Excel workbook progrmattically through word VB?
This is what I was trying to use:
____________________________________________

Dim xlApp As Excel.Application

Set xlApp = CreateObject("Excel.application")

Excel.Application.Visible = True
xlApp.Workbooks.Open ("c:\Destination folder\Excel_File.xls")
__________________________________________
It opens excel but it's just an empty window

Thanks,
Matt
 
J

Jonathan West

matt said:
Is there a way to open an Excel workbook progrmattically through word VB?
This is what I was trying to use:
____________________________________________

Dim xlApp As Excel.Application

Set xlApp = CreateObject("Excel.application")

Excel.Application.Visible = True
xlApp.Workbooks.Open ("c:\Destination folder\Excel_File.xls")
__________________________________________
It opens excel but it's just an empty window

Thanks,
Matt

Control Excel from Word
http://www.word.mvps.org/FAQs/InterDev/ControlXLFromWord.htm
 
M

matt

NEVERMIND.....

Got the answer from a earlier post that I myself had asked about running a
macro, post was call "Call an Excel Module".

Thanks anyway
 
E

Ed

I too want to control Excel from Word. Is there anyway to set the reference
to Excel as a late binding event?

Here's the problem: I program on a Word2003 machine. 'Microsoft Excel Object
Library 11.0' is the reference I choose.

A few older computers still use Word2002 and 2000. At least on the 2002
computer, the library is '10.0'. When the VBA project is loaded, Library
11.0 is not recognized, and I get error messages, and the routine does not
load. (When I use a Word2007 computer, a switch is somehow made to load
Library 12.0, so going 'forward' works fine.)

Any thoughts?

Ed (in Virginia)
 

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