![]() |
![]() |
We are currently migrating this forum over to our HelpSystems domain. Please post all new threads in our new HelpSystems Community Portal. |
![]() |
|
![]() |
AutoMate Discussion | ![]() |
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 |
![]() |
![]()
|
![]() |
||||||||||
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
------------------------- <html /> |
||||||||||
|
||||||||||
![]() |
||||||||||
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.
------------------------- ![]() Ricardo Castaneda | Principal Support Analyst AutoMate | Division of HelpSystems HelpSystems, LLC | T: +1.213.738.1700 |
||||||||||
|
||||||||||
![]() |
||||||||||
Ricardo, I have emailed the task to the address you provided. Thanks, James
------------------------- <html /> |
||||||||||
|
||||||||||
![]() |
||||||||||
Hi James,
Thank you for the follow up, we will respond to you via email.
------------------------- ![]() Ricardo Castaneda | Principal Support Analyst AutoMate | Division of HelpSystems HelpSystems, LLC | T: +1.213.738.1700 |
||||||||||
|
||||||||||
![]() |
||||||||||
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.
|
||||||||||
|
||||||||||
![]() |
||||||||||
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.
------------------------- 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 |
||||||||||
|
||||||||||
![]() |
||||||||||
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
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 ![]() |
||||||||||
|
||||||||||
![]() |
||||||||||
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....
------------------------- <html /> |
||||||||||
|
||||||||||
![]() |
||||||||||
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.
------------------------- Jean Delfosse - Automate Beta Tester Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4 ![]() |
||||||||||
|
||||||||||
![]() |
||||||||||
I actually found that under Topic Tools as well. Thanks!
------------------------- <html /> |
||||||||||
|
||||||||||
![]() |
||||||||||
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.
Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder) |
||||||||||
|
FuseTalk Enterprise Edition v4.0 - © 1999-2021 FuseTalk Inc. All rights reserved.