'MS Excel object variables
Dim objExcel As Excel.Application
Dim objWorkBook As Excel.Workbook
Dim objWorkSheet As Excel.Worksheet
Set objExcel = GetObject
("", "excel.application") ' Start the excel COM
Set objWorkBook =
objExcel.Workbooks.Add ' Start a workbook.
objExcel.DisplayAlerts =
False ' Turn off the alerts
Do While objWorkBook.Worksheets.Count >
1 ' keeps only one worksheet in the workbook
Set objWorkSheet = objWorkBook.Worksheets.Item
(objWorkBook.Worksheets.Count)
objWorkSheet.Delete
Loop
Set objWorkSheet =
objExcel.ActiveSheet ' Set objWorksheet to
the remaining worksheet.
objExcel.Visible = True
objWorkSheet.Pictures.Insert
("C:\Pic1.Jpg") ' Insert a picture
'scale picture
objWorkSheet.Pictures("Picture 1").Width = 200
objWorkSheet.Pictures("Picture 1").Height = 200
objWorkSheet.Pictures("Picture 1").Top = 200
objWorkSheet.Pictures("Picture 1").Left = 100