WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Outlook Script Question about using TXT.File

 
   Home -> Office -> Program Forms RSS
Next:  Mandatory form...Is this possible?  
Author Message
bbnimda

External


Since: Dec 20, 2006
Posts: 81



(Msg. 1) Posted: Thu Dec 04, 2008 4:49 pm
Post subject: Outlook Script Question about using TXT.File
Archived from groups: microsoft>public>outlook>program_forms (more info?)

Hi All,

I'm use a custom Form , and store some information to .txt file, all is ok
I store / save and read these information without any Pb, but from time to
time I need to replace a the content of a line and I don't found the
command that allow me to replace a line knowing it row

to add line I use something like this

Set objFile = objFSO.OpenTextFile(myfile,forereading)
myNewitem
objFile.WriteLine(myNewitem)
......

and to read the file I put the content of the file to a list and get the
info from this list
Back to top
Login to vote
Michael Bauer [MVP - Outl

External


Since: Aug 04, 2006
Posts: 1353



(Msg. 2) Posted: Thu Dec 04, 2008 6:24 pm
Post subject: Re: Outlook Script Question about using TXT.File [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Am Thu, 4 Dec 2008 16:49:53 +0100 schrieb bbnimda:


That object offers a ReadLine function, did you try that?

i don't know how that function works. I'd read all the file, then use the
Split function. If you split all the content by the line delimiter, which
usually is vbCRLF, an array will be returned with one item per line.

--
Viele Gruesse
Michael Bauer - MVP Outlook

: Outlook-Kategorien? Category Manager ist die Lösung
: VBOffice Reporter für Datenanalyse & Berichte
: <http://www.vboffice.net/product.html?pub=6>


> Hi All,
>
> I'm use a custom Form , and store some information to .txt file, all is
ok
> I store / save and read these information without any Pb, but from time to
> time I need to replace a the content of a line and I don't found the
> command that allow me to replace a line knowing it row
>
> to add line I use something like this
>
> Set objFile = objFSO.OpenTextFile(myfile,forereading)
> myNewitem
> objFile.WriteLine(myNewitem)
> .....
>
> and to read the file I put the content of the file to a list and get the
> info from this list
Back to top
Login to vote
bbnimda

External


Since: Dec 20, 2006
Posts: 81



(Msg. 3) Posted: Fri Dec 05, 2008 10:33 am
Post subject: Re: Outlook Script Question about using TXT.File [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I know Readline to get the content of the line but what I want to do is
to replace the content of a line by new information

eg:

the content of the line 75 is:

AAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBB

I Want to replace the line 75 by
BBBBBBBBBBBBBBB BBBBBBBBBBBBBBB

I hope it's clear




"Michael Bauer [MVP - Outlook]" <mb.DeleteThis@mvps.org> a écrit dans le message de
news: akxy3g3ifb8d.1sitleqwxz88u$.dlg@40tude.net...
> Am Thu, 4 Dec 2008 16:49:53 +0100 schrieb bbnimda:
>
>
> That object offers a ReadLine function, did you try that?
>
> i don't know how that function works. I'd read all the file, then use the
> Split function. If you split all the content by the line delimiter, which
> usually is vbCRLF, an array will be returned with one item per line.
>
> --
> Viele Gruesse
> Michael Bauer - MVP Outlook
>
> : Outlook-Kategorien? Category Manager ist die Lösung
> : VBOffice Reporter für Datenanalyse & Berichte
> : <http://www.vboffice.net/product.html?pub=6>
>
>
>> Hi All,
>>
>> I'm use a custom Form , and store some information to .txt file, all is
> ok
>> I store / save and read these information without any Pb, but from time
>> to
>> time I need to replace a the content of a line and I don't found the
>> command that allow me to replace a line knowing it row
>>
>> to add line I use something like this
>>
>> Set objFile = objFSO.OpenTextFile(myfile,forereading)
>> myNewitem
>> objFile.WriteLine(myNewitem)
>> .....
>>
>> and to read the file I put the content of the file to a list and get the
>> info from this list
Back to top
Login to vote
Michael Bauer [MVP - Outl

External


Since: Aug 04, 2006
Posts: 1353



(Msg. 4) Posted: Tue Dec 09, 2008 9:55 pm
Post subject: Re: Outlook Script Question about using TXT.File [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sorry, I didn't mean the ReadLine but the WriteLine function. However, try
my suggestion: If you have all of the lines in an array, you can change them
easily and then write everything back. That shouldn't be a problem as long
as you don't have to write very huge files.
--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Fri, 5 Dec 2008 10:33:37 +0100 schrieb bbnimda:

> I know Readline to get the content of the line but what I want to do is
> to replace the content of a line by new information
>
> eg:
>
> the content of the line 75 is:
>
> AAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBB
>
> I Want to replace the line 75 by
> BBBBBBBBBBBBBBB BBBBBBBBBBBBBBB
>
> I hope it's clear
>
>
>
>
> "Michael Bauer [MVP - Outlook]" <mb.RemoveThis@mvps.org> a écrit dans le message de
> news: akxy3g3ifb8d.1sitleqwxz88u$.dlg@40tude.net...
>> Am Thu, 4 Dec 2008 16:49:53 +0100 schrieb bbnimda:
>>
>>
>> That object offers a ReadLine function, did you try that?
>>
>> i don't know how that function works. I'd read all the file, then use the
>> Split function. If you split all the content by the line delimiter, which
>> usually is vbCRLF, an array will be returned with one item per line.
>>
>> --
>> Viele Gruesse
>> Michael Bauer - MVP Outlook
>>
>> : Outlook-Kategorien? Category Manager ist die Lösung
>> : VBOffice Reporter für Datenanalyse & Berichte
>> : <http://www.vboffice.net/product.html?pub=6>
>>
>>
>>> Hi All,
>>>
>>> I'm use a custom Form , and store some information to .txt file, all
is
>> ok
>>> I store / save and read these information without any Pb, but from time
>>> to
>>> time I need to replace a the content of a line and I don't found the
>>> command that allow me to replace a line knowing it row
>>>
>>> to add line I use something like this
>>>
>>> Set objFile = objFSO.OpenTextFile(myfile,forereading)
>>> myNewitem
>>> objFile.WriteLine(myNewitem)
>>> .....
>>>
>>> and to read the file I put the content of the file to a list and get the
>>> info from this list
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Program Forms All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support