Home > Archive > FoxPro Help and Support > July 2005 > AUTOMATE SHEET TO WORD









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author AUTOMATE SHEET TO WORD
Steven

2005-07-26, 7:24 am

Hi,

I want to copy data from my excel sheet to a word document (pocket
worddocument (psw type)
but I get 2 error messages the first when I try to paste and a second when
I try to save the document. Can someone help me with the good code ?

objXLsheet=CreateObj
ect("Excel.Sheet")
objXLsheet.application.visible=.T.
.........
OBJXLSHEET.cells.copy
objWDdoc=crea("word.basic")
objwddoc.appshow
objwddoc.filenewdefault

??????????????? ERRORS ?????????
objwddoc.paste
objwddoc.SaveAs("DETAIL.psw",103,.F.,"",.T.,"",.F.,.F.,.F.,.F.,.F.)


Dan Freeman

2005-07-26, 11:25 am

The preferred automation server is word.application over word.basic.
Word.basic is included for backward-compatibility and isn't always the most
reliable way to get things done.

Dan

Steven wrote:
> Hi,
>
> I want to copy data from my excel sheet to a word document (pocket
> worddocument (psw type)
> but I get 2 error messages the first when I try to paste and a second
> when I try to save the document. Can someone help me with the good
> code ?
>
> objXLsheet=CreateObj
ect("Excel.Sheet")
> objXLsheet.application.visible=.T.
> ........
> OBJXLSHEET.cells.copy
> objWDdoc=crea("word.basic")
> objwddoc.appshow
> objwddoc.filenewdefault
>
> ??????????????? ERRORS ?????????
> objwddoc.paste
> objwddoc.SaveAs("DETAIL.psw",103,.F.,"",.T.,"",.F.,.F.,.F.,.F.,.F.)



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com