fields not lined up properly in ms word document

errol

New Member
Hi all,

I am creating an Ms Word document(Invoice) for the first time. For example I am using the following lines in the code to write away the Customer and Delivery addresses. But depending on the length of characters in the fields on the left the fields on the right either gets moved to the left or to the right. In other words the address does not line up properly. Am I leaving something out of the code that resulting in this strange situation, or is their something in the document that needs a bit of tuning?

ch-WordApplication:selection:GoTo(,,,"debname").
ch-WordApplication:Selection:InsertAfter(db-surname).
ch-WordApplication:selection:GoTo(,,,"delname").
ch-WordApplication:Selection:InsertAfter(dn-name).
ch-WordApplication:selection:GoTo(,,,"debaddr1").
ch-WordApplication:Selection:InsertAfter(db-addr1).
ch-WordApplication:selection:GoTo(,,,"deladdr1").
ch-WordApplication:Selection:InsertAfter(dn-addr1)).

I'll appreciate it very much if anybody can help me with this problem.


Regards,

Errol (South Africa)
 
Top