Solved

Word OLE Question

Posted on 1998-09-07
2
243 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 100 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

705 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