Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Paste into Word/Excel
Message
De
21/05/1999 01:27:13
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
21/05/1999 01:19:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00220285
Message ID:
00221253
Vues:
17
If VFP opened the excel then you would store the oExcel obj.ref. and call other pasting routines whenever you want as you would do with a regular VFP form.
If Excel is opened outside of VFP then there starts the problem and you would need DDE (I haven't coded a single line of DDE for a long time).
Cetin
>Hi Cetin, thanks a lot for the advise.
>How could I paste into a already opened Word/Excel where the last cursor
>position was? As your code will always open a new document/sheet, then paste.
>Thanks in advance.
>
>>>I need to copy a field from a table and paste it into either Word
>>>or Excel document being opened.
>>>
>>>I used _CLIPTEXT = ALLTRIM(table.field) to copy into memory.
>>>How could I paste it "automatically" on where the last cursor being
>>>placed on the Word/Excel document? Could anyone share with me on the
>>>links needed and the syntax to paste, please. Thank you very much.
>>
_cliptext = "testpaste"
>>oExcel = createobject("Excel.application")
>>WITH oExcel
>>  .workbooks.add && Add a new workbook
>>  WITH .activeworkbook
>>    .activesheet.paste
>>  ENDWITH
>>  .visible = .t.
>>ENDWITH
>>
>>oWord = createobject("Word.application")
>>WITH oWord
>>  .documents.add
>>  .selection.paste
>>  .visible = .t.
>>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
Répondre
Fil
Voir

Click here to load this message in the networking platform