V-Форум / Corel VBA / Тема: Свойство ExportArea в ExportFilter

Свойство ExportArea в ExportFilter

 14/01/2011 16:31:53 #Link

mendow

Свойство ExportArea в ExportFilter

Как передать параметры в это свойство написано as Rect y что то я не могу создать объект Rect


Прошу помощи!

Re: Свойство ExportArea в ExportFilter

 14/01/2011 16:51:07 #Link

Sancho

Dim r As Rect
Set r = New Rect

Re: Свойство ExportArea в ExportFilter

 14/01/2011 17:47:57 #Link

mendow

'----- code --------
Dim r As Rect
Dim x As Double, y As Double, w As Double, h As Double
Set r = New Rect
ActiveSelection.GetBoundingBox x, y, w, h
r.SetRect x, y, w, h

Set Filter = d.ExportBitmap(fname, cdrJPEG, cdrCurrentPage, cdrRGBColorImage, 0, 0, 72, 72)
With Filter
.Compression = 0
.Optimized = False
.Smoothing = 0
.SubFormat = 1
.ExportArea = r
.Progressive = False
.Finish
End With

' --- code end ---
Выдает




Re: Свойство ExportArea в ExportFilter

 14/01/2011 18:38:42 #Link

Sancho

А, так ExportArea не принадлежит ExportFilter. Свойство относится к StructExportOptions или передаётся как один из параметров в функцию ExportBitmap

Re: Свойство ExportArea в ExportFilter

 14/01/2011 19:53:30 #Link

mendow

Спасибо!
Удалось!

Источник: https://powerclip.ru/modules/newbb/viewtopic.php?topic_id=9739&start=0

Rambler's Top100