Option Explicit On
Sub Example()
Dim objApplication As SolidEdgeFramework.Application
Dim objTCE As SolidEdgeFramework.SolidEdgeTCE
Dim NumberOfDocumentsFoldersToImport As Long
Dim ListOfDocumentsFoldersToImport(0) As Object
Dim UserName As String
Dim Password As String
Dim Group As String
Dim Role As String
Dim DBURL As String
Dim Precise As Boolean
objApplication = GetObject(, "SolidEdge.Application")
objTCE = objApplication.SolidEdgeTCE
NumberOfDocumentsFoldersToImport = 1
ListOfDocumentsFoldersToImport(0) = "D:\import"
UserName = "username"
Password = "password"
Group = "Engineering"
Role = "Designer"
DBURL = "http://server:7001/tc"
Precise = True
Call objTCE.ImportDocumentsToServer(NumberOfDocumentsFoldersToImport, ListOfDocumentsFoldersToImport, UserName, Password, Group, Role, DBURL, Precise)
If Not objApplication Is Nothing Then
Call objApplication.Quit()
End If
objTCE = Nothing
objApplication = Nothing
End Sub