Private Sub UserForm_Initialize() Dim oApplication As Inventor.Application ' Obtain the Inventor Application object. ' This assumes Inventor is already running. Set oApplication = GetObject(, "Inventor.Application") ' Set a reference to the active document. ' This assumes a document is open. Dim oDoc As Document Set oDoc = oApplication.ActiveDocument Dim sIpropStatus As String sIprop_Artikel = Property_lesen(oDoc, "Part Number") Input_Artikel.Value = sIprop_Artikel sIprop_Bezeichnung = Property_lesen(oDoc, "Description") Input_Bezeichnung.Value = sIprop_Bezeichnung sIprop_Description = Property_lesen(oDoc, "Designation") Input_Description.Value = sIprop_Description sIprop_Dimensions = Property_lesen(oDoc, "Keywords") Input_Dimensions.Value = sIprop_Dimensions sIprop_Norm = Property_lesen(oDoc, "Standard") Input_Norm.Value = sIprop_Norm sIprop_Bemerkung = Property_lesen(oDoc, "Comments") Input_Bemerkung.Value = sIprop_Bemerkung sIprop_EV = Property_lesen(oDoc, "E/V") If sIprop_EV = "E" Then OptionButton_EV_Ersatzteil.Value = True ElseIf sIprop_EV = "V" Then OptionButton_EV_Verschleissteil.Value = True Else OptionButton_EV_Kein.Value = True End If End Sub Private Sub CommandButton1_Click() Dim oApplication As Inventor.Application ' Obtain the Inventor Application object. ' This assumes Inventor is already running. Set oApplication = GetObject(, "Inventor.Application") ' Set a reference to the active document. ' This assumes a document is open. Dim oDoc As Document Set oDoc = oApplication.ActiveDocument Call Property_setzen(oDoc, "Part Number", Input_Artikel.Value) Call Property_setzen(oDoc, "Description", Input_Bezeichnung.Value) Call Property_setzen(oDoc, "Designation", Input_Description.Value) Call Property_setzen(oDoc, "Keywords", Input_Dimensions.Value) Call Property_setzen(oDoc, "Standard", Input_Norm.Value) Call Property_setzen(oDoc, "Comments", Input_Bemerkung.Value) If OptionButton_EV_Ersatzteil.Value = True Then Call Property_setzen(oDoc, "E/V", "E") Call Property_setzen(oDoc, "s/w", "s") ElseIf OptionButton_EV_Verschleissteil.Value = True Then Call Property_setzen(oDoc, "E/V", "V") Call Property_setzen(oDoc, "s/w", "w") ElseIf OptionButton_EV_Kein.Value = True Then Call Property_setzen(oDoc, "E/V", "") Call Property_setzen(oDoc, "s/w", "") Else MsgBox "Keine Option gewählt bei E/V" End If Dim sIpropStatus As String RsIprop_Artikel = Property_lesen(oDoc, "Part Number") RsIprop_Bezeichnung = Property_lesen(oDoc, "Description") RsIprop_Description = Property_lesen(oDoc, "Designation") RsIprop_Dimensions = Property_lesen(oDoc, "Keywords") RsIprop_Norm = Property_lesen(oDoc, "Standard") RsIprop_Bemerkung = Property_lesen(oDoc, "Comments") RsIprop_EV = Property_lesen(oDoc, "E/V") 'MsgBox ("Artikel: " + RsIprop_Artikel + Chr(13) + "Bezeichnung: " + RsIprop_Bezeichnung + Chr(13) + "Description: " + RsIprop_Description + Chr(13) + "Dimension: " + RsIprop_Dimensions + Chr(13) + "Norm: " + RsIprop_Norm + Chr(13) + "Bemerkung: " + RsIprop_Bemerkung + Chr(13) + "E/V: " + RsIprop_EV) Unload IPropertiesAbfrage End Sub Private Sub CommandButton2_Click() Unload IPropertiesAbfrage End Sub