Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Export to WORD
Message
De
15/04/2002 12:37:25
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
15/04/2002 12:05:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00644987
Message ID:
00645058
Vues:
14
>Cetin,
>
>I have only a single EMPLOYEE.dbf and don't need *.dbc in th cDSN, How can I
>modify your codes to insert two fields such as Empno, Name to export to WORD,
>in the line
> .range.insertdatabases(,,,cDSN,lcSQL) should be changed to accept only Empno,Name fields
>
>Please correct your code to do this.
>TIA
>Paul
use employee
lcTemp=sys(2015)+'.txt'
copy fields empno, name to (lcTemp) type csv
lnFields = 2
_ClipText = chrtran(FileToStr(lcTemp),'"','')
erase (lcTemp)
#define wdSeparateByCommas  2

oWordDocument=createobject("word.application") && Create word object
WITH oWordDocument
  .documents.add && New file
  WITH .ActiveDocument
    .Range.Paste
    .Range.ConvertToTable(wdSeparateByCommas,,lnFields)
  ENDWITH
  .visible = .t.
  .Activate
ENDWITH
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform