You are viewing limited content. For full access, please sign in.

Question

Question

Access Application won't stay open using office.interop assemblies in vb.Net Script from within Workflow

asked on December 22, 2016

I have a vb.Net script that is run from within a workflow using Microsoft.Office.Interop.Access assemblies.

It correctly creates the object using CreateObject("Access.Application"), it opens the database exclusively using the OpenCurrentDataBase("accdb_file_location" ,true), however the application closes before any command is executed in the database.

I even tried using AutoExcec macro to run command automatically as the database opens with no luck.

NOTE: When I run it from within the Script Editor it works beautifully, but when I run the workflow the application starts, database opens, but closes right away.

 

FYI: I am using Laserfiche 10 and I am running my tests right from the Laserfiche Server.

 

Insights on this matters will be greatly appreciated.

Thanks,

0 0

Replies

replied on December 22, 2016

That's most likely because the Office SDK expects to be able to launch the application. Workflow scripts run on the server where there is no interactive user session that could open Access.

0 0
replied on December 22, 2016

Miruna

I have used the office office.interop assemblies under the same conditions with excel without any problem.

Of course, I can give try Office SDK to open access and see the results (do you have helpful documentation available?). 

 

Thanks,

 

NOTE: If any other person has an idea, it would be greatly appreciated.

 

0 0
replied on December 22, 2016

Sorry, by Office SDK, I meant the Microsoft.Office.Interop.Access assembly. You're calling CreateObject("Access.Application"), which will launch Access. Services can't do that because there's no user session.

0 0
replied on December 22, 2016

Got it!

 

Thanks, Miruna.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.