?
Solved

opening a ms-word document

Posted on 2001-06-11
6
Medium Priority
?
244 Views
Last Modified: 2010-04-06
I open a MS-Word document by (Delphi4):

try
    word := CreateOleObject('Word.Application');
except

end;
word.Visible := True;
word.Documents.Add;

Next I would like to open a style (memo.dot) and then set the top margin to 1.5cm and the left margin to 2.5cm

Can you give me the code for this?

Thanks in advance
jupe
0
Comment
Question by:jupe
[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
  • 3
  • 2
6 Comments
 
LVL 1

Accepted Solution

by:
MaxSCZ earned 800 total points
ID: 6176661
Hi,
you can open

try
  word := GetActiveOleObject('Excel.Application');
except
  word := CreateOleObject('Word.Application');
end;

Word.Documents.Open ('C:\My Documents\memo.dot');

word.Visible := True;


//Set the margin in the Memo.DOT

Bye Max
0
 
LVL 2

Expert Comment

by:danysz
ID: 6176662
hi

1. u can open as a document the 'memo.dot' as a file and u will get a new document based on the dot .

2. I don't think that u can change the page setup

daniel
0
 
LVL 1

Expert Comment

by:MaxSCZ
ID: 6176676
Oops
correction
try
 word := GetActiveOleObject('Word.Application');//test if word is open
except
 word := CreateOleObject('Word.Application');
end;
bye Max


0
Technology Partners: 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!

 
LVL 2

Expert Comment

by:danysz
ID: 6176689
hi max

we are quite syncronized .

same minute.

daniel
0
 
LVL 1

Expert Comment

by:MaxSCZ
ID: 6176954
Hi Daniel yes very strange!
Bye Max ;D
0
 

Author Comment

by:jupe
ID: 6177429
first come first served.  thanks anyway to both of you.
jupe
0

Featured Post

Independent Software Vendors: 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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

752 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