Hi there,
I'm trying to create a program that allows drag and drop from VB into
word. I can get it working with simple text, but I need to be able to
effectively drag & drop a table. To do this, I assumed that I would be
able to create some html & give that to the DataObject when I start my
drag. However, when I do that, word seems to accept the drag as valid
(i.e. the cursor is correct), but when I release the mouse, nothing
happens.
Here's the code:
Private Sub TreeView1_OLEStartDrag(Data As MSComctlLib.DataObject,
AllowedEffects As Long)
Dim html As String
Dim byteData() As Byte
Dim temp As Long
Dim CF_HTML As Integer
html = "this is an html test"
byteData = html
temp = RegisterClipboardFormat("HTML Format")
CF_HTML = &H8000 Or (temp And &HFFFF&)
Data.SetData byteData, CF_HTML
End Sub
I'm using VB6 & OfficeXP. Iv'e searched the news groups & found some
examples, but they don't seem to work in this scenario. Any
suggestions appreciated.
Thanks in advance,
Brian.
Archived from group: microsoft>public>vb>ole