1234567891011121314151617181920212223242526272829303132333435363738 |
- Private Sub Export_JPEG_Link_Click()
- ActiveDocument.Unit = cdrCentimeter
- Dim d As Document
- Set d = ActiveDocument
- cnt = 1
- Dim sh As Shape, shs As Shapes
- Set shs = ActiveSelection.Shapes
-
- Dim opt As New StructExportOptions
- opt.ResolutionX = 300
- opt.ResolutionY = 300
-
- Dim impflt As ImportFilter
- Dim impopt As New StructImportOptions
- With impopt
- .Mode = cdrImportFull
- .LinkBitmapExternally = True
- End With
-
- For Each sh In shs
- ActiveDocument.ClearSelection
- sh.CreateSelection
-
- f = d.FilePath & "Link_" & cnt & ".jpg"
- d.Export f, cdrJPEG, cdrSelection, opt
-
- Set impflt = ActiveLayer.ImportEx(f, cdrTIFF, impopt)
- impflt.Finish
-
- cnt = cnt + 1
- Next sh
-
- End Sub
|