Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

I know this thread is old but this is what I have so far and it works well but I cannot get it to work for different types of files. I want this to run through everything I have open be it drawings, assemblies, and parts and check them all in. Does anyone know how to make this happen?

'comment prompt
CommentBox = InputBox("Leave a Vault check-in comment bellow", "Vault Check-in Comment", "Default Entry")

If CommentBox = ok Then
	
	Return
	
Else
	
	Dim oDoc As Inventor.Document
	For Each oDoc In ThisApplication.Documents.VisibleDocuments
	
				oDoc.Save
				'Check In dialogbox
				ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop").Execute2(False)
				'inputs user comment and selects ok
				System.Windows.Forms.SendKeys.SendWait(CommentBox & Chr(9))'& vbCrLf
		Next 
		ThisApplication.CommandManager.ControlDefinitions.Item("AppFileCloseCmd").Execute

End If

MessageBox.Show("Vault Check-in Compleate", "Vault")