Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IMPORT GL TRANSACTIONS INTO ACCPAC VIA MACRO

Status
Not open for further replies.

colham1956

Programmer
Mar 13, 2009
6
0
0
AU
I need to use an Accpac V5.5 macro to import GL transactions into a GL batch. I have compiled the following macro code but it does not work. The XML script reference in the macro code is correct as I can use the Accpac GL Import/Export function to load the XML script and perform the import that way. I have the Accpac Import/Export 1.0 reference turned on for the macro. I am using similar macros to successfully import Account Codes, Account Segments, and Budgets but the GL transactions version (so far) won't work. All responses appreciated!

Sub MainSub()

Dim ReturnValue As Boolean

Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkCmpRW = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)

Dim mDBLinkSysRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkSysRW = OpenDBLink(DBLINK_SYSTEM, DBLINK_FLG_READWRITE)

Dim MyImport As AccpacImportExport.ImportExport
Set MyImport = New AccpacImportExport.ImportExport

MyImport.Open mDBLinkCmpRW

MyImport.ImportAction = IMPORT_INSERT_AND_UPDATE
MyImport.SetView "GL0008", "", VIEW_FLAT, Null
MyImport.SetView "GL0006", "", VIEW_FLAT, Null
MyImport.SetView "GL0010", "", VIEW_FLAT, Null
MyImport.SetView "GL0402", "", VIEW_FLAT, Null
MyImport.ExecuteImportScript "C:\Temp\GENLEDTRA.xml", ReturnValue

MyImport.Close

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top