有人可以帮我解决coreldraw中的exportfilter
对象模型吗?我无法找到关于这个主题的任何好的信息,除了我不明白它是怎么样的示例代码?我是vba coreldraw的新手。
Dim exF as ExportFilter
From object browser ExportFilter has
Finish - method
HasDialog - properties
Reset - method
ShowDialog - method
My questions how many sample code that scattered on many forum about coreldraw vba can include for example,
With exF
m_Compression = .Compression
m_Smoothing = .Smoothing
m_bOptimized = .Optimized
m_Progressive = .Progressive
m_Subformat = .Subformat
End With
I am sorry but i copy those above code from JPGExportOptions just to get the picture what the question i ask to this forum
How can i find and know that JPGExportFilter has
.Compression
.Smoothing
.Optimized
etc
All this is JPGExportFilter object model, i just want to know why this properties or method does not reveal on object browser vba window and does not have any help associated with all those ExportFilter object model
如果我只能复制其他人制作的节目,我怎么称自己为专业程序员。我只是想知道ExportFilter类的细节。不幸的是,很少有书讨论coreldraw vba。这个网站http://www.oberonplace.com/vba/filter10vba.htm不错,但是我需要的信息不仅仅是一个列表,我需要解释每个类的成员 - 属性和方法 - 以及如何在实际代码中使用它。
由于
答案 0 :(得分:0)
如果您使用的是Corel Draw X7,您应该能够在%PROGRAMFILES%\Corel\CorelDRAW Graphics Suite X7\Data
找到对象模型的文档。遗憾的是,此文档无法在线提供以供参考或超链接。
在Corel Draw X7中,您可以在要导出的对象上调用ExportEx,并以StructExportOptions
对象的形式传递导出选项。您可以阅读上述文档中的所有选项。
文档中的示例:
Sub Test()
Dim d As Document
Dim s As Shape
Dim opt As New StructExportOptions
Dim pal As New StructPaletteOptions
Dim Filter As ExportFilter
Set d = CreateDocument
Set s = d.ActiveLayer.CreateEllipse2(4, 5, 2)
s.Fill.ApplyFountainFill CreateRGBColor(255, 0, 0), CreateRGBColor(0, 0, 0)
opt.AntiAliasingType = cdrNormalAntiAliasing
opt.ImageType = cdrRGBColorImage
opt.ResolutionX = 72
opt.ResolutionY = 72
pal.PaletteType = cdrPaletteOptimized
pal.NumColors = 16
pal.DitherType = cdrDitherNone
Set Filter = d.ExportEx("C:\Temp\Doc.gif", cdrGIF, cdrCurrentPage, opt, pal)
If Filter.ShowDialog() Then
If Not Filter.Interlaced Then
MsgBox "Interlaced is not specified... Fixing this."
Filter.Interlaced = True
End If
Filter.Finish
Else
MsgBox "Export canceled"
End If
End Sub