Macro Problem
#1
Hallo, ich habe mir ein Macro für den PDF-export aufgezeichnet und es so modifiziert, dass das Datum an den Dateinamen angehängt wird. Ich kenne mich nicht wirklich mit der Programmierung aus, probiere halt immer rum irgendwann gehts meistens dann doch wie ich will.
Allerdings mit dem Speicherpfad habe ich meine Probleme. Die PDF soll immer in den jeweiligen (aktiven) Ordner gespeichert werden, da brauche ich wahrscheinlich eine Variable, bis jetzt gehts immer nach Laufwerk g:

Hier mal der Code:


Sub PDFexp()

Dim strD$ ' Datum
strD = CStr(Format(VBA.Date, "dd-mm-yyyy"))
MsgBox strD


ActiveDocument.PublishToPDF "g:\" & ActiveDocument & strD & ".pdf" ' Name

' Recorded 2012/07/13
With ActiveDocument.PDFSettings
.PublishRange = 0 ' CdrPDFVBA.pdfWholeDocument
.PageRange = "1"
.Author = ""
.Subject = ""
.Keywords = ""
.BitmapCompression = 2 ' CdrPDFVBA.pdfJPEG
.JPEGQualityFactor = 60
.TextAsCurves = False
.EmbedFonts = True
.EmbedBaseFonts = False
.TrueTypeToType1 = False
.SubsetFonts = True
.SubsetPct = 80
.CompressText = True
.Encoding = 1 ' CdrPDFVBA.pdfBinary
.DownsampleColor = True
.DownsampleGray = True
.DownsampleMono = True
.ColorResolution = 200
.MonoResolution = 200
.GrayResolution = 200
.Hyperlinks = False
.Bookmarks = False
.Thumbnails = False
.Startup = 0 ' CdrPDFVBA.pdfPageOnly
.ComplexFillsAsBitmaps = True
.Overprints = False
.Halftones = False
.MaintainOPILinks = False
.FountainSteps = 256
.EPSAs = 1 ' CdrPDFVBA.pdfPreview
.pdfVersion = 6 ' CdrPDFVBA.pdfVersion15
.IncludeBleed = False
.Bleed = 31750
.Linearize = False
.CropMarks = False
.RegistrationMarks = False
.DensitometerScales = False
.FileInformation = False
.ColorMode = 0 ' CdrPDFVBA.pdfRGB
.ColorProfile = 1 ' CdrPDFVBA.pdfSeparationProfile
.EmbedFilename = ""
.EmbedFile = False
.JP2QualityFactor = 60
.TextExportMode = 0 ' CdrPDFVBA.pdfTextAsUnicode
.PrintPermissions = 1 ' CdrPDFVBA.pdfPrintPermissionLowResolution
.EditPermissions = 0 ' CdrPDFVBA.pdfEditPermissionNone
.ContentCopyingAllowed = False
.OpenPassword = ""
.PermissionPassword = "Test"
.EncryptType = 1 ' CdrPDFVBA.pdfEncryptTypeStandard
.OutputSpotColorsAs = 0 ' CdrPDFVBA.pdfSpotAsSpot
.OverprintBlackLimit = 95
End With

End Sub
Zitieren



Nachrichten in diesem Thema
Macro Problem - von norre - 13.07.2012, 19:06
Macro Problem - von Helmut - 16.07.2012, 19:30
Macro Problem - von norre - 17.07.2012, 14:49
Macro Problem - von koter - 17.07.2012, 19:51
Macro Problem - von norre - 17.07.2012, 21:34
Macro Problem - von norre - 26.07.2012, 23:17
Macro Problem - von Helmut - 26.07.2012, 23:51
Macro Problem - von koter - 27.07.2012, 23:53
Macro Problem - von norre - 28.07.2012, 00:25

Möglicherweise verwandte Themen...
Thema Verfasser Antworten Ansichten Letzter Beitrag
  Corel Draw Problem - Funktion Kontur Boshi 11 5.635 10.01.2023, 13:37
Letzter Beitrag: Boerni
  Corel Tabellen pdf Problem gagman 2 1.204 08.11.2022, 20:56
Letzter Beitrag: gagman
  Problem Hicki 4 1.412 19.01.2021, 23:00
Letzter Beitrag: norre
  Problem mit dem Druck Layout Ami-Joe 1 1.368 14.05.2020, 22:11
Letzter Beitrag: koter
  Problem mit CorelDraw Home + Student 2019 Kalle-24 2 4.130 10.03.2020, 16:50
Letzter Beitrag: Kalle-24
  pdf-Problem - Foto wird körnig adelmann-grafen 14 3.793 19.04.2018, 11:16
Letzter Beitrag: adelmann-grafen
  Problem bei Lizenzierung landbastler 0 1.901 05.10.2017, 18:36
Letzter Beitrag: landbastler
  Problem: Umriss in Objekt bei Elypsen Uckerschwan 18 5.830 09.09.2017, 21:07
Letzter Beitrag: koter
  PDF erzeugen aus corel x7, Problem mit Transparenzen. anke1168 1 2.601 18.05.2017, 16:56
Letzter Beitrag: mvm
  Export " Problem" mit X7 Hartmut 6 2.957 28.01.2017, 12:38
Letzter Beitrag: Hartmut