I have a Word document on disk. I want my application to open Word modally, with this file loaded (and resume running when Word is closed)
Asked
Active
Viewed 911 times
1 Answers
4
Option A:
You can open Word using TOleContainer on the form and you show the Form as Modal
Option B:
something like:
EnableWindow(Application.MainForm.Handle, True);
application.Minimize;
WaitForSingleObject(ProcInfo.hProcess, INFINITE);
Application.Restore;
EnableWindow(Application.MainForm.Handle, False);
Application.BringToFront;
c this for more information.

Community
- 1
- 1

CloudyMarble
- 36,908
- 70
- 97
- 130
-
you can find good sample in Demos\Activex\Olectnrs directory. (for Delphi 5) – SimaWB Feb 08 '11 at 08:43
-
Thanks for the interesting link! Btw, when you post a link, it can be helpful to give the title of the article or even a line or two about it. It helps people decide whether or not to follow the link, and avoids having to wait for the browser to display where the link is going. – Marjan Venema Feb 08 '11 at 09:17
-
@Marjan i meant to do exactly this from the begining but i misunderstood ur 1st comment and had the wrong link. have nice day :) – CloudyMarble Feb 08 '11 at 09:25