Beiträge von sscsoft

    Hi,

    I am trying to use .SaveToSting(False, "MIME") to create a string which I can then send as an email. (using a third party email component) It works really well except that images do not work as expected.

    The email has all of the required text with correct formatting and the embedded images are attached, but the images do not appear embedded within the text itself. You get the missing image red X in its place.

    Any suggestions how I can fix this as the images are important.

    Thanks Rob

    Hi, I have a problem with the following:

    In VB.Net 2005 I have a WinForms program which uses SQL Server at the back end. Data which has line breaks in it which is saved into the database via a memo control on a form is not being render correctly.

    The code being used is as follows:
    textcursor.FindText("$WorkRequired", True, False, True, True, found)
    If found Then
    MessageBox.Show(job.WorkRequired.ToString)
    textcursor.SelectText(textcursor.CPPosition, textcursor.CPPosition + 13)
    textcursor.InputString(job.WorkRequired.ToString, intNames)
    End If

    The messagebox (which is included only for confirmation purposes) shows the correct text which I have also confirmed by looking at the database table.

    When the string is entered into the Text Dynamic editing window lines after the carriage returns are repeated. An example is shown below.

    Line 1

    Line 2

    would be rendered as:

    Line 1

    Line 2

    Line 2

    Note that I get the same behaviour when I use marked fields.

    Any suggestions?

    Thanks

    Julian,

    Can you tell me how to set all of the font properties in a single style when adding a new cell to a table. It is easy to do with InputString.
    e.g.

    'Style for odd rows (is empty)
    Memo.SelectStyle("DataOdd")

    'Style for even rows (shaded)
    Memo.SelectStyle("DataEven")
    Memo.CurrStyle.ParColor = WpdllInt1.ColorToRGB(Color.Blue)
    Memo.CurrStyle.ParShading = 20 ' 20% blue

    ...other code to create table as normal, then...

    TextCursor.InputCell(row("HouseShort"), "DataEven")

    How do I set the font size and name as well for the style DataEven so that the text entered into the cell also has its font characteristics set e.g. Arial size 10?

    I tried using the CurrStyle.SetCharAttr but that only works on a single character at a time and is very time consuming to use.

    Thanks

    Julian,

    thanks but I am still having dramas.

    When I use this code and anything else I can think of I can't get the page orientation to apply only to the section. It always applies it to the whole document.

    Also, once the section has been included (which I can get to work) how do I select it at a later time to apply formatting only to that section. I can't find a select method which allows me to select a section.

    Any suggestions.

    Thanks

    Julian,

    I also can't get individual table cell borders to work. What is the code to to change, for example, only the top border.

    Also, I need to be able to insert sections in documents and change the orientation on the sections only as you can do in Microsoft Word. How do you do this. TextCursor.InputSection doesn't seem to do it.

    Have a good break.

    Rob

    Hi Julian,

    I am trying to manage table borders in code individually. The code I am using is:

    Dim TextCursor As IWPTextCursor = Memo.TextCursor
    Dim curpar As IWPParInterface
    curpar = Memo.CurrPar
    curpar.ParASet(60, 0)
    curpar.ParASet(61, 0)
    curpar.ParASet(62, 0)
    curpar.ParASet(63, 0)

    It isn't doing anything. How do I show/hide the borders on a table in code.

    VB thanks.

    Rob

    Hi,

    Can you tell me the method to be used to split a table cell. I can see how to merge table cells using the TextCursor, but not split them.

    Can you also tell me how to insert the equivalent of a Section Break - Next Page as in Microsoft Word so that I can set up different page orientations within the same document.

    I have just experimented with opening a Word Rich Text File which has different page orientations in the same document and the control shows them properly. But if I save the document using the control, the page orientation is lost if I open them back up in Word. The control still shows the corrent orientations when re-opened by the TextDynamic control.

    Any suggestions why this would be happening.

    Thanks
    Rob

    Bill,

    I haven't had any success using ClickOnce deployment. I either use XCopy or InnoSetup and it works like a dream. I initialise the component using:

    WpdllInt1.SetDLLName(My.Application.Info.DirectoryPath & "\WPTextDll01.dll")

    ' This call is required by the Windows Form Designer.
    InitializeComponent()

    I inadvertantly had these lines around the other way in the New event of the form and it didn't work. If you do have the SetDLLName line after the InitializeComponent line it tries to get the path from the registry and doesn't work. Much frustration was experienced until I did the lines in the order that the documentation said to do it.

    Just thought this might help.

    Hi,

    can you tell me how to show the table grid when there are no borders so that users can see where the table is. When I am inserting a table without borders the page is completely blank and it is hard to navigate.

    (In VB.net thanks)

    Thanks Rob

    Hi Julian,

    I am trying to update a toolbar setting using Me.WpdllInt1.CurrAttr.AttrGET without success. I have tried to follow the manual but can't.

    Can you give me the code for check for Bold and Italics using this approach?

    I should be able to work out the rest from these.

    Thanks Rob

    Also, I can't figure out how to do each of the following totally in code without doing the selecting with the mouse:

    1. Adjust a column size after creating the table in the same code block
    2. Select a number of adjacent cells in a table in code without selecting the whole row or column. It is possible to do such a selection with the mouse.

    Thanks.[/list]

    Hi,

    I can't figure out how to create a table in a document where you combine cells in the top row so that they will span a number of cells in lower rows.

    Any suggestions how this could be done? I have found the combine cells method which works if the cells are selected with the mouse, but I can't find how to do the whole process in code.

    Thanks

    Julian,

    I can see how this can be used to change individual aspects of the font, but how do I open a dialogue box with all of the font aspects and change them all at the the same time? This is in a similar fashion to using memo.wpqProcess("DiaParagraphProp") which shows a dialogue box which allows you to access the paragraph settings.

    Do I have to write one of my own?

    Hi,

    continuing the saga I have had with this issue - it also appeared in the compiled programs on other machines and was giving me real problems.

    After successively removing things from the reporting form I have discovered that the error is caused by the use of the MainMenu control from .Net framework Version 1. The strange thing is that it happens only on the closure of the form.

    After changing the menu to a MenuStrip control (from version 2) the issue has not reappeared. As a result I am in the process of writing a class which will generate most of the menu using a menu strip. When I get it finished I will send it through to Julian.

    Hope this helps.

    Hi,

    I am in the process of building a custom menu in VB2005. One thing I would like to include in it is the ability to have a single dialogue where you can set the font characteristics. i.e. the equivalent of the Format - Font menu option in Word. I would want bold, italics, underline, font face, size etc etc.

    I can access the Paragraph properties in a single dialogue, but can't seem to find a way of doing the same for the font (using wpaProcess).

    Does anyone have any suggestions?

    P.S. I gave up trying to use the .Net 1.1 framework MainMenu control as it caused errors when trying to close the window. The dreaded 0xc0000005 windows access violation error.

    Julian,

    I had a look around on the error message that was being generated and it is a common one for development in .NET. I haven't been able to find a reasonable solution (a lot written about the error but little about how to fix it), but I strongly suspect that it is more to do with accessing the SQL Server Express database where the data was coming from.

    I compiled the project and installed on a clean machine and even after extensive testing the error hasn't occurred so it appears to only be a development issue anyway. So thanks for the help but I'm not going to worry about it.

    Great tool by way. I have previously used a competitors word processing control and it was cheaper to buy yours outright then to buy the upgrade of the other. Yours also includes better features anyway. Value for money is what convinced me to change.

    Rob

    Hi,

    I keep getting a fatal error when developing in VB 2005 Express. The full text of the error is shown below. It normally occurs when running programmatically generated reports and normally on about the 5th - 6th time they are generated.

    Any suggestions. Thanks Rob

    Error Text:

    The runtime has encountered a fatal error. The address of the error was at 0x79f96143, on thread 0x6a8. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.