Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Word OLE Question

Posted on 1998-09-07
2
Medium Priority
?
248 Views
Last Modified: 2010-04-06
Hi

Could someone help with a bit of coding.

I'm using Ole to open Word in a Delphi 3 program, there's no problem opening Word, but it seems to have one bug bare and that is that Word opens up half size.

I would like it to open maximized, I've tried to code the WindowState as wdMaximized, but get error messages such as 'method not supported by automation etc', I just can't seem to find the correct syntax to achieve this.

Can anyone help please ?

Rgds
John
0
Comment
Question by:tam97
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
itamar earned 400 total points
ID: 1338882
Hi John,

you must use the AppMaximize method. Example:

  MsWord := CreateOleObject('Word.Basic');
  ...
  MSWord.AppMaximize;
  MSWord.AppShow;

Notice that calling AppMaximize BEFORE the AppShow method gives a better effect.

Regards,
Itamar
0
 

Author Comment

by:tam97
ID: 1338883
Hi Itamar

Thanks for your speedy reply.

Have just tried out your coding, worked first time, thanks very much, thats me a happy chappy !.

Best regards
John
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question