Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Adding a logo to an Excel spread sheet
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement