6 Replies Latest reply on Oct 17, 2016 8:03 AM by Yong Ning

    How can I save custom properties (drawing) in a pdf-file with a macro?

    Thomas Schmidt



      I use the following macro to create a pdf file. I want to implement the custom properties from my drawing also into the pdf file.

      Who can help me in adapting my macro?


      Option Explicit

      Dim swApp As Object

      Dim Part As Object

      Dim boolstatus As Boolean

      Dim longstatus As Long, longwarnings As Long

      Dim Filename As String


      Sub main()


      Set swApp = _



      Set Part = swApp.ActiveDoc

      Dim myModelView As Object

      Set myModelView = Part.ActiveView


      Dim oModelDoc As ModelDoc2

      Set oModelDoc = Part


      Filename = oModelDoc.GetCustomInfoValue("", "Filename")


      longstatus = Part.SaveAs3("C:\Output\" & Filename & ".pdf", 0, 2)

      End Sub


      Many thanks for your help