24.09.2019, 15:52
Hallo Günther,
ein neuer Versuch:
Gruß
Koter
ein neuer Versuch:
Code:
Sub JPGneuAusAuswahl()
Dim L As Layer
Dim ND As Document
Dim DN As String, DName As String, DPfad As String
Dim EF As ExportFilter
If ActiveDocument.Mask.IsEmpty Then
MsgBox "Keine Maske!", vbCritical, "Fehler"
Exit Sub
End If
DName = Left(ActiveDocument.FileName, Len(ActiveDocument.FileName) - 3) & "jpg"
DPfad = ActiveDocument.FilePath
DN = CorelScriptTools.GetFileBox("JPG (*.jpg)|*.jpg", "Datei Speichern", 1, "Neu", ".jpg", DPfad)
If Trim(DN) = "" Then Exit Sub
Set L = ActiveDocument.Layers.Add("JPG", , , pntCopySelection)
L.Cut
Set ND = Application.CreateDocumentFromClipboard
ND.Layers.Merge
Set EF = ND.SaveAs(DN, cdrJPEG)
EF.Finish
End Sub
Gruß
Koter