Forum Moderators: travelin cat

Message Too Old, No Replies

creating MS-DOS txt files with MS-Word for a Mac?

how to get rid of Word header?

         

Robert Charlton

7:06 am on Sep 18, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I'm working with a writer who's using MS-Word on a Mac, and I need her to send me drafts in ASCII txt files attached to emails, so I can work with them in a text editor on my Windows-based PC.

She tells me she's saving the files in Word as ASCII text with no carriage returns, as I've asked... But when I receive them from her, I'm getting the file in two parts. The first is a binary file that looks like it's the header of an MS-Word document, about 444 bytes, and the second is the clean ASCII text file I want.

The problem is that the second file is getting renamed... no big thing for one message... lots of wasted time when you're contemplating 50 to 100.

Can anyone suggest how to get just a straightforward txt file, with no Word header, from Word for the Mac?

jim_w

9:38 am on Sep 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The Mac doesn’t work like Windows. The icons for a file on a Mac are stored in a resourse fork. That is what the binary file is. I ran into this problem back in 1988 at Motorola transfering files between facilities. There is no fix for it. The only thing I can think of is to write a VBA routine for _your_ Word that would rename the files.

ytswy

9:43 am on Sep 18, 2003 (gmt 0)

10+ Year Member



If the file is being saved as "Text Only" with a file extension there shouldn't be any problems.

I can email other Macs with Word text files saved this way with no problem. Possibly this is a Mac - PC thing, Mac files contain extra information to say what they are and what program they were made with (unlike PCs which just rely on the file extension - these are optional on Macs). I'm not sure how you would get around this, but maybe the problem is with the email client rather than Word?

<edit>or what jim_w said..</edit>

ytswy

9:56 am on Sep 18, 2003 (gmt 0)

10+ Year Member



An idea:

You could write her a simple VBA program which just did a select all on the text file, sticks the result into a string, and then saves the string as a sequential access file with a .txt extension. This I think would avoid any additional data going in the file - it will certainlly make a file using a default icon, I don't know enough MacOS to know whether it will actually work I'm afraid.

Not sure how you would name the files, possibly she puts the required name at the top of the file, and then the script parses the string for all data before the first end of line.

jim_w

10:04 am on Sep 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If she has an older WORD program for the Mac, it won't do VBA. And because of the law suite, MS didn't update the Mac Office stuff for a really long time.

ytswy

10:12 am on Sep 18, 2003 (gmt 0)

10+ Year Member



I didn't realise that, I use Word 2001 on a Mac and that has VBA.

One problem you would get between a Mac and PC would be file paths:
A PC is C:\directory\subdirectory\filename.ext
A Mac is VolumeName:directory:subdirectory:filename.ext

jim_w

11:16 am on Sep 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I go back so far, that my 1st contact with a Mac, it wasn't even called a Mac. It was called a Lissa.

timster

4:45 pm on Sep 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Lots of different products/technologies out there can solve your resource fork problem.

If she compresses the text file before sending it, that will probably fix it, as most commercial compression products (e.g., Stuffit) figure out the resource fork stuff for you. Maybe her email client can do that automatically.

Otherwise, she can just paste the ASCII text into the body of an email. Or FTP the file to you, etc.

sun818

4:50 pm on Sep 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm curious Robert - you don't have Microsoft Word on your PC?

jim_w

5:59 pm on Sep 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There use to be StuffIt for the PC, but does it do as much as the Mac version?

FTP'ing and emailing doesn't solve his problem with renaming. He is getting the correct file in the correct format, it's a naming thing.

Additional Information for Robert:

The resource fork is so that Macs' can also open the ASCII file. That is why the file name is on the small file. The small file is required so that the Mac knows what application the file belongs to, what pretty little icon goes with it, etc.

Robert Charlton

12:32 am on Sep 19, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Thanks for all the feedback...

I'm curious Robert - you don't have Microsoft Word on your PC?

Yes, I do have MS Word, but in this case I don't want to work with or have to convert doc files. I want MS-DOS ASCII text, txt files.

When I work with writers, I have them send me page drafts within a text template I set up for each project... and I then use NoteTab Pro to manage and analyze the drafts. With NoteTab, I can also easily move text into an HTML framework, which I can display to view phrase distribution with the Google Toolbar, use a density analyzer if I want to, etc etc.

The issue for me is handling and managing a large number of files efficiently. By working this way... completely in ASCII... and using strict naming and draft numbering conventions, I save myself a lot of file handling. Again, it may not seem like a lot per file, but over the course of a project it can be hours saved. This is the first time, since I've been using this system, that I've encountered a writer with a Mac.

Fastest alternative, under the circumstances, is probably just to accept the two files, delete one, and rename the other (which does seem to be ASCII text)... but that will add up to a lot of work.

The resource fork is so that Macs' can also open the ASCII file. That is why the file name is on the small file. The small file is required so that the Mac knows what application the file belongs to, what pretty little icon goes with it, etc.

Thanks. I'm not exactly sure what the resource fork includes. Here's an indication of the header file, converted to ASCII... with a lot of binary characters that have been converted into little boxes or hyphens:

--- -->- --^---x-DTEXTMSWD-ÿÿÿÿ-€-FileName.txt--------2-- Writer's Name----2j2D.--2-STR -¿ãÿÿ-¦ý

I think the file contains more than an icon... It also contains the file name, a program ID, and the computer owner's name. Does the resource fork contain all that, or is some of this an MS-Word artifact?

How does the Mac handle html files? I've worked with Mac-generated web pages, and they don't seem to contain extra binary characters for the icon. Or does the problem only show up in the process of attaching the file to an email?

If she compresses the text file before sending it, that will probably fix it, as most commercial compression products (e.g., Stuffit) figure out the resource fork stuff for you.

Next thing I was going to try is zipping the files, but just for academic interest. I think renaming the file (only the last few characters are changed) is probably going to be faster.

jim_w

5:37 am on Sep 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>I think the file contains more than an icon...

Yea it does. But I don't remember exactly what all it contains, it’s been 15 years since I played Mac. Because the file is only 444 bytes, I doubt that the icon is actually in the file but rather a pointer to a resource of icons, the application name, etc. Really does not matter what is in it from you side of the monitor for the PC can’t do anything with it anyhow. HTML may be an idea to fix the problem though!

>Or does the problem only show up in the process of attaching the file to an email?

As I recall, it happens anytime you write a file that is a non-Mac specific file for sharing. However, HTML should not be that way, but to be honest, I don't know. If you find out please let ME know anyway just for future reference.

timster

1:35 pm on Sep 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The point of my previous post was that many apps take care of this resource fork thing automatically, and with a little jiggling, this should take care of itself.

Yes, compression might be overkill, but it doesn't take long for mail clients to compress/decompress small files automatically, and it's easy for your user to understand. (If you can get your writer to turn on MacBinary encoding in her email client, that should fix it without compression. Stuffit handles this encoding autamatically.)

BTW, it's strange that a text file would have a resource fork at all. Would you be able to find out what application your writer is creating the file in? A lot of Mac apps have the option to save as "PC text" or similar words.

jim_w

Stuffit bills themselves as the cross-platform compressor. I don't know
exact capabilities, but it did make my life easier when I was going cross platform a lot.

Robert Charlton

1:18 am on Sep 23, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



BTW, it's strange that a text file would have a resource fork at all. Would you be able to find out what application your writer is creating the file in? A lot of Mac apps have the option to save as "PC text" or similar words.

timster - Please re-read the first several sentences of the first post on this thread.

Yes, I think it's strange too... I thought a txt file was a txt file, just the way an html file is an html file... but I'm not familiar with the ways of the Mac.

jim_w

4:28 am on Sep 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My bet is she is running a really old copy of MacWORD which is why the fork is there.

Robert Charlton

6:21 am on Sep 23, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



My bet is she is running a really old copy of MacWORD which is why the fork is there.

jim_w - I'd asked her what operating system and version of Word she had, just in case that came up....

Mac OS 9.0.4
Word 98 for the Mac

Are these are "really old" or not?

She has Stuffit Lite, and she's not sure whether she can create a zip file. From what I see online, if she has DropZip she should be able to do it. If not, she's going to move the file to a Dell PC laptop she has, save it as a txt file on that machine, and then send it to me.

jim_w

7:17 am on Sep 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, not that old. I think OS10 is the latest from Apple, and 98 was after the little spat between MS and Apple.

timster

8:28 pm on Sep 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your author uses Word's Save As options to choose MS-DOS Text, that will probably do the trick. I haven't used OS 9 in a while, but if I remember that should create a file with a "generic" icon and no resource fork.

It sounds like your author's Mac is the correct vintage to have MacLinkPlus installed. That's another pretty easy way to create PC-friendly text files.

A couple reasons a text file is not just a text file:

1-Text files on Mac, Unix, and Windows all use different line breaks
(Mac and Unix files can end up looking like all one line on Windows machines)
* Mac OS 9 line break: Carriage Return (ASCII: 15)
* Unix line break: Line Feed (ASCII: 12)
* MS Line break: Carriage Return + Line Feed
* Mac OS X line break: Sometimes CR, sometimes LF (It's delightfully schizophrenic)

2-Some Mac applications (like Word) "help" by adding resource forks where they're not wanted.

jim_w

8:35 pm on Sep 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That reminded me of something. I knew someone, a doctor, that used MacLinkPlus and everytime he sent me something it was hosed. I told him to stop using it and just save the file as a, (I don't remember), file and it worked, so there is some way of doing it.

Robert Charlton

7:19 am on Sep 24, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



...just save the file as a, (I don't remember), file...

;)

Quick update... several rounds trying to get a .zip file. She keeps sending .sit files. This is why we get the big bucks, right?

jim_w

7:34 am on Sep 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>This is why we get the big bucks, right?

There's a concept. ;-))

timster

12:36 pm on Sep 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To expand that .sit file, get Stuffit Expander for PC. It's free and I bet a nickel you'll get a bona fide PC text file out of it.

You can download it at this URL, if it doesn't get editted away:
[stuffit.com...]

Robert Charlton

4:27 am on Sep 25, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



At this point, I'm almost certain it was an MacWord problem. The same Word file, converted to MS-DOS text on another Mac with a later version of Word (Mac OS 9.2.2, Word 2001) came through without a glitch.

Since the writer doesn't have this version of Word, though, what she's doing is copying the file to her Dell PC laptop, as I mentioned, and converting with Word for Windows and then emailing from that machine.

>>This is why we get the big bucks, right?

There's a concept. ;-))

I'm saving up for ongoing psychiatric treatment. :( :) :o Thanks all for your preliminary counseling.

jim_w

9:22 am on Sep 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>I'm saving up for ongoing psychiatric treatment<<

Been there, did that! ;-)))

>>Since the writer doesn't have this version of Word, though, what she's doing is copying the file to her Dell PC laptop, as I mentioned, and converting with Word for Windows and then emailing from that machine.<<

What happens if she just saves it on the Mac without going through all the steps? That was the doc's problem, he was saving as MSWORD and then converting the file. Double converting was hosing the thing up.

Robert Charlton

5:42 pm on Sep 25, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



What happens if she just saves it on the Mac without going through all the steps? That was the doc's problem, he was saving as MSWORD and then converting the file. Double converting was hosing the thing up.

I'm not sure I follow... She writes on the Mac and needs to save the file as a MacWord doc file in order to continue working on it. With back and forths with the client, the writing process can take weeks. Eventually, she needs to send the completed file to me and I want a txt file.

So she opens the file again in Word and saves it as MS-DOS text (*.txt) with no line breaks... and when she sends me this file it has a binary component left over from Word. How is this different from the double-converting? I don't understand what you mean by "without going through all the steps?" What steps can we eliminate?

jim_w

6:10 pm on Sep 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does her MacWORD have a save as PCWord option. I recall that what the doc was doing was saving as a PCWord file some way and then he was using MacLinkPlus, but I think it was just called MacLink then, and converting the file that was alredy in PCWord format.

Duh, don't know why we didn't do this before. Would these links apply?
[support.microsoft.com ]

[support.microsoft.com ]

I did a search on the Microsoft Knowledge Base for
'how to save Mac word to PC word format'

You might want to try the above on google as well.
"how to save Mac word to PC word format"

Robert Charlton

6:05 am on Sep 26, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



jim_w - I've never had any difficulty opening a Word file from a Mac user, so the support for Mac to Windows conversion must be pretty universal. But I wanted clean txt files with the proper file names, not Word files, and now that I'm getting them I'm happy.

I also wanted to know why the problem was happening, of course. My assumption is that the problem was due to the version of MacWord that was being used. Thanks...

bodine

2:06 am on Sep 27, 2003 (gmt 0)

10+ Year Member



Sorry to come into this conversation late, but what email client is she using? If it is Outlook Express, she should be encoding the attachment for Windows, and it won't try to send the resource fork. I think Eudora has a similar option (havn't used it in years). Don't know about Netscape mail.

(Sorry if this question has already been asked and answered, but it is late on Fri night, after a long week.)

jim_w

4:23 am on Sep 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Robert-

I think later versions of PCWord knows about Mac resource forks and ignores them. Ergo if she can just write a file to disk, you won't have to rename them at all because you could then load the same file instead of a ASCII text file with the wrong name but a resource fork with the correct name.

Robert Charlton

5:38 am on Sep 27, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Sorry to come into this conversation late, but what email client is she using? If it is Outlook Express, she should be encoding the attachment for Windows, and it won't try to send the resource fork.

Checking the header of one of the messages where I got the resource fork and the text file as two txt files, it reads:

User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022

Thanks. I will let her know and see if this helps...

An interesting new development, though... ;) In addition to the writer, there's an account person on this, also with a Mac, and I send her copies of my edits of the txt files that the writer and I are exchanging.

If the account person opens my files with a program called Simple Text, she sees a vertical rectangle at the beginning of each line following a carriage break (she sent me a screen shot).

She can read my txt files fine in MacWord, so we can continue working. I'm assuming that Simple Text is something like the Mac equivalent of Notepad, and that it might just be displaying the carriage returns... but why at the beginning of the lines rather than at the ends, and how can she eliminate these?

Is there a setting in the program to turn these off? Or, are these some sort of cross-platform artifacts? When I see rectangles displayed in a Windows program, it usually means that there's a character there that the program isn't equipped to interpet.

Ergo if she can just write a file to disk, you won't have to rename them at all...

jim_w - I'm sorry, but for the life of me, I can't figure out what point you're trying to make. Are you suggesting that she get a new version of Word for converting these files, or that we follow a different procedure? She's already writing the file to disk, as I understand what that means, so I'm not sure what you're advising.

This 37 message thread spans 2 pages: 37