Search results

  1. B

    Removing Charaters from Text files

    HI Me again I am trying to remove the first 7 characters every line of a text file. I have this code so far Dim FILE_NAME AsString = "C:\DRITXT\TRADE.txt" Dim FILE_NAMEOUT AsString = "C:\DRITXT\TRADE2.txt" Dim TextLine AsString Dim TextTrim AsString...
  2. B

    Text File Header

    Hi I have text file which contains customer contact info. The first 30 Characters of each line of the file contain the Customer Number and Customer Name. e.g 001 MR FRED BLOGGS That data that is stored for this customer ( i.e call logs etc ) are to be stored in an individual text files...
  3. B

    TextFile Printing

    Hi All I have an old MS DOS :crap: program that genarates a Jobsheet and saves it as a TextFile called JBSHT.txt. I would like to print the text file to an Networked Printer. I have search the web for help on this but am still struggling. I can get it to print to the Default Printer using...
  4. B

    Write line in text file

    Hi all I have a listbox wich displays the contents of a part build list the data is formatted as below 234c - DRIVE SHAFT 1C - GEARBOX CASTINGS 35A - DRIVE BEARING 1235A - PUMP I have worked out how to extract the 1st 5 characters which is the part number from each line, trim the...
  5. B

    File Reading and Writing

    Hi all I have the follow peice of code which reads customer data from a text file, it then extracts the data in the Customer Name and email address fields. If the email address contains the @ symbol it writes the Customer Name and the email Address in to another text file. or at least its...
  6. B

    Printing to a specific Printer

    Hi All I have a project that I have been working on (may have seen it referenced in other posts). Im learning loads creating it (thanks to everyone on here that has helped) I stuck again though. My project uses a Microsoft word Templete to create service letters, I have managed to get the...
  7. B

    Search textfile for records =< date range

    Hi all I have a txtfile that contains customer info. each line in the file is a different customer. The line length is 581 characters long. Each line contains a date for when the product was last serviced the date starts at character 474 and is 8 characters long with the following format...
  8. B

    Reading Database Feilds

    Hi All My company runs a DOS based system that I am slowly changing over to VB.net. We have a stores system that creates a build list for parts that need to be constructed in the workshop. Each build list for a Part has its own part number, and each build list can have a maximum of 50 other...
  9. B

    Moving Data from one table to another

    Hi all I have an access database which has 2 tables (IntContactsKnown & IntContactsUnKnown). Each of these has a field called KnownUnknown. When the Contact becomes Known a 1 is put in this field. I would like the program to read the data in IntContactsUnKnown and copy all the rows which have a...
  10. B

    Parts of a txt File

    Hi all Please help im really struggling with something that Im sure is fairly straight forward. I have a text file called CustKeySorted. it has 500+ lines and each line is 581 characters long. I would like my program to select the email address from each line then write the address to a...
  11. B

    Object Reference Error

    Hi all I have this piece of code that organizes a text file created by File-pro into a more reasonable format. The code works perfect however I get the following message. "Object Reference not set to an instance of an object" Can someone please tell me where i have gone wrong. Many Thanks...
  12. B

    Reading a Binary file

    HI all I have a binary file that is created by my companies DOS based software. I would like to know who to read a set number of bytes (620) then write them to a text file and do this for the whole file adding each group of 620 bytes to a new line in the text file. I have attached a copy of...
  13. B

    Printer Margins

    I have the following code which is called in a dos program which prints a .bmp file along with a jobsheet created in dos. Imports System.Drawing Imports System.Drawing.Printing Imports System.IO   PublicClassForm1 PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)...
  14. B

    Searching a text file

    Hi I have a text file which holds customers details. One customer per line. Each line os formated as below GRAHAM ### ##### ############# ################ ##############...
  15. B

    Reading txt file

    Hi all I have a txt file that holds contact details for my customers each record is 581 Characters in lenght.Each record is appended on to the end of the last. This file was created in an old dos program. Any ideas how I could read the file and record each 581 Character record in a different...
  16. B

    Writing a Multiline Text box to Text File

    Hi. I havent written any sort of program for a few years now. Ive been set a project at work which requires me to write the data in a Multiline text box to a text file I have manage to write that data to a text file with the followin code (txtMemo being the multiline text box) PrivateSub...
Top Bottom