>If I want to add the picture to an existing word document template do I just put the path between the brackets in documents.add().
To create a NEW Word Document based on NORMAL.DOT
oWord = CREATEOBJECT('Word.Application')
oWord.Documents.Add()
TO add a picture to the Active Document
oWord.ActiveDocument.Selection.InlineShapes.AddPicture( cFileName, lLinkToFile, lSaveWithDocument)
where cFileName is the full path to the picture file,
lLinktofile = .F. and lSaveWithDocument = .F.
>Basically I have a word document which needs the map and the customer name and address - which I have in a table.
To enter text into the word document
oWord.Selection.TypeText(ALLTRIM(Company.cFirstName))
>This data also has to fit into certain parameters as there is pre-printed media with gaps in for the data. Also the word document might need to be A3.
To change Paper size try
With oWord.ActiveDocument.PageSetup
.PageWidth = InchesToPoints(11.69)
.PageHeight = InchesToPoints(16.54)
EndWith
>Does this code create an amendable word document with the data linked to it just like a normal mail merge?
The data will not be linked. You are basically building a new Word Document evertime use oWord.Document.Add()
>Sorry if I sound like a total moron but this is the most complicated thing I've had to do in Fox and it's a few months since I used it at all.
To link the data you could walk thru the MS Word Mail Merge Wizard and link it to a table you create on the hard drive.
1. Create table
2. Populate siad table
3. Run the Masil Merge Wizard
- jim durkin
"The universe is a big place, perhaps the biggest." Kurt Vonnegut