Connecting Tech Pros Worldwide Help | Site Map

Strings in VB.Net

cjobes
Guest
 
Posts: n/a
#1: Nov 21 '05
Hi all,

I'm trying to get a handle on VB.Net and I'm running into some problems with
string manipulation. Here is what I'm trying to do:

I have a text file that I need to process line by line and write the changes
back to the file. I need to pull 5 substrings in each line, based on
specific characters (; and space), manipulate them and put them back
together. This is needed to pull the data afterwards into a DS Table. I
found the info about InStr to determine the start and end position and I
also found the "insert" property, but I cannot find anything that would
allow me to pull the substring.

I also would like to know if anybody has an idea on how to start MSWord from
the Proc procedure with parameters that would automatically start a specific
MailMerge.

Any help/hint would be very much appreciated.

Thanks,

Claus


Cor Ligthert
Guest
 
Posts: n/a
#2: Nov 21 '05

re: Strings in VB.Net


Claus,

It is better to make from every problem one message.

What is your problem?
Writting a file
http://msdn.microsoft.com/library/de...classtopic.asp

Using the string members?
http://msdn.microsoft.com/library/de...mberstopic.asp

Be aware that these use the 0 indexer, while the one you have mentioned the
1 indexer

When you want to do some handling than the String functions can be very
effective however look what I wrote above about the indexer
http://msdn.microsoft.com/library/de...rykeywords.asp
See the String module in this page

Do you want to start a process
http://msdn.microsoft.com/library/de...classtopic.asp

And for the processinformation Word arguments
http://msdn.microsoft.com/library/de...mberstopic.asp

I think that for that string itself you can better ask it in a ms-Word
newsgroup.

I hope this helps?

Cor

"cjobes" <cjobes@nova-tech.org>
[color=blue]
>
> I'm trying to get a handle on VB.Net and I'm running into some problems
> with
> string manipulation. Here is what I'm trying to do:
>
> I have a text file that I need to process line by line and write the
> changes
> back to the file. I need to pull 5 substrings in each line, based on
> specific characters (; and space), manipulate them and put them back
> together. This is needed to pull the data afterwards into a DS Table. I
> found the info about InStr to determine the start and end position and I
> also found the "insert" property, but I cannot find anything that would
> allow me to pull the substring.
>
> I also would like to know if anybody has an idea on how to start MSWord
> from
> the Proc procedure with parameters that would automatically start a
> specific
> MailMerge.
>
> Any help/hint would be very much appreciated.
>
> Thanks,
>
> Claus
>
>[/color]


cjobes
Guest
 
Posts: n/a
#3: Nov 21 '05

re: Strings in VB.Net


I finally found the Mid function. Documentation is not a strong suit of MS.
I have one question still open: Can I use the EoF in combination with
ReadLine to go through a file line by line or is there a better way of doing
this?

Thanks,

Claus
"cjobes" <cjobes@nova-tech.org> wrote in message
news:%23p8Dgq90EHA.804@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi all,
>
> I'm trying to get a handle on VB.Net and I'm running into some problems[/color]
with[color=blue]
> string manipulation. Here is what I'm trying to do:
>
> I have a text file that I need to process line by line and write the[/color]
changes[color=blue]
> back to the file. I need to pull 5 substrings in each line, based on
> specific characters (; and space), manipulate them and put them back
> together. This is needed to pull the data afterwards into a DS Table. I
> found the info about InStr to determine the start and end position and I
> also found the "insert" property, but I cannot find anything that would
> allow me to pull the substring.
>
> I also would like to know if anybody has an idea on how to start MSWord[/color]
from[color=blue]
> the Proc procedure with parameters that would automatically start a[/color]
specific[color=blue]
> MailMerge.
>
> Any help/hint would be very much appreciated.
>
> Thanks,
>
> Claus
>
>[/color]


cjobes
Guest
 
Posts: n/a
#4: Nov 21 '05

re: Strings in VB.Net


Thanks Cor,

In between I have posted that I found the Mid function. This will solve the
main problem. My code is probably not very efficient but I will see how I
get it to work first and then try to make it more efficient.
Thanks for all the links. I will read up and hopefully come up with some
reasonable solutions.

Claus

"Cor Ligthert" <notmyfirstname@planet.nl> wrote in message
news:uSeEq190EHA.3000@TK2MSFTNGP15.phx.gbl...[color=blue]
> Claus,
>
> It is better to make from every problem one message.
>
> What is your problem?
> Writting a file
>[/color]
http://msdn.microsoft.com/library/de...classtopic.asp[color=blue]
>
> Using the string members?
>[/color]
http://msdn.microsoft.com/library/de...mberstopic.asp[color=blue]
>
> Be aware that these use the 0 indexer, while the one you have mentioned[/color]
the[color=blue]
> 1 indexer
>
> When you want to do some handling than the String functions can be very
> effective however look what I wrote above about the indexer
>[/color]
http://msdn.microsoft.com/library/de...rykeywords.asp[color=blue]
> See the String module in this page
>
> Do you want to start a process
>[/color]
http://msdn.microsoft.com/library/de...classtopic.asp[color=blue]
>
> And for the processinformation Word arguments
>[/color]
http://msdn.microsoft.com/library/de...mberstopic.asp[color=blue]
>
> I think that for that string itself you can better ask it in a ms-Word
> newsgroup.
>
> I hope this helps?
>
> Cor
>
> "cjobes" <cjobes@nova-tech.org>
>[color=green]
> >
> > I'm trying to get a handle on VB.Net and I'm running into some problems
> > with
> > string manipulation. Here is what I'm trying to do:
> >
> > I have a text file that I need to process line by line and write the
> > changes
> > back to the file. I need to pull 5 substrings in each line, based on
> > specific characters (; and space), manipulate them and put them back
> > together. This is needed to pull the data afterwards into a DS Table. I
> > found the info about InStr to determine the start and end position and I
> > also found the "insert" property, but I cannot find anything that would
> > allow me to pull the substring.
> >
> > I also would like to know if anybody has an idea on how to start MSWord
> > from
> > the Proc procedure with parameters that would automatically start a
> > specific
> > MailMerge.
> >
> > Any help/hint would be very much appreciated.
> >
> > Thanks,
> >
> > Claus
> >
> >[/color]
>
>[/color]


Closed Thread