DoCmd.PrintOut error with Access97 under XP



Hello
I am in charge of a middleware application written in VC++ 6 that
spawn Access97 mde files to collect information, and have to be
printed. The whole application worked OK under Windows NT 4. When run
directly from Access 97 under XP, the DoCmd.Printout command executes
smoothly.
But inside the application, the DoCmd.PrintOut command fails with the
following error :
"There was a problem in retrieving printer information for the
<printerName> in <portname>"

The VC++ code that spawns the Access 97 database is as following :

if( ! m_IAccess.CreateDispatch(OLEDISPATCH_ACCESS) ) {
....
return;
}
m_IAccess.OpenCurrentDatabase(sFilename, FALSE);
...
m_IAccess.Run();
...
m_IAccess.Quit();
m_IAccess.ReleaseDispatch();

I can't understand the reason why it works outside of the application
but fails when executed as shown. Any clues ? Thank you in advance

Manuel

.