I'm here again, sorry but i've some trubles
USING:
CopyGetRTFfromC lipboard
I modify your function ClipBoard_GetRT FText on ClipBoard_GetHT MLText
changing
I add:
CF_HTML = RegisterClipboa rdFormat("HTML Format")
So i put on ClipBoard RTF content of RichText on cmdCopy_Click()
absolutly i use your code.
After puting on ClipBoard a callback form ClipBoard using this function
below that i modify to return HTML.
I can't have nothing back, i'm sure i've make a very big Mistake, but
i don't know where can be.....!!!
Function ClipBoard_GetHT MLText() As String
Dim hClipMemory As Long
Dim lpClipMemory As Long
Dim strCBText As String
Dim RetVal As Long
Dim lngSize As Long
If OpenClipboard(0 &) <> 0 Then
' Obtain the handle to the global memory
' block that is referencing the text.
hClipMemory = GetClipboardDat a(CF_HTML)
If hClipMemory <> 0 Then
' Lock Clipboard memory so we can reference
' the actual data string.
lpClipMemory = GlobalLock(hCli pMemory)
If lpClipMemory <> 0 Then
lngSize = GlobalSize(lpCl ipMemory)
strCBText = Space$(lngSize)
RetVal = lstrcpy(strCBTe xt, lpClipMemory)
RetVal = GlobalUnlock(hC lipMemory)
' Peel off the null terminating character.
strCBText = Left(strCBText, InStr(1, strCBText, Chr$(0), 0) - 1)
Else
MsgBox "Could not lock memory to copy string from."
End If
End If
Call CloseClipboard
End If
ClipBoard_GetHT MLText= strCBText
End Function
One more time Tanks.
--
@Alex (Alessandro Baraldi)
---------------------------------------------------------------------------
http://www.sitocomune.com/ http://www.mantuanet.it/alessandro.baraldi/
---------------------------------------------------------------------------