General information
Category:
Coding, syntax & commands
Addpicture requires more parameters:
expression.AddPicture(FileName, LinkToFile, SaveWithDocument, Left, Top, Width, Height)
Add them or try this instead:
objBook.Worksheets(2).Pictures.Insert(CSCLogo)
>Hello All,
>
>I'm trying to add a logo (.gif) to an Excel spreadsheet - from VFP of couse.
>
>The following code throws an error: Variable does not equate to an object.
>
>CSCLogo = "E:\CVS3\Other\LOGO_SIZE1.GIF"
>.Shapes.AddPicture(CSCLogo, .T., .T., )
>
>The above code is taken right out of my "Microsoft Office Automation with VFP" book, page 213. Obviously I've missed something. I'd appreciate it if someone can help me with the syntax here. TIA.
>
>Paige
>
>More complete code follows:
>
>
> oWorkbook = oExcel.Workbooks.open(ExportPath)
> WITH oExcel
> && Insert 3 rows:
> .Cells(1,1).Value=[Insert row above this line]
> .Range("A1").Select
> .Selection.EntireRow.Insert
> .Range("A2").Select
> .Selection.EntireRow.Insert
> .Range("A3").Select
> .Selection.EntireRow.Insert
> .Range("A4").Select
> .Selection.EntireRow.Insert
>
> && Insert 2 line title:
>
> .Range("F1").Value = "INSUFFICIENT DATA REPORT"
> CSCLogo = "E:\CVS3\Other\LOGO_SIZE1.GIF"
> .Shapes.AddPicture(CSCLogo, .T., .T., )
> .Range("F2").Value = " For"
> .Range("F3").Value = lcCli_Name
> && Replace column headings and adjust size:
> .Range("A5").Value = "Client"
>ETC.....
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only