The textpad website says that text can be inserted into TextPad using DDE Insert, but there are no examples or explanation (that I can find) showing how to do this.
Please someone give a simple example of this, just a simple "hello world" from any DDE insert example would be a start.
Enhance the Documentation with an example of DDE Insert
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 1
- Joined: Wed Aug 04, 2004 3:23 pm
DDE comunication with TextPad
In VB I created a tool wich does DDE communication with TextPad.
I created a form an set its LinkMode prperty to 1 (source).
I placed a label on the form, called "lblDDEsend" - you can also use a textbox instead.
In the forms code I put the following:
This inserts the string contained in "strInsertString" at the current cursor position of the active document.
Unfortunately the current selection collapses before the insertion takes place. That means: whatever was highlighted in the active document is not going to be replaced by the insertet string, but the cursor first moves to the end of the selection.
I created a form an set its LinkMode prperty to 1 (source).
I placed a label on the form, called "lblDDEsend" - you can also use a textbox instead.
In the forms code I put the following:
Code: Select all
With Me.lblDDEsend
.LinkMode = vbLinkNone
.LinkTopic = "Textpad|System"
.LinkMode = vbLinkManual
.LinkExecute "[command(Insert,""" & strInsertString & """)]"
.LinkMode = vbLinkNone
End With
Unfortunately the current selection collapses before the insertion takes place. That means: whatever was highlighted in the active document is not going to be replaced by the insertet string, but the cursor first moves to the end of the selection.