Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Watermark in Word via vfp6
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01108783
Message ID:
01108961
Vues:
11
Something like this:
oWord = CREATEOBJECT("Word.Application")
oWord.documents.add()
                                         
oWord.Visible=.t.
oWord.ActiveDocument.Shapes.AddPicture("C:\VisualFox_Pro8_oht74m.bmp")

msoSendBehindText =     5
WITH  oWord.ActiveDocument.Shapes(1)

	.ZOrder(msoSendBehindText)  && this is it !
*   others below just to beautify the appearance, set desired dimensions, position, etc

	WITH .Fill
		.Visible = .t.
		.Transparency = 0.2
	ENDWITH
	WITH .Line
		.Weight = 4
		.Transparency = 0.4
		.Visible = .t.
	ENDWITH
	.LockAspectRatio = .t.
	.Height = 64.1*5
	.Width = 64.1*5
	WITH .PictureFormat
		.Brightness = 0.85
		.Contrast = 0.15
	ENDWITH

ENDWITH

oWord=null
RELEASE oword
>I created a macro that generated a watermark in word -- but the resulting macro seems awful complex (especially since it is me). I have the Office automation book and it didn't have a section on watermarks. Does anyone one have some sample code that might make it a little easier for me?
>
>Thanks in advance,
>
>Kevin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform