Re: Free Beer!!

From: Jim Carlock (anonymous_at_10.10.com)
Date: 02/27/04

  • Next message: Jim McGill: "Re: More questions on showing a PropertyPage in a View"
    Date: Fri, 27 Feb 2004 15:57:40 -0500
    
    

    richtx32.ocx it the control.

    -- 
    Jim Carlock
    http://www.microcosmotalk.com/
    Post replies to the newsgroup.
    "John" <John@john.net> wrote in message
    news:kyK%b.417207$xy6.2355026@attbi_s02...
    I got this to work
    Set Obj = CreateObject("Word.basic")
    Obj.FileOpen "c:\leasedatabase\lease.rtf"
    'Obj.EditSelectAll
     Obj.SetSelection "(2)Landlord first name"  <--doesn't work
    Where can  I get a list of commands I can use, I'd like to replace with
    '(2)Landlord first name' with a text value I'll obtain later.
    Thanks
    "John" <John@john.net> wrote in message
    news:V8K%b.407505$I06.4419065@attbi_s01...
    > Hey Thanks.
    > I was thinking vb may be the way to go simply because the rich edit
    control
    > I loaded in my c++ project seemed to be geared toward it.
    >
    > Vb isn't my forte but I'll give it a try.
    >
    > Where can I get rtb??
    >
    > None of my guesses for what rtb is have the loadfile function
    >
    > Private Sub Command1_Click()
    > OLE1.LoadFile "c:\leasedatabase\lease.rtf", rtfRTF
    > Text1.LoadFile "c:\leasedatabase\lease.rtf", rtfRTF
    > End Sub
    >
    > I tried to create an object on the form using the rtf file and it appeared
    > to work however I don't see any selection based functions nor replace text
    > functions. The object showed up on the form as OLE2
    >
    > Thanks
    >
    >
    > "Jim Carlock" <anonymous@10.10.com> wrote in message
    > news:OCjezeS$DHA.2308@tk2msftngp13.phx.gbl...
    > > rtb.LoadFile "filename.rtf", rtfRTF
    > > rtb.SelStart = iPosStart
    > > rtb.SelLength = iLengthSelected
    > > rtb.SelText = strNewText
    > >
    > > If the file to be loaded is a RichText File, set rtfRTF to rtfRTF,
    > > otherwise set it to rtfText for text files.
    > >
    > > Where iPosStart is the starting position in characters.
    > >
    > > iLengthSelected is the number of characters to select starting from
    > > iPosStart.
    > >
    > > Setting .SelText is the way to set the property that replaces the
    existing
    > > text.
    > >
    > > Done. HTH
    > >
    > > -- 
    > > Jim Carlock
    > > http://www.microcosmotalk.com/
    > > Post replies to the newsgroup.
    > >
    > >
    > > "Jim Carlock" <anonymous@10.10.com> wrote in message
    > > news:uuTyVRS$DHA.2800@tk2msftngp13.phx.gbl...
    > > It is very easily accomplished in VB6.
    > >
    > > -- 
    > > Jim Carlock
    > > http://www.microcosmotalk.com/
    > > Post replies to the newsgroup.
    > >
    > >
    > > "John" <John@john.net> wrote in message
    > > news:1Nr%b.402652$I06.4379868@attbi_s01...
    > > Now that I've got your attention... (well it was funny on the simpsons)
    > >
    > > I'm looking to open a text file and replace parts of it with my text. I
    > have
    > > looked at the find and replace methods but they all seem to be tied to
    > > dialogs which I don't need nor want to code the back end functions.
    > >
    > > If anyone could provide me with some working code that'll do a non
    dialog
    > > based (or at least don't show the dialog) search and replace based on
    > > parameters I pass on a rich text file I would definately buy them some
    > beer
    > > or soda if they're under 21.
    > >
    > > Btw this is not a student project but a project I'm doing for friend.
    > > A project I figured would be easy but has turned out more challenging
    than
    > I
    > > thought.
    > >
    > > Thanks alot
    > >
    > >
    > >
    > >
    > >
    >
    >
    

  • Next message: Jim McGill: "Re: More questions on showing a PropertyPage in a View"

    Relevant Pages

    • Re: Free Beer!!
      ... I don't have a clue on how to connect to an .ocx through C++. ... Post replies to the newsgroup. ... "Jim Carlock" wrote in message ... > Post replies to the newsgroup. ...
      (microsoft.public.vc.mfc)
    • Re: Free Beer!!
      ... >> Jim Carlock ... >> Post replies to the newsgroup. ... >> If anyone could provide me with some working code that'll do a non ...
      (microsoft.public.vc.mfc)
    • Re: Free Beer!!
      ... Post replies to the newsgroup. ... "Jim Carlock" wrote in message ... > Text1.LoadFile "c:\leasedatabase\lease.rtf", rtfRTF ...
      (microsoft.public.vc.mfc)
    • Re: Visual Studio SP6 BUG with MSCOMCTL.OCX
      ... title "Visual Studio SP6" by Jim Carlock, ... SP6 is installed on the XP system. ... > Post replies to the newsgroup. ...
      (microsoft.public.vb.controls)
    • Re: Visual Studio SP6 BUG with MSCOMCTL.OCX
      ... title "Visual Studio SP6" by Jim Carlock, ... SP6 is installed on the XP system. ... > Post replies to the newsgroup. ...
      (microsoft.public.vb.winapi)