Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Write my invoices in Word?
Message
De
09/11/1998 03:56:46
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00155639
Message ID:
00155644
Vues:
21
>Hi,
>
>I've been able to achieve some results with Word, things like merge letters a.s.o. Now I'd like to push my knowledge a bit further and print an invoice, with a nice header, detail lines and a nice footer.
>
>I know how to resolve the header and (propably) the footer parts. But for the lines, I need to build a table (in Word parlance). I gathered code from here and there and have a general idea of how to achieve that.
>
>But there are a few points that I need to resolve. How can I make sure that the table starts always at the exact same place on the paper sheet? And how do I handle multiple page invoices?
>
>Before reinventing the wheel, I'd like to know your suggestions.
>
>José
Jose,
There is some detailed stuff concerning mailmerge in another thread "Word Manipulation Through VFP". For invoice I would create a template file which has header, footer, company logo etc are already set in font and style of your choice + keep any static+one per invoice mergefield in header+footer area of word. This would provide a way to keep the table always start at a certain place (and end at a certain place per page). Pagetotal etc then could be in word-footer area freely manipulated. You could have "variables" for dynamic data in header and footer part and just change variable value. (oWord.variables("myvariable").value = newValue).
And with selinfo(6) (word.basic - works in both word95 and 97) give vertical position. With it you could start to insert detail rows and when reached a certain point insert some other data (ie: pagetotal). Also if you knew how many rows a page would hold at max you could insert tables split per page.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform