Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exporting db text to Word with styles
Message
De
09/06/1999 04:01:17
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
07/06/1999 13:42:25
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00227117
Message ID:
00227792
Vues:
19
>I've got a database containing snippets of text needed for a tech doc being produced in Word. We're looking for a way to export specific fields/records of the database to the Word doc. We've been tinkering with mailmerges in Word, which might word, but what would seem a better solutionis if we could somehow embed codes in the database text fields that Word would recognize as bookmarks or styles instead of text. eg. field contents would be something like:
>
>"[Heading 1]This is some text that should go in the Word document."
>
>and "This is some text that should go in the Word document." would print in the Word doc with [heading 1] style applied to the text.
>
>Anyone heard of anything like this? Or is this just wishful thinking?
>
>thanks!
>
>Mandy
Mandy,
Never tried but think [heading 1] or similar field code formatting wouldn't be interpreted as field codes by word. I think it would get them literally. You could format via OLE automation but would be time consuming to implement code that would parse and apply necessary word commands. If your styles are generally in the format [heading 1]...[body text] then I would prefer having those sections separately as fields (heading1...bodytext) in VFP. Then you would only create manually or via automation just one mailmerge template file and mailmergetodoc. Later you could even remove pagebreaks between each indiviual merge if you want (each record would be an indiviual merge).
Or w/o mailmerge you could scan...endscan and insert into word with formatting. IMHO this approach would not only be longer to code but extremely slower than mailmerge approach.
There has been several threads about merging to word + there's a mailmergetoword class in files\classes section with a sample form demonstrating with and w/o a template file.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform