Private Sub Command1_Click()
On Error Resume Next
Dim objApplication As SolidEdgeFramework.Application
Dim objSolidEdgeInsightXT As SolidEdgeFramework.SolidEdgeInsightXT
Set objApplication = GetObject(, "SolidEdge.Application")
Set objSolidEdgeInsightXT = objApplication.SolidEdgeInsightXT
Dim NumberOfDocumentsFoldersToImport As Long
Dim ListOfDocumentsFoldersToImport(0) As Variant
Dim UserName As String
Dim Password As String
Dim Group As String
Dim Role As String
Dim DBURL As String
Dim bImportAsPrecise As Boolean
NumberOfDocumentsFoldersToImport = 1
ListOfDocumentsFoldersToImport(0) = "D:\import"
UserName = "username"
Password = "password"
Group = "Engineering"
Role = "Designer"
DBURL = "http://server:port/tc"
bImportAsPrecise = False
Call objSolidEdgeInsightXT.ImportDocumentsToServer(NumberOfDocumentsFoldersToImport, ListOfDocumentsFoldersToImport, UserName, Password, Group, Role, DBURL, bImportAsPrecise)
Set objSolidEdgeInsightXT = Nothing
Set objApplication = Nothing
End Sub