Using automation over the network

  • Thread starter Maury Markowitz
  • Start date
M

Maury Markowitz

I asked this over in the Access groups, but this might be more appropriate.

Has anyone out there had any success using CreateObject to launch Office
applications on other machines? My task is to run a small Office (Excel)
ActiveX plugin, and do so remotely. I have it all working perfectly when you
run it by hand on the target machine ("peter"), and all that's left is to
call my sub from another machine.

In theory this should be as easy as...

Dim app As Object
Set app = CreateObject("Access.Application", "peter")
app.OpenAccessProject "c:\server.adp"
app.Run "runNightlyPricing"
app.Quit

Or alternately...

Dim xl As Object
Set xl = CreateObject("Excel.Application", "peter")
xl .Worksheets.Open "c:\server.xls"
xl .Run "server!runNightlyPricing"
xl .Quit

However all attempts so far don't work. I've managed to make some progress,
and many commands do see to work -- for instance I can call the Version
method on the xl object and get back the right answer, and the
OpenAccessProject really does seem to open the document. On the other have
Version does NOT work in Access, and Worksheets.open makes the client machine
(the one calling peter) hang indefinitely.

The real problem here is that I can't see any way to debug the problem.
app.Visible = true does what you expect on the local machine (replace "peter"
with "maury" and presto") so it's difficult to know what's going on. I have a
feeling there's an invisible dialog up that's causing the problem, but how
would I find out?

Anyone out there familiar with all this, and have any suggestions?

Maury
 

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