Text Dynamic examples

  • I am a little simple when it comes to programming and I find examples help me no end. I have created a VS 2005 Visual Basic Net 2.0 demo that creates a basic word processor using Text Dynamic and have added a custom menu to duplicate most button actions using the wpaProcess commands like

    Code
    Private Sub CutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CutToolStripMenuItem.Click        Me.WpdllInt1.CurrMemo.wpaProcess("Copy", "")    End Sub

    I have also added an Examples menu with some basic code that I found useful, mostly from the manual, API and all over. Code example to add a formatted header below. Only about 4 examples at present but I plan to add more as I go. If anyone has some Visual Basic code they wish to share I would be very happy to add it. Download at http://www.accessgp.com/Downloads.html

    GRS

  • The code below adds a table with 3 columns to the header, formats the text, sets justification of table cells. I use it to create a the basis of a letter in code. Exampe project at Download at http://www.accessgp.com/Downloads.html

  • I have added a form to select and store a variety or printers with associated bins and resolutions. Then a form to print a medical certificate with a header, body and footer with options to print or print preview and a comparison to another way to do it in VB.Net 2005 code. TextDynamic is easier and more versatile and I am using it as my print engine as well as a word processor in my application. Printer selection in code in TD not implemented yet but will be soon I hope :D Download at http://www.accessgp.com/Downloads.html and aslo Shockwave video of the example in action http://www.accessgp.com/Files/TDCertDemo5.swf .

    Regards,

    Geoff

  • New example added showing mail merge in code. Also I didn't realise that TextDynamic saves printer settings when saving a .rtf file which is handy e.g. margins and paper size seem to be saved with the text

  • Here is another small example using merging of text. I had to print a script form with patient name, address, medications etc on pre-printed paper. I created a .rtf file as a template with fields surrounded by <<and>> e.g. <<PatientName>>. The beauty of this approach is that it is very easy to format the printout, set margins, set text attributes and these are carried through into the merged text (as long as <<and>> are in the font and size you want. The code loads a .rtf file and merges text from my program and prints or previews it with optional preferred printer.