Opening Excel document with CreateProcess API

R

Ralph P. Schorn

Hallo,

I open an Excel document from e.g. Delphi or VisualBasic using the
CreateProcess Windows API. Here is a code example:

CreateProcess (nil,
PChar(Line),
nil,
nil,
false,
Prio,
nil,
nil,
StartupInfo,
ProcessInfo);

where e.g. Line = "C:\Program Files\Microsoft Office\Office10\EXCEL.EXE"
"file.xls"

Everything was ok for years, but since some weeks this works exactly
only once after each fresh boot. Every next attempt opens Excel only
for half a second, then the program closes again. Opening Excel
manually with a blank sheet then shows a "damaged" file: This is that
file to be opened with CreateProcess - but it is not damaged at all.

Configuration:

Windows 2000 Pro SP4 + Rollup Pack
MS Office XP SP3

Any ideas?

Ralph.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top