Mike Lewis
Programmer
Alastair,
This is certainly possible.
How much do you already know about Word Automation? If I give you a starting point here, will you be able to figure it out? Or do you need an explanation from first principles?
I'll assume for now that you know how to get an object reference to your Word document. Here's how you can get the date out of the table:
Does this help at all? If you need more detail, just shout.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips, training, consultancy
This is certainly possible.
How much do you already know about Word Automation? If I give you a starting point here, will you be able to figure it out? Or do you need an explanation from first principles?
I'll assume for now that you know how to get an object reference to your Word document. Here's how you can get the date out of the table:
Code:
* Assume date is in first table in the doc
loTable = loDoc.Tables(1)
* Assume day, month, and year are in row 1, cols 1 - 3
lnDay = loTable.Cells(1,1)
lnMonth = loTable.Cells(1,2)
lnYear = loTable.Cells(1,3)
lcDate = TRANSFORM(DATE(lnYear, lnMonth, lnDay))
* We now have the date. Now it's just a question
* of choosing where we want to put it. Assume
* we'll insert it at start of doc:
loRange = loDoc.Range(1)
loRange.Text = lcDate
Does this help at all? If you need more detail, just shout.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips, training, consultancy