Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to Manipulate shapes and inline shapes in Word Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
30-Oct-02
Category
OLE
Language
Delphi 2.x
Views
58
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Jonas Bilinkevicius

I'm trying to insert a picture in a document and sent it to the back, with the text 
over the picture using automation.

Answer:

If Doc is a Word document:

1   { ... }
2   var
3     Pic: Word2000.Shape;
4     Left, Top: OleVariant;
5     { ... }
6   
7   {To add a pic and make it appear behind text}
8   Left := 100;
9   Top := 100;
10  Pic := Doc.Shapes.AddPicture('C:\Small.bmp', EmptyParam, EmptyParam, Left, Top,
11    EmptyParam, EmptyParam, EmptyParam);
12  Pic.WrapFormat.Type_ := wdWrapNone;
13  Pic.ZOrder(msoSendBehindText);
14  {To get a watermark effect}
15  Pic.PictureFormat.Brightness := 0.75;
16  Pic.PictureFormat.Contrast := 0.20;
17  {To make any white in a picture transparent}
18  Pic.PictureFormat.TransparencyColor := clWhite;
19  Pic.PictureFormat.TransparentBackground := msoTrue;
20  Pic.Fill.Visible := msoFalse;
21  { ... }


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC