MS Office file associations

Greg Bognar via mc <[email protected]>
Newsgroups gmane.comp.gnome.apps.mc.general
Message-ID <[email protected]>
Hi,

Newbie question.  I'm trying to view [F3] MS Office files, but I can't figure
out how to use different commands for .doc and .docx files.

From my mc.ext:

# Microsoft Word Document
regex/i/\.(do[ct]|wri|docx)$
   Open=/usr/lib/mc/ext.d/doc.sh open msdoc
   View=%view{ascii} /usr/bin/docx2txt %f -
type/^Microsoft\ Word
   Open=/usr/lib/mc/ext.d/doc.sh open msdoc
   View=%view{ascii} /usr/lib/mc/ext.d/doc.sh view msdoc

docx2txt allows me to view .docx files, but not the older .doc files.  For that,
I would like to use catdoc.  But I don't seem to be able to figure out the regex
for using both.  E.g., this doesn't work:

shell/.doc
   View=%view{ascii} /usr/bin/catdoc %f

shell/.docx
   View=%view{ascii} /usr/bin/docx2txt %f -

I can view .docx files, but not .doc files.

I'd like to do a similar thing for .xlsx and .xls files, using xlsx2csv and
xls2csv.

Any hints?

All the best,
Greg
_______________________________________________
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.