Information générale
Catégorie:
COM/DCOM et OLE Automation
Try to use parameters. It works for me:
....
oWord.ActiveWindow.Close(0) && close document, do not save or as needed
oWord.Quit(-1) &&save it, though not quite clear what to save if document already closed
....
>hello all -
>
>This might be as much a Word question as a VFP question, but here it is.....
>
>My VFP app fires up Word97 and the user types in stuff.
>When done typing, user clicks my Word tool bar button that runs
>my Word macro. My Word97 macro just selects ActiveDocument.WholeStory,
>cuts it to the clipboard, and closes Word.
>
>Now, back in my VFP application the user clicks on an RTF control.
>The click event pastes the clipboard contents into the RTF control,
>and this has been working just fine for about a year.
>
>
>Now, I enhanced the template and added Form elements to the Word template.
>
>The user still clicks on the toolbar button to invoke the macro that
>copies to the clipboard and quits windows. But now, it won't paste
>to the RTF control.
>
>Ten minutes ago, i was going to guess that it say i thought the reason
>was because of unsupported clipboard formats related to the RTF control.
>
>But i opened a new document and performed all the steps manually.
>When i quit Word, it says i put "a large amount of stuff" on the clipboard
>and asks if i want to save it.
>
>That does not show up when i run this programatically. Does anyone
>know how i could exercise that option when using ole automation ?
>
>(sorry this is so 'wordy' :)
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement