Subscribe
to our newsletter

Compatible with Windows 8 OS Compatible with Windows 7 OS
Software runs successfully on Windows 8, 7 x32 and x64, Vista x32 and x64, 2003/XP

Support Section

helpWe are here to provide technical support to our customers.

Visit Our Support Section »

Consulting »

 

Buy Now Download Tour

Here's an example of how to use TextPipe's COM interface from within a Microsoft Word macro:

Sub TextPipeCOMExample()
'
' Macro by Simon Carter, DataMystic
' Demonstrates running TextPipe on a Word Document using COM

Dim TaskId
Dim TextPipePath
Dim FilterName
Dim pathname

Dim TP As TextPipe.Application
Dim f As TextPipe.FilterWindow

FilterName = "c:\myfilter.fll"

Set TP = CreateObject("TextPipe.Application")
TP.Show
Set f = TP.NewWindow

f.openFilter (FilterName)
f.startFilters
f.InputMode = 0
f.OutputMode = 0
f.endFilters

'select the entire document
Selection.WholeStory
'copy the entire document to the clipboard
Selection.Copy

f.executeClipboard
f.CloseWithoutSave
Set f = Nothing
Set TP = Nothing

'paste the result in, overwriting the original
Selection.WholeStory
Selection.Paste

End Sub

Did you know? You can generate VBScript or JScript code from a filter prototype by choosing File Menu\Export\Export VBScript or Export JScript. You can even generate a web page to run a filter from a friendly front-end.

Buy Now Download Tour