Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Running a Microsoft Access 2010 macro
Topic Summary: Access macro will run in AutoMate as current user, but not as defined user.
Created On: 01/09/2013 12:32 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 01/09/2013 12:32 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Hi all,

This is my very first post to the AutoMate forums as I am a new user.

I'm trying to run an Access macro from an AutoMate workflow. If I set the Logon properties of the task in the Workflow Designer to run as Logged on user, the macro runs - I can see the Access instance open, run, then close. If I set the "When workstation is logged on:" property to "Background user (defined below)", the macro seems to run, AutoMate will report a success but it doesn't really run. In fact, the msaccess.exe instance remains running per Task Manager.

I can configure this in Task Scheduler with the same user that I'm setting the background user to in Automate and it will run fine, logged on or logged off.

What am I doing wrong? I am running BPA Server v9 on Windows Server 2008 R2.

Thanks,

James



 Category Survey
AutoMate BPA Server 9 version: 9.0.5
Windows version: Windows Server 2008 R2


-------------------------
<html />
 01/10/2013 03:52 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hi James,

Would it be possible to post your task for further review? If you do not feel comfortable posting your task you can email it over to support@networkautomation.com

Note: If you are emailing the task please reference this forum thread.

 Category Survey


-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 01/14/2013 08:38 AM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Ricardo,

I have emailed the task to the address you provided.

Thanks,

James



 Category Survey
AutoMate BPA Server 9 version: 9.0.5
Windows version: Windows Server 2008 R2


-------------------------
<html />
 01/14/2013 12:21 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hi James,

Thank you for the follow up, we will respond to you via email.

 Category Survey


-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 01/25/2013 05:23 AM
User is offline View Users Profile Print this message

Author Icon
ShailendraGupta
Student (5-19 posts)

Posts: 6
Joined: 01/25/2013

Hi James,

I have a MDB file and some macros are written there. One of the macro creates the file qry_Mod4_Step1_Export.xlsx which is imported by the Automate job.

Now my job is to open a Access connection, execute the macro and import the .xlsx file and then close that connection.

Can you please guide me through the process. Its Urgent.



 Category Survey
 01/25/2013 02:35 PM
User is offline View Users Profile Print this message

Author Icon
Liz Casale
AUTOMATE EMPLOYEE

Posts: 940
Joined: 05/23/2011

Shailendra,

There are a couple different ways to run a macro. The way you choose to call the macro is up to you. There does look to be a way to call the macro by adding it to the run command in Windows:
Excel Helphttp://office.microsoft.com/en-us/excel-help/command-line-switches-for-excel-HA010158030.aspx

Or you can call it from an embedded script in Automate:
Embedded Script

You can also interact with Excel itself by sending keystrokes to run the macro. For example, for me in Excel 2010, once Excel opens I can send the keystrokes: ALT - W - M to bring up the macro menu.


 Category Survey


-------------------------
Liz Casale
Technical Support Representative
(213) 738-6966
Network Automation, Inc.

--------------------------------------------------------------------------------

AM5 5.5.5.1; AM6 6.2.8.0; AM7 7.1.3.0; AM8 8.0.9.0; AM9 9.0.3.4
BPA7 7.1.3.0; BPA8 8.0.9.0; BPA9 9.0.3.4
 01/25/2013 09:10 PM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Shailandra,
below a method to run an Access Macro without even opening the mdb
Since it was designed for Office 2007 Access (Office12), you would have to edit the "References" in the basic script IDE to cope with your Office 2010

 Category Survey
AutoMate BPA Server 9 version:
Windows version:



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 07/03/2013 08:38 AM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Perhaps I should revisit this then. Originally it wasn't working for me. While the workflow would finish, the actual msaccess.exe process would never terminate, nor would the database macro do it's job.

I ended up at the time just putting the command in a batch file and using Windows Task Scheduler to run it.

On a side note, I either need to be more proactive at checking my posts or look for a way to be notified for updates on specific threads....



 Category Survey
AutoMate BPA Server 9 version: 9.0.5
Windows version: Windows Server 2008 R2


-------------------------
<html />
 07/03/2013 08:43 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

When you "reply" in this forum (not quick reply, but reply), there is a checkbox "subscribe to this thread" which will send you an email when somebody posts on that thread.

 Category Survey
AutoMate BPA Server 9 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 07/03/2013 08:50 AM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

I actually found that under Topic Tools as well. Thanks!



 Category Survey
AutoMate BPA Server 9 version: 9.0.5
Windows version: Windows Server 2008 R2


-------------------------
<html />
 03/24/2016 11:10 PM
User is offline View Users Profile Print this message

Author Icon
WalterTiggeloven
n00b (>6 posts)

Posts: 4
Joined: 01/31/2016

For Access 2010 this would be:

And another hint: do not close the application in your VBA code using command DoCmd.Quit   That will give an error. 

 



 Category Survey
AutoMate BPA Server 9 version:
Windows version:



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1063 guests browsing this forum, which makes a total of 1063 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog