Automating Word in a non interactive environment - Webspeed

Posted by christian.bryan@capita.co.uk on 22-Dec-2015 06:50

HI 

A little tip for when using Word in a non interactive session, in my case a webspeed broker.

I know Microsoft don't support it, blah blah, but sometimes its the only way and i have no choice until we can come up with an alternative document production solution.

My problem was that Word (Office 2010 32Bit) hung when trying to open a document - see attached sample program. 

Anyway i tried all the usual things:

  • Running webspeed as a domain account and initialising word by logging in as this account
  • Turning off  chWordApp:Visible = FALSE /* Webspeed */ chWordApp:ScreenUpdating = FALSE chWordApp:DisplayAlerts
  • Using the OpenNoRepairDialog() method.

But the solution in this case was the creation of the following directory:

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

See article - https://social.msdn.microsoft.com/Forums/en-US/545dd81f-e80a-48b0-89a1-dafcd72e269d/word-automation-through-windows-service-windows-server-2008-problem?forum=netfx64bit 

Hope this helps someone.

This 

All Replies

Posted by James Palmer on 22-Dec-2015 07:30

Really helpful Christian.

You may also want to look at the free DocxFactory project for creating all manner of office files: http://docxfactory.com/

Posted by OctavioOlguin on 24-Dec-2015 08:50

why don't you take a look on DocxFactory.com.

It's a really great add-on for Progress (among other platforms) by fellow Alon Blitch, who also wanders somewhere here in the community..

I really think it is the alternative you are looking.

I use it for doing invoices (btw, win appserver 11.5 4mb ram celeron 2.2mhz, and it tooks only 0.2 to 0.5s to create my invoice in word format and another 0.1s to save it on pdf)

my $0,02.

Great christmas season!

This thread is closed