Thanks Edgar. All working :)
>Jos, I am not sure about images to the clipboard. Are these in your cursor? I think it would work anyway with this example
>this is the way I do it
>
>
>PUBLIC loExcel AS "excel.application"
>LOCAL loWorkBook, loRange
>loExcel =CREATEOBJECT("Excel.Application")
>WITH loExcel
> loExcel.Workbooks.OPEN(lcDir)
> .DisplayAlerts = .F.
> .VISIBLE = .T.
> .ActiveSheet.NAME = "First Sheet"
> .Sheets.ADD
> .Sheets("Sheet1").SELECT
> .Sheets("Sheet1").NAME = "Second Sheet"
> .RANGE("C8").SELECT
> .ActiveSheet.Paste
>ENDWITH
>SELECT &lcLoginTime
>_VFP.DATATOCLIP(,,3)
>WITH loExcel
> .Sheets.ADD
> .Sheets("Sheet2").SELECT
> .Sheets("Sheet2").NAME = "Third sheet"
> .RANGE("C8").SELECT
> .ActiveSheet.Paste
> .COLUMNS("D:D").SELECT
> .ActiveWorkbook.SAVE()
>QUIT
>ENDWITH
>
>
>
>>Hi All
>>
>>I want to put various content, some text, some graphic images, into consecutive worksheets of a new spreadsheet. I was thinking of automating the creation of a new xls file, copying the text (or the image) to the clipboard and then adding a worksheet, and then pasting the clipoard into the worksheet, then repeat for each block of text or image that I want to put into the excel file. How does one;
>>
>>a) create a new worksheet,
>>
>>b) paste the contents of the clipbaord into the worksheet created above
>>
>>I could work it out with intellisense but I'm looking for best practice and suggestions as I need this ready for a presentation Monday morning :)
>>
>>Thanks.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.