Beiträge von Damon

    I am using wptools6.
    I am wondering if support for opening word docx files from office 365 has been added to version 7.
    I can open word docx from office 2010 pro just fine with my application and wptools6 including wpwordconv, but if I try the app on a machine with office 365 nothing opens. just blank document.

    I have an older app I need to recompile.
    I thought it was on wptools5, but after installing the package, I get lots of errors that properties do not exist.
    So, it was either written on 3.09 or 4.x. Is there any way I can tell what version I was using in the program code so I can get the correct VCL version installed to my D5 pallet?
    Thanks.
    -d

    After importing many files, I find that there is a code in the raw rtf that is not recognized and I would like to locate and delete or replace the code in the raw file. I am not sure how the best way to do this is. I could just open the file in a tmemo and do the seach and replace, but the file is already loaded in to a wprichtext, so I would have to close it, open in memo, then reopen in wprichtext all in code.
    Is there a way to do this directly from the wprichtext componenet?
    The code that appears in the rtf is /endash and it displays in the wprichtext as an object. I need to just change it to a - (hyphen)
    Advice please.
    -d

    \f2 It started 4 years ago with our \u8220 ?Plan to Win\u8221 ? /endash you may know them as

    needs to be changed to

    \f2 It started 4 years ago with our \u8220 ?Plan to Win\u8221 ? - you may know them as

    in order for the file to desplay correctly.

    I have wpspellcontroller set to use registry.
    On form create the following:
    common := CSIDL_COMMON_DOCUMENTS;
    installdir := GetSpecialFolderPath(common) ;
    SetRegistryData(HKEY_CURRENT_USER,'\Software\WPCubed\WPSpell\SpellCheck-Files',
    'DCT0', rdString, installdir+'\myappfolder\English.DCT');

    On clean install to test computer, first time I run spell check, it comes up with no dictionary set. I click configure, then browse to english.dct in users\public\public documents\myappfolder\ and click ok.
    Then I get access violation from then on.
    Is this a problem with my setting or with the access to the public folders?
    -damon

    I am having a hard time understanding how to locate the object.
    I found these examples
    where does ('<<Graphic-Signature>>') and ('[sig]') come from?
    I just want to locate an object I put in with this code:

    Code
    postit := TWPOAnnotation.Create(WPRichText1.Memo.RTFData);
          postit.WidthTW := 300;
          postit.HeightTW := 650;
          postit.Caption := 'PostIt';
    
    
          // WPRichText1.Modified := True;
          WPRichText1.Textobjects.Insert(postit);

    examples from documentation on textobjects:
    begin
    GSFile := 'C:\testfile.jpg';
    if FileExists(GSFile) then
    with WPRichText1 do
    begin
    Finder.ToStart;
    while Finder.Next('<<Graphic-Signature>>') do
    begin
    TextObject := TWPOImage.Create(WPRichText1.Memo.RTFData); // !
    TextObject.LoadFromFile(GSFile);
    SetSelPosLen(Finder.FoundPosition, Finder.FoundLength);
    TextObjects.Insert(TextObject);
    end;
    end;
    end;
    Alternative, using a graphic from an TImage object:
    WPRichText1.Finder.ToStart;
    while WPRichText1.Finder.Next('[sig]') do
    begin
    WPRichText1.CPPosition := WPRichText1.Finder.FoundPosition;
    WPRichText1.Finder.FoundText := '';
    WPRichText1.TextObjects.InsertCopy(Image1.Picture.Graphic);
    end;

    I tested with Word, and you are right. You must have turned off automatic dashes.
    If i type hello - and goodbye,
    the dash gets changed to a different thing. I can undo or turn off, but I can't know or tell users to do that, so I need to get rid of it some way like deny objects.
    -d

    In my app, execution of the default action wpasearch1 brings up the find dialog box and in the find text is always the first paragraph of my file.
    I want to clear the find text each time the dialog is called.

    It doesn't seem the WP default actions give access to the dialog properties like the regular default actions do. Meaning the action property has no dialog sub property like windows standard actions for dialogs do.

    Can the find and find/replace default dialogs be modified prior to display and execution or do I have to create my own custom dialogs using the wprichtext.finder ?
    -d

    I am not having any luck loading an open office .odt file type.
    I have tried loadwithconverter and it gives the same result as loadfromfile with AUTO flag. It basically loads the file as ascii text showing all the encoding/escape code.
    Loadfromfile with UNICODE flag gives me Chinese or something.
    Help?
    -d

    Let's say I want to do
    wprichtext1.InsertGraphic(extractfilepath(application.exename)+'Pin.bmp',false,[]);

    and I may do this 10 or more times in a document to mark positions in the text to come back and review later.
    Can I then search for the occurances of the Pin.bmp in the text to locate the position? Like using an HTML book mark in the file...

    thanks, d