Workgroup PDM API hang-up

I am writing a macro to grab pdfs from vault and put them into a network folder at check-in. I am heavily borrowing code from the numerous workgroup pdf macros, namely the one found here: https://forum.solidworks.com/message/264677

The problem I keep running into is the macro freezes and solidworks freezes at the same line of code. Below is the basic starting structure of the code:

Option Explicit

Dim swApp As Object

Sub main()

    Dim connection As PDMWConnection

    Set connection = CreateObject("PDMWorks.PDMWConnection")

    connection.Login "xxx", "xxx", "xxx"

    Dim alldocs As PDMWDocuments

    Dim doc As PDMWDocument

    Set alldocs = connection.Documents

The code consistently hangs up and freezes on the red bolded text, when I've seen other people say that they can run the macro to export their entires vaults pdfs in under a minute. Does the size of our vault make a difference? Does anyone else experience this hang-up?


SolidworksWorkgroup Pdm