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
Solved

Word OLE Question

Posted on 1998-09-07
2
240 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
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

Suggested Solutions

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…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

808 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