Re: Free Beer!!
From: Jim Carlock (anonymous_at_10.10.com)
Date: 02/27/04
- Previous message: Igor Tandetnik: "Re: Regarding SerializeElements and byte swapping"
- In reply to: John: "Re: Free Beer!!"
- Next in thread: Jim Carlock: "Re: Free Beer!!"
- Reply: Jim Carlock: "Re: Free Beer!!"
- Messages sorted by: [ date ] [ thread ]
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 > > > > > > > > > > > >
- Previous message: Igor Tandetnik: "Re: Regarding SerializeElements and byte swapping"
- In reply to: John: "Re: Free Beer!!"
- Next in thread: Jim Carlock: "Re: Free Beer!!"
- Reply: Jim Carlock: "Re: Free Beer!!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|