Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy contents of a general field into the clipboard
Message
De
10/03/2001 12:30:37
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00481684
Message ID:
00483819
Vues:
9
Hey Dave,

>Thanks for the reply John.... don't think our pathes have crossed since Palm Springs.

Yep!

>Turns out the line I really needed from you was the OLEBound.content.copy which either upsets me because I could not find it in the documentation of the OLEBoundControl or that is was not there.... thanks!

Of course not. Because .Content.Copy is a method of the host application, which is Word and is not intrinsic to the OLEBoundControl. See?

>BUT, a new problem has surfaced. You will notice in the following code block that I do create the form, control, populate it and copy it to the clipboard. The process then uses my custom OLEcontrol to open Word, Open a template, find a bookmark, paste....blah, blah,blah and ends up putting the final clipboard into a patient file. Here's the problem: when Word fires up (.WordStart which uses CreateObject(word.application) or GetObject(,"word.application)) it mysteriously adds a document (Word 2000) with the contents of the clipboard in it (nasty format I might add). I thought this had to do perhaps with the native action of the OLEBoundControl so attempted to use the DoVerb() to stop the unwanted extra document window...to no avail.

Huh? That's pretty weird. Perhaps there is a global setting in Word doing that, because CREATEOBJECT("Word.Application") should just create an instance of Word that is not even visible. No document should be there unless you open or add one to the Documents collection....ahhh...the Droedge class (see below).

>Try two was to simply go with it and try to close the extra document ("ActiveDocument" tried) but it was not happy either
>
>Any ideas on getting rid of the extra document without closing Word and re-starting which is not an option for other reasons? One posibility might be to cycle somehow through all documents it thinks is open and issue close statements?

What is the Droedge custom class stuff? Try replacing that with just good
ol' Word.Application. That .WordStart method may be the problem.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform