>>>I've a great number of word documents.
>>>I must write a program that ask the user witch document he want and, for each document selected, I must require some parameter, non equal for each document.
>>>At the end, I must create a unique Word document that merge all the ones selected by the user, with the parameters inserted.
>>>
>>>Any suggestion, please ?????
>>>
>>>Thanks, Luca
>>
>>
Luca,
>>There have been many threads in the past regarding word ole. What you want might really be straightforward but I couldn't understand it well. What do you mean by "parameter", a word variable field ? If so :
>>.ActiveDocument.Variables("VarName").value = text
>>Merging is simple, just open the first one, go to insertion point (typically goto "\EndOfDoc" bookmark -or :
>>.ActiveDocument.Content.Select
>>.Application.Selection.Collapse(wdCollapseEnd)
>>.InsertFile(...)).
>>Cetin
>
>So the only way is to modify all existing document inserting a field for each parameter I have to complete with my VFP program ?
I didn't say something is the only way (that's what I say very rarely when it's fox as in my signature).
I still couldn't understand what you're trying to do. You can add variables to a word doc on the fly (.ActiveDocument.Variables.Add("VarName")).
Cetin