Within notepad there is no way to use the Find and Replace and target blank lines. Consider Notepad++ and the regex search and replace.
You can use \r\n
to find blank lines from text files made within Windows, \r
for Mac and \n
for Linux.
I believe a default install actually comes with TextFX to make your life even easier, it has an option to delete blank lines:
If you record a macro (Tools - Macro - Record New Macro) while you open the file, you will get the parameters you need to use the OpenText method. Here's an example
Workbooks.OpenText Filename:= _
"C:\Documents and Settings\dick\My Documents\actsynclog.txt", Origin:=437, _
StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1), Array(8, _
1), Array(31, 1), Array(41, 1), Array(57, 1), Array(77, 1), Array(80, 1), Array(82, 1), _
Array(84, 1), Array(86, 1)), TrailingMinusNumbers:=True
The FieldInfo argument is the one you care about. It's an array of 2d arrays. The first element is the column and the second is the data type. This example splits the text file in the following columns: 0, 8, 31, 41, 57, 77, 80, 82, 84, and 86.
With that you, you can write a macro to open the text file. See the GetOpenFileName method of the Application object for how to select which file to open.
Best Answer
I would like to be able to quickly show and hide multiple vertical lines
As far as I know this is not possible.
The closest thing I've seen is the Notepad++ TextFX plugin Ruler:
Menu TextFx > TextFX Tools > Insert Ruler
Notes:
You can insert multiple rulers at different points in your document (and delete them later), or
Have a single ruler, clone to other view and have just the ruler in the top window,
The current column number is displayed in the status bar