Re: AIClipBrd копирование через буфер в Adobe

Написал Sancho в 12/02/2009 7:13:39

Я бы сделал так:

Цитата:
If bCopyPDF Then
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Optimization = True

Dim myUnit As CorelDRAW.cdrUnit, s1 As Shape
myUnit = ActiveDocument.Unit
ActiveDocument.Unit = cdrMillimeter
Set s1 = ActiveSelectionRange.Group
s1.AlignToPageCenter cdrAlignHCenter + cdrAlignVCenter, cdrTextAlignBoundingBox
ActiveDocument.MasterPage.SetSize s1.SizeWidth + 1, s1.SizeHeight + 1
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nClipFmtPDF = RegisterClipboardFormat(PDFClipFormat)
sTempFilePDF = GetTempFile("pdf")
With ActiveDocument.PDFSettings
.BitmapCompression = pdfLZW
.ColorMode = pdfCMYK
.EmbedBaseFonts = False
.EmbedFonts = False
.FileInformation = False
.Hyperlinks = False
.IncludeBleed = False
.Linearize = True
.MaintainOPILinks = True
.Overprints = True
.pdfVersion = IIf(VersionMajor > 10, 3, 1) 'pdfVersion14 : pdfVersion13
.PublishRange = pdfSelection
.RegistrationMarks = False
.SpotColors = True
.Startup = pdfPageOnly
.SubsetFonts = False
.TextAsCurves = bTextToCurves
.Thumbnails = False
.UseColorProfile = False
End With
ActiveDocument.PublishToPDF sTempFilePDF
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ActiveDocument.Undo 3
ActiveDocument.Unit = myUnit
Optimization = False
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
End If


ПС: В теме ИМХО надо было упомянуть что AIClipBrd это макрос Алекса, и в нём есть такой вот недочётик. А то многие просто не поймут о чём вообще речь

Источник: https://powerclip.ru/modules/newbb/viewtopic.php?post_id=95504

Rambler's Top100