Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Restrict picture height in word
Message
From
04/11/2009 11:14:50
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01433107
Message ID:
01433122
Views:
41
this works:

lnScaleFactor = 100*(100/oPic.Height)
*!* oPic.scaleHeight= lnScaleFactor && MIN(oPic.scaleHeight,100)
*!* oPic.scaleWidth= lnScaleFactor && MIN(oPic.scaleWidth,100)
oPic.LockAspectRatio=.t.
oPic.Height=oPic.Height*lnScaleFactor /100
oPic.Width=oPic.Width*lnScaleFactor /100







>>I an inserting pictures int o a word doc through atomation with this code
>>
>> oPic=.SELECTION.InlineShapes.AddPicture(laPhotoName[m.I2] ,.F., .T.)
>> oPic.scaleHeight=MIN(oPic.scaleHeight,100)
>> oPic.scaleWidth=MIN(oPic.scaleWidth,100)
>>
>>
>>but unfortunately the picture don't get restricted to 100 pixels
>>
>>some of them take up a whole page instead just a small Pict at the top of the page
>>what am I doing wrong??
>>
>>Thanks
>>
>>
>>Peter
>
>I found your older thread Re: Insert pict into word - change size Thread #1142416 Message #1142483 - not sure if would help.
Peter Cortiel
Previous
Reply
Map
View

Click here to load this message in the networking platform