*** ActiveX Control Event *** LPARAMETERS data, allowedeffects LOCAL lnFormat,lcFragment,lcBytes *Declare integer RegisterClipboardFormat in "user32" string lpString lnFormat = RegisterClipboardFormat('HTML format') IF m.lnFormat > 32767 lnFormat = m.lnFormat - 65536 && I didn't expected problem be here. grrrr ENDIF allowedeffects = 1 m.lcFragment = this.parent.oDataFormatter(this.SelectedNode.Key) && prepares HTML fragment for clipboard LOCAL loStream as 'adodb.stream' loStream = CREATEOBJECT( 'adodb.stream' ) loStream.Open() loStream.Charset = 'ascii' loStream.WriteText( m.lcFragment ) loStream.Position = 0 loStream.Type = 1 && adTypeBinary lcBytes = loStream.Read() loStream.Close() data.clear data.SetData(m.lcBytes , m.lnFormat)Cetin
>lparameters data, allowedeffects >text to m.lcHTMLFragment noshow ><b>some html</b> >endtext > >lcHTML = thisform.PrepareHtml(m.lcHTMLFragment) >* this returns text adding necessary fragment info like "StartHTMLFragment:offset ..." > >data.SetData( m.lcHTML, "HTML Format" ) >>This errors out (I don't remember the exact error message a different one with different trials).