Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert pict into word - change size
Message
De
02/08/2006 12:59:03
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
02/08/2006 10:43:13
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01142416
Message ID:
01142483
Vues:
18
This message has been marked as the solution to the initial question of the thread.
>when I create a report in microsoft word everythin goes as planned except I have 2 photographes
>on each page and they should always be of a certain size
>if the height greater 50 make it 50
>if the height smaller 50 make it 50
>and adjust the width
>
>
>I have the following snippet:
>
>		p1=[\\dell240\c$\inetpub\wwwroot\sshs\]+ALLTRIM(cc1.babypic)
>		IF NOT EMPTY(P1) AND FILE(P1)
>			try
>			oPicture= .SELECTION.InlineShapes.AddPicture(P1,true,true)
>			WITH oPicture
>				.scaleHeight=50  && does not seem to work at all times
>				.scalewidth=50
>
>			ENDWITH
>			CATCH
>				?p1
>			endtry
>		ENDIF
>
>
>
>and I want all picture to be the same height regardless of picture dimension in file.
>also the ratio width/heit shoud remain
>in other words bigger pics shoul get smaller smaller pics ahoud get bigger in the word document
>
>Thanks
With oPicture
   .LockAspectRatio = -1
   .Width = 50 * .Width / .Height
   .Height = 50
endwith
PS: 50 is in points, if needed word has methods to convert it to and from other units.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform