Essentially, I am trying to decrease the number of pages, for reference only. I would like each section to just fill up one page using the first 30 lines, 6 blank lines, and the last 20 lines. I would like the macro to print right away and then close the documents not saving anything.
I have posted regarding this issue in the past but nothing is working and am not referring to those posts because I don't want to confuse anyone.
I do have some code that kinda works and if that will help, let me know. I will post it.
here is the code I have. It works fine but won't put the last twenty lines of the last section into the output file because it is looking for a "(". This is where I am having my problem.
VB Code:
Sub YoYo()
Dim MyFile As Variant
Dim OutputFile As String
Dim count As Integer
Dim LineArray() As String
Dim MyLine As String
Dim arrNum As Long
Dim openfile As Long
Dim temp As String
Dim ALine, DeleteIt, lineNumberAtEnd, Last20Lines As Long
On Error GoTo MyErrorHandler:
ReDim LineArray(10000000#) 'This redimensions this array...I am assuming there is less than