PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → WD.. and OLE  Automation / VB
WD.. and OLE Automation / VB
Débuté par Heinz Kübler, 15 déc. 2004 22:22 - 2 réponses
Posté le 15 décembre 2004 - 22:22
Hi,
I get stuck with my OLE Code and i think its more a VB question than a WD one
In VB its :
Selection.Range.PasteSpecial DataType:=wdPasteText

The problem is how to give in WD the wdPasteText argument ?

wdPasteText is a VB constant but i cant find the corresponding value in the VB Help
any hints are welcome
Posté le 15 décembre 2004 - 23:56
I don't know if it works but try.
Selection>>Range>>PasteSpecial("DataType")=wdPasteText

or take a look at this, some examples to give an idea of possible syntaxes
xl>>activesheet>>shapes("Graphique 1")>>top = 20
xlchart>>setsourcedata((xl>>worksheets("Feuil1")>>range("A1:F10)),1)
Posté le 16 décembre 2004 - 10:41
Have a look at the Microsoft Visual Basic Editor for Word: create a macro and you will see that the value of wdPasteText=2
Selection.Range.PasteSpecial DataType:=2
René

Hi,
I get stuck with my OLE Code and i think its more a VB question than a WD one
In VB its :
Selection.Range.PasteSpecial DataType:=wdPasteText
The problem is how to give in WD the wdPasteText argument ?

wdPasteText is a VB constant but i cant find the corresponding value in the VB Help
any hints are welcome