Receive method in VB - Corrected

Oops! I sent the function call but not the function code which calls BO. If you don’t change doc domains you can drop that code.

The code I use daily on BO 4.1.5 is:

If RetrieveDocument(sDrvDocName, DOC_DOMAIN) = False Then
MsgBox "An error occurred retrieving " &
sDrvDocName & “.”, vbCritical
CloseApplication
End If

The function
Function RetrieveDocument(sDrvDocName as String, DOC_DOMAIN as String) as Long

'Save current Universe
BOApp.ExchangeMode = RepositoryMode
sOldUniv = BOApp.ExchangeRepository
’ switch to new Universe
If Len(DOC_DOMAIN) ) Then
BOApp.ExchangeRepository = DOC_DOMAIN)
End If

'Save current Universe
BOApp.ExchangeMode = RepositoryMode
BOApp.Documents.Receive (sDocName)

Where sDrvDocName is a string containing the
Document name and DOC_NAME is the name of the Document
domain.

=====
Philip Biancucci
Data Warehouse Project Leader
LINC Systems, Corp.
W: 860/715-2053
VM: 781/890-1003 x 7404
EM: pbiancucci@lincsys.com
pbiancucci@yahoo.com
__________________________________________________ Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com


Listserv Archives (BOB member since 2002-06-25)