integrated with a setparent(handleDesktop, handleMdi) in my mdi-window.
I see multiple possibilities to transfer ...
1. sendmessage / wm_copy / wm_paste to oo-handle (dirty) 2. sendkeys.send("^c/^v") (more dirty) 3. insertTextContent (find no working example)
but no one works
1. The message SendMessage(lv_OO_hwnd_window, WM_PASTE, 0, 0) will not be received from the oo-desktop. The SendMessage(lv_OO_hwnd_window, WM_SYSCOMMAND, SC_CLOSE , 0) works, so the handle must be right. Has the document a other handle like the desktop ? Whats wrong ?
2. The sendkeys-method works, a text will be pasted to the destination-window, but multiple times. Example copy = "Text", paste =>"TextTextText..." The sendkey will only fired one time !!!
3. I can' find the right object for the insertTextContent-Method. What object (oSel) has a text selection ( .currentselection / .getViewCursor) to declare with the .insertTextContent(oVC,oSel,false) . There are many examples for objects=table/field ... but no one for a object that stores all received from getViewCursor.
Another requirement same problem. I want to store a text-selection in a Database and reload it, to insert the selection in a other oo-document.
Have i tomatoes on my eyes . I browse high and low trough the www. Is there a other easy solution i doesn't see ?
Best regards
Michael Herrmann VB.Net
The administrator has disabled public write access.
Re:Copy & Paste by code
Date: 2007/03/19 21:12
By: Michael Herrmann
Status: User
Karma: 0  
Junior Boarder
Posts: 6
Hi Forum,
after checking the windows messages with spy++, the OO-Document has a different hwnd-handle as its own form. When i send a message or postmessage "WM-Paste" to the right handle nothing happens. Same test with Wordpad or Richtextbox or MS-Word works fine. So i think, a windowmessage will not help.
There is left over insertTextContent !
Who has a example for copy a text-selection ( include Grapics, Tables, Fileds ... ) from one oo-document-window into another. There must be a solution.
Please Help !!!
Best regards
Michael Herrmann VB.Net
The administrator has disabled public write access.
Re:Copy & Paste by code
Date: 2007/03/28 14:26
By: Michael Herrmann
Status: User
Karma: 0  
Junior Boarder
Posts: 6
Hi,
i found a solution for my problem. The insertDocumentFromURL-Method inserts a oo-document at the cursorpostion. Easy if you know how ...
'VB.Net Dim oText As Object = oDocument.getText Dim oTextCursor As Object = oText.createTextCursor
'get postion of the shown cursor Dim oViewCursor As Object oViewCursor = oDocument.CurrentController.getViewCursor()
'set the postion of the shown cursor to oTextCursor oTextCursor.gotoRange(oViewCursor, False)
Dim loadProps(-1) As Object oTextCursor.insertDocumentFromURL("file:///D:/test.rtf", loadProps)
Best regards
Michael Herrmann
The administrator has disabled public write access.