Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a logo to an Excel spread sheet
Message
De
10/07/2003 10:40:45
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Adding a logo to an Excel spread sheet
Divers
Thread ID:
00808850
Message ID:
00808850
Vues:
76
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.....
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform