Link to home
Start Free TrialLog in
Avatar of jupe
jupe

asked on

opening a ms-word document

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
ASKER CERTIFIED SOLUTION
Avatar of MaxSCZ
MaxSCZ

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of danysz
danysz

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
Oops
correction
try
 word := GetActiveOleObject('Word.Application');//test if word is open
except
 word := CreateOleObject('Word.Application');
end;
bye Max


hi max

we are quite syncronized .

same minute.

daniel
Hi Daniel yes very strange!
Bye Max ;D
Avatar of jupe

ASKER

first come first served.  thanks anyway to both of you.
jupe