Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting the active path in EXEC via OLE automation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00336646
Message ID:
00336789
Vues:
31
>Try oleExcel.Application.DefaultFilePath property - Returns or sets the default path that Microsoft Excel uses when it opens files.

Tested more, and really works, I was missing to assing this.

The code that works:

>LOCAL lcorigpath
>1. oleExcel = CREATEOBJECT("Excel.application")
>2. lcorigpath = oleExcel.Application.DefaultFilePath
>3. oleExcel.Application.DefaultFilePath="myfullpath"
>4. RELEASE oleExcel
>5. oleExcel = CREATEOBJECT("Excel.application")
>6. oleExcel.Application.Workbooks.Open("mybook.xls")
>7. oleExcel.Application.DefaultFilePath=lcorigpath
>8. oleExcel.visible = .T.


I explain, at point 4 the changes at Application.DefaultFilePath, are saved, so I must release the object and run it again, as point 7 I go back to the original path.

Anyway I think there must be another property ActivePath? Where can I search more inf regarding this.

Many thanks for the help, problem solved!
Pablo Roca
Clavo Congelados, S.A. (La Coruna - Spain)
Sysop of PortalFox

Join MasFoxPro campaign
http://www.masfoxpro.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform