Here is the code for checking a document into the vault. Anything in italics has to be coded in. When using API to check documents into Workgroup you it won't catch the metadata automatically so you would need to use the code to capture those values and use them in the PDMWConnection::CheckIn arguments.
Dim connection As PDMWConnection
Dim doc As PDMWDocument
Dim prop As PDMWProperty
Set connection = CreateObject("PDMWorks.PDMWConnection")
connection.login username, password, pdmw server name
'Enter your PDM Login details above, "username", "password", "pdmserver"
Set doc = connection.checkIn(document path, project, number, description, notes, revision option, revision to use if option "Other" specified, lifecycle status, retain ownership, references)
Here is the API help section related to this topic: http://help.solidworks.com/2017/english/api/pdmworksapi/PDMWorks.Interop.pdmworks~PDMWorks.Interop.pdmworks.IPDMWConnection~CheckIn.html
Are you using PDM standard or Pro?
Yes this can b done as far as I understand but I do not have anything available at the moment. I'll see if I can find something.