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

.



Relevant Pages

  • Re: Some Contradictory Claims in SR:
    ... How do you mark the ends of a moving ... You line up a bunch of trigger counters that look ... for a transition between rod and not-rod within a narrow time gate. ...
    (sci.physics)
  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Re: python 3 constant
    ... is require Python to change to accommodate your need. ... Can you see the slight difference? ... Best regards, ...
    (comp.lang.python)
  • Re: The Sci-Fi Rejection Letter That Time Forgot
    ... nations have stockpiled arsenals of these incredible bombs and the time the story is set. ...
    (rec.arts.sf.written)
  • Re: Wachstumssaison Flieder
    ... Handbreit über dem Boden. ... "Fliederkrimi" am Samstag halten heute meine Nerven nicht aus. ... Dorothee ...
    (de.rec.garten)