Strings in VB.Net

C

cjobes

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
 
C

cjobes

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
 
C

Cor Ligthert

Claus,

It is better to make from every problem one message.

What is your problem?
Writting a file
http://msdn.microsoft.com/library/d.../html/frlrfsystemiostreamwriterclasstopic.asp

Using the string members?
http://msdn.microsoft.com/library/d.../cpref/html/frlrfsystemstringmemberstopic.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/d.../vblr7/html/vaorivbruntimelibrarykeywords.asp
See the String module in this page

Do you want to start a process
http://msdn.microsoft.com/library/d...l/frlrfsystemdiagnosticsprocessclasstopic.asp

And for the processinformation Word arguments
http://msdn.microsoft.com/library/d...emdiagnosticsprocessstartinfomemberstopic.asp

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

I hope this helps?

Cor
 
C

cjobes

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top