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
  Macro erstellen jochenfd 1 338 20.07.2026, 00:37
Letzter Beitrag: koter
  .svg Problem Boerni 2 475 01.07.2026, 04:48
Letzter Beitrag: Boerni
  Problem mit fehlender Schrift peterjaeckel 13 4.620 23.10.2025, 09:00
Letzter Beitrag: peterjaeckel
  Corel Draw Problem - Funktion Kontur Boshi 11 8.541 10.01.2023, 13:37
Letzter Beitrag: Boerni
  Corel Tabellen pdf Problem gagman 2 2.249 08.11.2022, 20:56
Letzter Beitrag: gagman
  Problem Hicki 4 2.660 19.01.2021, 23:00
Letzter Beitrag: norre
  Problem mit dem Druck Layout Ami-Joe 1 2.352 14.05.2020, 22:11
Letzter Beitrag: koter
  Problem mit CorelDraw Home + Student 2019 Kalle-24 2 5.562 10.03.2020, 16:50
Letzter Beitrag: Kalle-24
  pdf-Problem - Foto wird körnig adelmann-grafen 14 6.705 19.04.2018, 11:16
Letzter Beitrag: adelmann-grafen
  Problem bei Lizenzierung landbastler 0 2.612 05.10.2017, 18:36
Letzter Beitrag: landbastler