Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prn file carriage return deletion within notepad
Dear All I am completely stuck PROBLEM I have a prn file which on creation always has a carraige return inserted after the last row. At the moment I am using VBA to generate the prn file but manually opening notepad and deleting the carraige return and then saving it again as a prn within notepad. QUESTION Is there a way, using VBA, to open the prn within notepad and delete the carriage return? It seems to be hard coded. I have read the prn in to notepad a line at a time but the carriage return remains. Any help greatly appreciated. Monster -- monster ------------------------------------------------------------------------ monster's Profile: http://www.excelforum.com/member.php...o&userid=24353 View this thread: http://www.excelforum.com/showthread...hreadid=379508 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prn file carriage return deletion within notepad
On my wintel pc, I get a carriage return/linefeed at that end of every
line--including the last. Are you saying that you got extra characters or that you don't want those characters at the end of the file? And just curious, why wouldn't you want those last crlf at the end of the last line? monster wrote: Dear All I am completely stuck PROBLEM I have a prn file which on creation always has a carraige return inserted after the last row. At the moment I am using VBA to generate the prn file but manually opening notepad and deleting the carraige return and then saving it again as a prn within notepad. QUESTION Is there a way, using VBA, to open the prn within notepad and delete the carriage return? It seems to be hard coded. I have read the prn in to notepad a line at a time but the carriage return remains. Any help greatly appreciated. Monster -- monster ------------------------------------------------------------------------ monster's Profile: http://www.excelforum.com/member.php...o&userid=24353 View this thread: http://www.excelforum.com/showthread...hreadid=379508 -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prn file carriage return deletion within notepad
I think he's saying he gets this:
Line 1<crlf Line 2<crlf Line 3<crlf |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prn file carriage return deletion within notepad
My apologies, what I mean is this. _In_a_9_line_prn_file._ line 1 line 2 line 3 .......... line 9<crlf It is this final <crlf that I want to remove because the prn file i used within a system (out of my control) that initially counts th number of rows. With this carriage return, the number of rows i increased by one (to 10). Effectively the system sees a 'final blan record' (created from the carraige return). Have I explained it any better? Any ideas -- monste ----------------------------------------------------------------------- monster's Profile: http://www.excelforum.com/member.php...fo&userid=2435 View this thread: http://www.excelforum.com/showthread.php?threadid=37950 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prn file carriage return deletion within notepad
You explained it ok the first time, too. I was just curious.
Try Charlie's code. I bet it works for you. monster wrote: My apologies, what I mean is this. _In_a_9_line_prn_file._ line 1 line 2 line 3 ......... line 9<crlf It is this final <crlf that I want to remove because the prn file is used within a system (out of my control) that initially counts the number of rows. With this carriage return, the number of rows is increased by one (to 10). Effectively the system sees a 'final blank record' (created from the carraige return). Have I explained it any better? Any ideas? -- monster ------------------------------------------------------------------------ monster's Profile: http://www.excelforum.com/member.php...o&userid=24353 View this thread: http://www.excelforum.com/showthread...hreadid=379508 -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prn file carriage return deletion within notepad
Where can I find Charlie's code? I am new to this forum -- monste ----------------------------------------------------------------------- monster's Profile: http://www.excelforum.com/member.php...fo&userid=2435 View this thread: http://www.excelforum.com/showthread.php?threadid=37950 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prn file carriage return deletion within notepad
Go to google and search using your name as the author or search for your
subject: http://groups.google.com/advanced_group_search I found this: http://groups-beta.google.com/group/...dd8586d3f5d8aa (I hate the new google interface!) or this: http://tinyurl.com/ag8t5 monster wrote: Where can I find Charlie's code? I am new to this forum. -- monster ------------------------------------------------------------------------ monster's Profile: http://www.excelforum.com/member.php...o&userid=24353 View this thread: http://www.excelforum.com/showthread...hreadid=379508 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Carriage return | Excel Discussion (Misc queries) | |||
how to copy excel carriage return to notepad w/out the quotations | Excel Worksheet Functions | |||
Excel import txt file carriage return as delimiters | Excel Discussion (Misc queries) | |||
carriage return that works when pasted into a text file (eg. Notep | Excel Discussion (Misc queries) | |||
Carriage Return | Excel Programming |