AnsweredAssumed Answered

Multi epdm background processes with work vba

Question asked by Enrico Camusso on Jan 13, 2020

Hi to All,

I've write a macro in VBA Word that make a copy of the word file in other epdm directory.

After  I launch this macro if I look the task mananger I have 3 backgroud istaces of epdm

When the macro make a copy of the file the istances are 12.

If I run the same macro in Solidworks the istance remain 3.

There are a solution? 


Option Explicit
Global eVault As IEdmVault18
Global originFolder As IEdmFolder10
Global idFile As Long
Global errorCode As Long
Global newfile As IEdmFile12
Global originFolderName As String, filename As String
Global files As EdmAddFileInfo
Global filenew As String

Sub start()
originFolderName = "C:\ePDM\doc\Development\Test"
filenew = "Test.docx"
files.mbsPath = "C:\ePDM\doc\Templates\logbook.docx"
files.mbsNewName = filenew
Call LoginToVault
Call newFiles

End Sub

Sub LoginToVault()

Set eVault = New EdmVault5
Call eVault.LoginAuto("Inpeco", 0)

End Sub
Sub newFiles()

Set originFolder = eVault.GetFolderFromPath(originFolderName)
idFile = originFolder.AddFile2(0, files.mbsPath, errorCode, files.mbsNewName)
Set newfile = eVault.GetObject(EdmObject_File, idFile)

End Sub


Thanks to All