Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. hugh999

    XML nodes and attributes

    Thank You for the code, it works great. Thanks
  2. hugh999

    XML nodes and attributes

    Hi, I have the following code that reads an XML file and pulls out attributes for a specific node to a listview control, which works as expected. I am now trying to also pull out specific node data <Words> and <Segments> from under the <Total> element and add to the listview. I was wondering...
  3. hugh999

    Replace in parts of file only

    Thanks, working great now.
  4. hugh999

    Replace in parts of file only

    Thanks again with the help with the code, it does make the replacement in all blocks of text but unfortunately, it does not write back all lines of text. The line of text it omits, is “Report-Output”. Here is the code I have Dim sr As IO.StreamReader = New...
  5. hugh999

    Replace in parts of file only

    Sorry, forgot to add star, it has been a while since using the forum. May I also ask about the code sample supplied, it works great if the file contains one block of text as per my initial query, but if there are more than 1 blocks of text, it will only do the replace in the first block of text...
  6. hugh999

    Replace in parts of file only

    Thanks for the help, it is exactly what i was trying to acheive. Thanks
  7. hugh999

    Replace in parts of file only

    Can any of the experts assist me with this as I have come to a dead end Thanks
  8. hugh999

    Replace in parts of file only

    Hi, I did attempt to use the split method (samples found on web) by reading each line but to be honest as my coding experience is limited, I came up blank on what to do next. Dim sr As IO.StreamReader = ("c:\report.txt") Dim contents As New List(Of String) Do While sr.Peek <> -1...
  9. hugh999

    Replace in parts of file only

    I have also tried playing around with regex but no joy Dim fileText As String = System.IO.File.ReadAllText("C:\report.txt") Dim pattern As String = Regex.Escape("Report-Output" & "(?s)(.+?)" & "Report End") modifiedText = System.Text.RegularExpressions.Regex.Replace( _...
  10. hugh999

    Replace in parts of file only

    Hi, I have this code that works fine for replacing in TXT file. I need to change the code so only to perform the replace in groups of text. Dim Fs As FileStream = New FileStream("C:\report.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite) Dim sw As New...
  11. hugh999

    Macro to search Table in MS word for blank cells

    I did not wait for a reply, i checked the post in regular intervals. How long should a person wait: 24 hours, 48, hours, 96, hours or until they are so old they have forgotten that they actually submitted a post. From my experience with forums if there has not been any updates to a post in 24...
  12. hugh999

    Macro to search Table in MS word for blank cells

    Hi I posted to this forum as i did not receive any reply from the other forum in 24 hours, so assumed it would not get answered. I apologize if you feel i wasted your time. Thanks
  13. hugh999

    Macro to search Table in MS word for blank cells

    Thank you for the help, the code works great. Thanks
  14. hugh999

    Macro to search Table in MS word for blank cells

    Hi I have table in a word file that contains 2 columns. What i am trying to do is search through the second column for blank cells and if found copy the text from the adjoining cell that is in the first column to the blank cell. I found some code for searching blank cells but i need help on...
  15. hugh999

    Edit MS Word macro

    Tnanks for the link, much appreciated
  16. hugh999

    Edit MS Word macro

    Hi I have a VB.NET application that opens an MS Word file and runs a macro, which works fine. Is it possible to edit an MS Word macro from a VB.net application. Thanks
  17. hugh999

    Delete from TXT file

    Thanks for the help.
  18. hugh999

    Delete from TXT file

    Here is the code that i have at the momment Dim all_lines As Array Dim lines As New List(Of String) all_lines = File.ReadAllLines("c:\test.txt") lines.AddRange(all_lines) Array.Clear(all_lines, 0, Text.Length)...
  19. hugh999

    Delete from TXT file

    Hi What is the best approach to search a txt file for a specific piece of text and when found delete that line and the next 5 lines from the TXT file I have code to delete the line that contained the searched text but lost on how to delete the next 5 lines. Thanks

Part and Inventory Search

Back
Top