paxCompiler/help/pascal_ole.htm
Dalibor Marković 9d0de424e8
Init
Signed-off-by: Dalibor Marković <dalibor31@gmail.com>
2024-07-06 22:28:12 +02:00

39 lines
1005 B
HTML

<html>
<head>
<link rel=stylesheet type="text/css" href="styles.css">
</head>
<body>
<H2>
Pascal samples. Support of OLE Automation.
</H2>
<hr>
<blockquote>
<pre>
<font color="blue"><b>var</b></font>
WordApp, Range: Variant;
I: Integer;
<font color="blue"><b>begin</b></font>
WordApp := CreateOleObject(<font color="Red">'Word.Application'</font>);
WordApp.Visible := true;
WordApp.Documents.Add;
Range := WordApp.Documents.Item[1].Range;
Range.Text := <font color="Red">'This is a column from a spreadsheet: '</font>;
<font color="blue"><b>for</b></font> I:= 0 <font color="blue"><b>to</b></font> 3 <font color="blue"><b>do</b></font>
WordApp.Documents.Item[1].Paragraphs.Add;
Range := WordApp.Documents.Item[1].Range[WordApp.Documents.Item[1].Paragraphs.Item[3].Range.Start];
Range.Paste;
<font color="blue"><b>end</b></font>.
</pre>
</blockquote>
<p>
<HR>
<font size = 1 color ="gray">
Copyright &copy; 2006-2009
VIRT Laboratory. All rights reserved.
</font>
</body>
</html>