>I need to print Mailmerge letters from VFP, sending the DBF to use, All OK.
> I have ceratin information that is constant for all letters of this run,
> but vary by run, such as dates, contact person, etc.
> I would like to not have to add this info to the DBF i am sending
> and I would not want that WORD should prompt for this info.
>
> Can I set a fillIn or bookmark, WORD should NOT prompt for this info,
> But at run time I would pass this information.
>
> Thanks
> Shlomo.
You could have variable fields in word and set them from VFP. To set them you would use (it doesn't ask - DOCVARIABLE "VarName" \* MERGEFORMAT - created with Insert\Fields\Document Automation\DocVariable) :
_SetVar("myVar","Some Value")
FUNCTION _SetVar
LPARAMETERS tcVarName, tcVarValue
.Variables(tcVarName).value = iif(empty(tcVarValue)," ",tcVarValue)
Also you could use bookmarks :
with toWord.ActiveDocument
.Bookmarks(tcBookmarkName).Select
WITH toWord.Application.Selection
.Collapse(wdCollapseEnd)
.Text = "Whatever text"
...
But personally if they're constant per run I wouldn't even keep a template and write "whole letter" on the fly from VFP or I would choose the option to have them as mergefields also.
Cetin