>Hi Hilmar,
>
>To be honest, I haven't done anything like this before. So, how should I proceed? I have a document. This document contains some variable information, like Date and some other fields. So, I choose Save as ... option, choose Template, but I guess, I need to insert something. I found MailMerge and MergeField. Is it what I need? Could you please provide more guidance?
MergeField, etc. are for MailMerge - when you have variable data in a table.
In the simplest case, a template is a text which you use as a starting point (advanced templates can also have formatting information and Word macros, but you don't need this for now).
I didn't do exactly what you need - but I think I would insert placeholders for variable information with special symbols. I will assume a letter, but you can extend this logic to any sort of document:
(This is the Word document)
Boston, *Date*
Dear *Name*,
We appreciate your generous donation of *Amount*, which will assuredly be a great help towards our Noble Cause.
Regards,
Nadya
The document above should be saved as a template (donation.
dot)
Then, create a document based on the template. Don't press the "New Document" button on the toolbar, since this will create a document based on the
normal template. Instead, use the command "File | New" (?), and select the "donation" template.
Then, search on *Name*, etc., and use the insert command to insert the variable texts.
That should be fairly easy. For the automation part, save a macro, do all of the above, and look at the generated code. Try to convert it to VFP.
HTH.
Do you need help in getting started with automation? That is, getting a document reference?
... Well, I'll leave soon, and be back tomorrow in the early morning, at 11:00 UTC.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)