>This is what was in the macro. What would this code be if it were VFP and not VB? I tried this and it doesn't work.
>Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
>Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Jim- wdExtend and wdAlignParagraphCenter are Word constants. You can find the value of these constants in the VBA editor by pressing F2 to open the object browser. Type in the name of the constant you are looking for and when it comes up, click on it. The value will be shown down at the bottom of the browser. After you ahve found the value of these constants, you can use the rules for translating VBA to VFP to get something like:
wdLine = 5
wdExtend = 1
wdAlignParagraphCenter = 1
oWord.Selection.HomeKey(wdExtend, wdLine)
oWord.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
You may have to play with it some to get the order of the parameters right...
HTH
Erik Moore
Clientelligence