Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can not print from MailMerge
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01352395
Message ID:
01352482
Vues:
22
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I'm getting this error from MailMerge
>
>OLE IDispatch exception code 0 from Microsoft Word: Windows cannot print due to a problem with the current printer setup.
>Try one or more of the following:
>* Check the printer by printing a test page from Windows.
>* Make sure the printer is turned on and online.
>* Reinstall the printer driver...
>
>I can print from Word on this printer OK. I can not figure out how to fix this problem and I really need this to be done!
>
>The error comes on this line
>
>
>objWordDoc.MailMerge.Destination = 0 && wdSendToPrinter = 1
>
>	objWordDoc.MailMerge.Execute
>	objWord.application.Options.PrintBackground = .f.
>*-- get current active printer
>	lcActivePrinter = objWord.application.ActivePrinter
>*--  set active printer
>	objWord.ActivePrinter = lcPrinter
>	objWord.application.ActiveDocument.PrintOut() && Error here
>*-- set current active printer back to original
>	objWord.ActivePrinter = lcActivePrinter
>
>	objWord.ActiveDocument.saveas(lcDocFileName1)
>	objWord.ActiveDocument.close()
>*--quit without saving any changes
>	objWord.quit(0)
>	=Sleep(1000)
>
>commenting out playing with the printer doesn't help. Any other ideas how to make it work?
>
>Also I tried to do mailmerge manually using the Word file and the generated Excel and can not make it work either.
>
>Thanks a lot in advance.

Uninstall and reinstall printer.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform