# How to use MS Word features from Rails app running as servic

**URL:** <https://www.ruby-forum.com/t/how-to-use-ms-word-features-from-rails-app-running-as-servic/108354>\
**Category:** Rails\
**Created:** [July 2, 2007, 5:18pm UTC](https://www.ruby-forum.com/t/how-to-use-ms-word-features-from-rails-app-running-as-servic/108354 "2007-07-02T17:18:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yash](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/f17d59/32.png) [@yash](https://www.ruby-forum.com/u/yash)\
**Post date:** [July 2, 2007, 5:18pm UTC](https://www.ruby-forum.com/t/how-to-use-ms-word-features-from-rails-app-running-as-servic/108354/1 "2007-07-02T17:18:54Z")

</div>

Hi,

I am using features of MS Word 2003 on Win XP in my rails application.  
The server has Win XP

installed. I am able to open a document, save as HTML etc. if I run the  
app using

mongrel\_rails start … on command prompt.  
I use the Win32OLE support for Ruby:  
doc = WIN32OLE.new(‘Word.Application’)

However, at the deployment site, I have configured the app to run as a  
Windows Service using the mongrel:  
mongrel\_rails service::install -N EDiscussions -c appdir -p 80 -e  
production

The application runs fine except for the actions that use Word features.  
Debug statements indicate that the program does not get past the line:  
doc = WIN32OLE.new(‘Word.Application’)

The service is configured to run using Local System account and is  
allowed to interact with the desktop.

Can someone suggest what I might be missing here? How do I get it to  
work while running the app as a service?

Thanks,  
Yash
