Options

Scheduled MailMerge, WS2008R2x64, document not found

gensmanngensmann Member Posts: 24
Hi,

I've run into a challenge that I would appreciate your input to: My client wishes to send out welcome mails automatically every night.
I've implemented the functionality by customizing C5054 and the MailMerge works as expected when run from the NAV client and when executed using the ExpandIT Launch Utility (ELU), by starting it manually.

When I set the Windows Task Scheduler to run the ELU, the MailMerge fails. I've found reports of similar issues as well as solutions, but they don't seem to solve the problem for my setup, I've tried both suggestions below. The task is executed using a domain service account successfully used for several other NAV related tasks. In the log I see:
The call to member ActiveDocument failed. Microsoft Word returned the following message: This command is not available because no document is open.
Does anybody have any suggestions as to how to narrow down the problem and/or solve it?

Thanks.


Setup and details:
NAV 2009 R2 (combination of RTC and CC, but this MailMerge run on CC).
The Task Scheduler is on a Windows Server 2008 R2 x64.

Similar issue is reported here http://www.mibuso.com/forum/viewtopic.php?f=23&t=51723, leading to the solutions suggested here https://social.msdn.microsoft.com/Forums/en-US/b81a3c4e-62db-488b-af06-44421818ef91/excel-2007-automation-on-top-of-a-windows-server-2008-x64?forum=innovateonoffice:
Windows 2008 Server x64:Please make this folder. C:\Windows\SysWOW64\config\systemprofile\Desktop
Windows 2008 Server x86: Please make this folder. C:\Windows\System32\config\systemprofile\Desktop
And here https://social.technet.microsoft.com/Forums/en-US/334c9f30-4e27-4904-9e71-abfc65975e23/problem-running-windows-service-with-excel-object-on-windows-server-2008-64-bit?forum=officesetupdeploylegacy:
REGEDIT and navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-18\ProfileImagePath and make a backup of its value.  Next from within the ProfileList registry hive, locate a valid desktop user profile (it should start with S-1-5-21-[xxxx]).  Copy the value for its ProfileImagePath and overwrite the one assigned to the Local System profile.  Restart your system before trying out the solution.
Best regards Poul Anker Gensmann
http://www.gbusiness-solutions.com
Sign In or Register to comment.