Solved

Word OLE Question

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Firewall issues 6 85
System restore point 4 78
Delphi TcxGrid group footer summary 3 149
Help on project with Soap 10 44
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now