0

We run a DOS based database program. We are using vDos (plug: great program for those who need 16 bit DOS support on a 64 bit OS). Instead of printing direct to a printer (LPT1, LPT2, etc) we print to a disk, which essentially prints the screen to a DOS text file.

As a company, we used to use Word 2003 to open the text file, and we would choose MS-Dos as the Text Encoding. Once we opened the file, the documents margins would be too small, and each line would wrap prematurely which messes up the formatting of the entire document.

To fix this, we would adjust the margins in the Page Setup dialog box, press Default (to set each document we opened subsequently to these margins) and then we would never have to adjust the margins again.

Photo of Page Settings dialog from Word 2003 running on Server 2003 Photo of Page Settings dialog from Word 2003 running on Server 2003

As times change, so must we and we have upgraded most of our computers to Windows 10 as well as an Office365 subscription - but we have run into a small issue with the Margins in Office 2016 (and 2013 for that matter), which prohibits me from completely eliminating our Server 2003 instance, as well as Office 2003.

The only reason why I keep Office 2003 + Server 2003 is because the new versions of Office do not apply these Margin settings to MS-Dos Encoded Text files.

In Word 2016, after I configure my margins and re-open the document, it is apparent that the margin settings are not being applied correctly and I'm not exactly sure if that is intended because of the type of document, or whether there are additional settings I need to configure.

Word 2016 running on Server 2016 with opened MS Dos Encoded Text File - margins not applied properly Word 2016 running on Server 2016 with opened MS Dos Encoded Text File - margins not applied properly.

I'm pretty sure that this will remain an unsolved mystery for me, primarily because the subset of people using DOS (let alone importing MS Dos encoded text into Word on a daily basis) seems like a very small community, but hey - it's worth a shot.

As an alternate solution, I've been trying to find some software that will monitor a directory on our server for the presence of a specific file, but I'd need it to trim the white space at the beginning of the file, trim the EOF character + white space at the end of the file, then print to a specific printer (as well as a specific number of copies) based off of the file name we export the file as.

I'm fairly certain that can be accomplished with a PowerShell script (or some other scripting language) but I lack the knowledge to write something that involved.

Any suggestions?

1
  • is the page size the same? aren't your settings changing from Letter to A4 or viceversa?
    – jarnosc
    Jun 14, 2018 at 23:26

1 Answer 1

0

Add to config.txt for instance:

LPT1 = "%ProgramFiles%\Windows NT\Accessories\wordpad.exe" #LPT1.TXT

Printing to LPT1 will then open the printer output, you only have to set the margins in WordPad once.

2
  • Jos - Many thanks for your quick reply. I have always appreciated your support for vDos (and DOS programs in general - such as Q&A - haha). I will give this a shot when I get into the office and see how well this works. I can't believe I forgot about Wordpad!!!!
    – Jonathan L
    Jun 13, 2018 at 15:11
  • Okay - that is a partial solution. At first glance, the page margins seemed like they weren't applying since the lines were still wrapping. I looked into the margins a little more, and it actually saved the settings but for some reason re-opening Wordpad still caused the wrapping so I widened them a little more which fixes the issue. However, Q&A is printing what should be a single page to 2 pages so I suspect I need to look at the print settings in Q&A and change the number of rows per page. I'll report back once I look into this more
    – Jonathan L
    Jun 13, 2018 at 16:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .