Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a logo to an Excel spread sheet
Message
From
10/07/2003 10:40:45
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Adding a logo to an Excel spread sheet
Miscellaneous
Thread ID:
00808850
Message ID:
00808850
Views:
73
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.....
Next
Reply
Map
View

Click here to load this message in the networking platform