In your code, in the begin I put:
'-----
TOP:
'-----
And before oQueue.MergeAllJobs, I put:
'-----
Dim Return As Integer
If oQueue.Count < 2 And Return < 6 Then
oQueue.Clear
oQueue.ReleaseCom
Return = Return + 1 'count the number of times this action returned without proceeding
GoTo TOP
ElseIf Return >= 6 Then
MsgBox "The merge PDF return a error."
MERGED_FILE = "C:\ERROR_MERGE.pdf"
End If
'-----
I chose 6 times to avoid looping forever and because I think of merges involving more than 2 files.
As the error occurrence pattern is every 2 times, on the first return, at most, the queue is already correctly defined.
With this, you do not need to quit Excel every 2 times to avoid the error.
P.S.: Change:
'-----
wait for jobs for 15 seconds
If oQueue.WaitForJobs(2, 15) = False Then
MsgBox "The jobs didn´t arrive"
oQueue.ReleaseCom
Exit Sub
End If
'-----
for:
'-----
oQueue.WaitForJobs 2, 15
'-----