downwitchyobadself
Programmer
Using VBA, I'm running an Accpac macro that spits out an FR report, using code like so
Set MyFRReport = CreateObject("AccpacGL9100.AccpacMacro")
With MyFRReport
.CmdFRSelect strSourceFullFile
'blah blah set properties blah blah
.CmdFRPrintEx2 glnkComp, "file", 1, mstrDestinationPath, strDestFileName, 0
End With
once the session is properly logged (glnkComp is the company file link). On a fresh Windows login, unless a Sage company file is open, I receive a prompt, noting as Server <local machine>, which is wrong, and has nothing to do with the session I opened.
Once I reenter login data manually, it connects and processes properly. The session and company links are definitely open in VBA this entire time.
Also, as soon as Accpac has been opened and closed manually via the interface one time, this stops, i.e. something is happening to instantiate a connection to the proper application server. (It also doesn't happen if a company file is open in Accpac, though just the UI open with no file will cause the prompt.)
How do I instantiate this myself in VBA before executing the Accpac macro?
Thanks in advance for your help.
Set MyFRReport = CreateObject("AccpacGL9100.AccpacMacro")
With MyFRReport
.CmdFRSelect strSourceFullFile
'blah blah set properties blah blah
.CmdFRPrintEx2 glnkComp, "file", 1, mstrDestinationPath, strDestFileName, 0
End With
once the session is properly logged (glnkComp is the company file link). On a fresh Windows login, unless a Sage company file is open, I receive a prompt, noting as Server <local machine>, which is wrong, and has nothing to do with the session I opened.
Once I reenter login data manually, it connects and processes properly. The session and company links are definitely open in VBA this entire time.
Also, as soon as Accpac has been opened and closed manually via the interface one time, this stops, i.e. something is happening to instantiate a connection to the proper application server. (It also doesn't happen if a company file is open in Accpac, though just the UI open with no file will cause the prompt.)
How do I instantiate this myself in VBA before executing the Accpac macro?
Thanks in advance for your help.