Win32 COM (MS Word Automation) Question 
Author Message
 Win32 COM (MS Word Automation) Question

I know this question is really more Word than python oriented,
but I use python win32 com to drive word, so here we go:

I have installed a BSCW server (see http://www.*-*-*.com/ for more info)
at a computer here and I'm trying to install a text-converter.
This converter should translate MS Word into HTML, so I thought,
MS Word should be able to do this.

I wrote the following script:

Quote:
> import sys
> sys.stderr = sys.stdout
> import win32com.client

> print "Converting %s to %s" % (sys.argv[1], sys.argv[2])

> app = win32com.client.Dispatch ("Word.Application")
> try:
>     docs = app.Documents
>     d = docs.Open (sys.argv[1])
>     d.SaveAs (sys.argv[2], 100) # html-export
>     d.Close()
> finally:
>     app.Quit()

It really works when started from the command line.
When it is started by the BSCW server (running on
NT 4.0, MS Office 97, with IIS running under the system account)
I get the following error message:

Quote:
> c:\bscw3\data\Temp\tmp11>c:\python\python


Quote:

> Traceback (innermost last):
>   File "c:\bscw3\server\src\converters\doc2html.py", line 10, in ?
>     d = docs.Open (sys.argv[1])
>   File ">", line 2, in Open
>   File "win32com\client\dynamic.py", line 162, in _ApplyTypes_
> pywintypes.com_error: (-2146822307, 'OLE error 800a175d', (0, 'Microsoft

Word', 'Could not open macro storage.', 'wdmain8.hlp', 25461,
->2146822307), None)
Quote:
> c:\bscw3\server\src\converters\doc2html.bat


What does this mean? Which macro storage could not be
opened and why?

PS: Are there other converters from Word or Excel to HTML
which I can use?

Regards
Thomas Heller



Fri, 14 Jul 2000 03:00:00 GMT  
 Win32 COM (MS Word Automation) Question

Quote:
>It really works when started from the command line.
>When it is started by the BSCW server (running on
>NT 4.0, MS Office 97, with IIS running under the system account)
>I get the following error message:

A big problem could be that the "current user" when run under the System
Account will not have MS Office settings available.  Also, the system
account is very restricted, so if it is attempting to load anything from the
network it is almost certain to die...

Can you change the user of IIS just for the sake of testing to see if that
is indeed the problem.....

Mark.



Sat, 15 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Ms-WORD automation

2. OLE Automation with MS Word

3. COM/MS Automation support

4. Class(y) 2.4b, with documentation for MS-Word 97, MS-Word 6.0 and WordPerfect 7.0

5. Python And MS Word Com Server

6. MS Word COM error w/ Borders property

7. python COM help with MS word

8. COM and MS Word

9. MS Word OLE Question

10. DDE Command reference for MS Office / MS Word

11. Win32 COM question

12. win32 COM test question

 

 
Powered by phpBB® Forum Software