Problem Task Scheduler Running Access Macro to Create Word Document

NSCissues 96 Reputation points
2021-09-28T12:24:37.297+00:00

Having problem running batch file that triggers access macro to create word documents. The steps and issues

  • If I run the batch file manually it works fine. It triggers the macro and creates the files.
  • This task process has been working for a long time. It just stopped working.
  • In Task Manager both access and word are open with 0% cpu usage.
  • It creates the folder to export the word files but there are no files. It freezes on the first document.
  • I assume there is a prompt that occurs but can not see since it is in the background.

I have gone to Event Viewer but I can not finding anything. There is nothing in the Microsoft Office Alerts. I am at a lost. My initial thought was that the account login for 365 was popping up so I purchased 2019 but it still occurs. Any ideas how to debug this problem?

Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
821 questions
Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
2,000 questions
Word Management
Word Management
Word: A family of Microsoft word processing software products for creating web, email, and print documents.Management: The act or process of organizing, handling, directing or controlling something.
892 questions
0 comments No comments
{count} votes

Accepted answer
  1. NSCissues 96 Reputation points
    2021-09-28T17:11:22.167+00:00

    C:\Windows\System32\config\systemprofile\Desktop

    C:\Windows\SysWOW64\config\systemprofile\Desktop

    This was the fix. I forgot to check the the SysWOW64 account.

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Michael Taylor 47,966 Reputation points
    2021-09-28T14:43:01.873+00:00

    The account you're running under is a normal user account? That user account has a current license for Office? Your batch file is not relying on anything that might be tied to your profile loading like a mapped drive?

    Change your batch file to start notepad instead. Does it work? If it does then this eliminates most issues with running batch files under your profile.

    Change your batch file to simply start Word. Does it work? If not then the issue is likely the need for a license agreement approval by the account running Office. Ensure the Hidden option is not set so you can see the UI pop up.

    0 comments No comments

  2. NSCissues 96 Reputation points
    2021-09-28T15:26:09.35+00:00

    The batch file runs fine. It starts the Access Marco and will complete as long as I am not opening Word. I just noticed that if I change the task to Run only when user is logged in then it runs fine as well.

    It has something to do with Word and the user account. Not sure where to see the error or the prompt created. Hope this helps.


  3. NSCissues 96 Reputation points
    2021-09-28T16:29:33.247+00:00

    Yes, I am opening it through VBA Module in Access. I do not see any permission errors in the Event Viewer. How do I determine this?

    0 comments No comments

  4. NSCissues 96 Reputation points
    2021-09-28T16:30:43.893+00:00

    C:\Windows\System32\config\systemprofile\Desktop

    By the way... I did add the folder above thinking this was the issue but no luck thus far. Thanks again for your help.

    0 comments No comments