>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