Page 1 of 1

OLE + Word

Posted: Sun Mar 21, 2010 10:23 pm
by jas_sierra
Greetings, I need to print a document type (constancy of study) taking data from a table .DBF, I use the MiTPrint library but does not allow me justify the text, I have been looking but not print using word that combines achievement information in the table with the text, if I do it manually in the word can do but since I did not apply because I could not know the commands needed, if any of you has done something similar I appreciate your help and an example to guide me to solve the problem, thanks for your time.


Saludos, necesito imprimir un documento tipo (constancia de estudio) tomando los datos de una tabla .DBF, utilizo la libreria MiTPrint pero no me permite justificar y por ello la descarte, he estado buscando como imprimir utilizando word pero no logro que se combine la información de la tabla con el texto, si lo hago de forma manual dentro del word lo puedo hacer pero desde la aplicación que hice no he podido debido a que no conozco los comandos necesarios, si alguno de ustedes ha hecho algo similar agradezco su ayuda y un ejemplo que me guie para solucionar el problema, gracias por su tiempo.

Juan A. Sierra S.
Barinas - Venezuela

Re: OLE + Word

Posted: Mon Mar 22, 2010 1:13 am
by Vanguarda
Hi my friend,

Please, so kind, see an sample in "C:\hmg\SAMPLES\OLE".

I hope that help.

My best regards,

Re: OLE + Word

Posted: Mon Mar 22, 2010 4:30 am
by sudip
Hello,

IMHO, it will be better to copy the text to clip board and then paste it to any word processors - MS-Word, Open Office Write etc. So that, your app can be used in any computer, where there is no MS Office. And your app will not depend on MS Word :)

Please correct me, if I can't understand your problem. :)

With best regards.

Sudip

Re: OLE + Word

Posted: Mon Mar 22, 2010 5:50 am
by Rathinagiri
I think that, our friend wants to justify both the right and left side while printing the text/paragraph stored in a dbf table.

IMHO if we can create the logic to justify the text, it can be used in the printing function itself. Then, we don't need OLE/Word.

Re: OLE + Word

Posted: Mon Mar 22, 2010 11:36 am
by tave2009
Hola Juan Sierra,
Fijate en este ejemplo que adjunto.
Basicamente reemplaza lo que esta entre "[]" (corchetes) por los datos de la tabla que utilises, luego lo abres con "word" y desde alli lo imprimes.
Es para la "hmg extendida". Supongo que con pocas modificaciones, deberia funcionar para la hmg oficial.
útiliza un archivo "rtf" muy simple de hacer con "word". No necesitas usar OLE ni nada de eso.!
Espero que sea lo que buscas.
Saludos !
Walter

Re: OLE + Word

Posted: Mon Mar 22, 2010 11:54 am
by esgici
rathinagiri wrote:IMHO if we can create the logic to justify the text, it can be used in the printing function itself.
Hi Rathi

This will be wonderful :D

Regards

--

Esgici

Re: OLE + Word

Posted: Wed Mar 24, 2010 5:55 pm
by jas_sierra
Saludos gracias a todos por su atención e ideas para solucionar el problema, el amigo tave2009 aporto la solución en función de mis necesidades, nuevamente mil gracias por su atención.

SET "http://translate.google.co.ve" ON

Greetings thank everyone for their attention and ideas to solve the problem, the friend tave2009 provided the solution according to my needs, again many thanks for your attention.