?
Solved

Word OLE Question

Posted on 1998-09-07
2
Medium Priority
?
245 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

770 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