Creating word document (.doc) with attachment in unix solaris

Hi All,

Is it possible to creation a word document (.doc) in unix solaris which includes an attachment (i.e similar to insert -> object add attachment in windows)

Requirement is to add files into .doc and the files is present in unix servers.
Is it possible to do this within unix instead of downloading the files and manully attaching them?

Regards
Ajay

Why?
Do you have MS OFFICE for unix?

Its solarix sparc machine. so i assume i cannot use, since i directly login to command line and have no GUI console. Is there any other alternative?

to generate a true .doc you need word...

Maybe shoud you explain what you wish to do, and what tools you have, so far we know you are on a sparc architecture using solaris (version??), what mailer system?
Because if your question summarized is: Can we send attachments in mails using unix, the answer is YES... but as you say, you have no GUI, so it will be command line... and here it gets tricky so the best is to write a shell script...

Hi,

To be frank have no tools, its Sparc OS 5.10 version of solaris.
I need to Insert a file into .doc in windows ( Insert -> Object and then select the file and create the object within the .doc )
However the files which are inserted into .doc are files that i ftp to windows from Unix using filezilla.

Since there are quiet large no of files, i tried to create a .doc in shell
uuencode $FILE $FILE > sample.doc
Then i used mailx to send the file directly to me
uuencode sample.doc sample.doc | mailx <mail-id>

I received the sample.doc attachment in my mail, however was unable to open it.
I am expecting the attachment in the mail to be .doc and within .doc there must be a file i redirected to sample.doc

Windows style File Extensions have no special meaning in unix. Changing the name of a file does not change the internal format of the file in unix or Windows. i.e. Just naming a file ".doc" does not make it a Microsoft Word Document. Nor does naming a file ".docx" make it a moderm Microsoft Word Document.

A Microsoft Word format file is not a normal text file and the format is much too complex to process in unix Shell. Suggest you pursue this query with Microsoft.