Microsoft Office 2007 file type, Mime types and identifying characters - mime

Where can I find a list of all of the MIME types and the identifying characters for Microsoft Office 2007 files?
I have an upload form that is restricting uploads based on the extensions and identifying characters, but I cannot seem to find the Office 2007 MIME types.
Can anyone help?

Office 2007 MIME Types for IIS
.docm, application/vnd.ms-word.document.macroEnabled.12
.docx, application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotm, application/vnd.ms-word.template.macroEnabled.12
.dotx, application/vnd.openxmlformats-officedocument.wordprocessingml.template
.potm, application/vnd.ms-powerpoint.template.macroEnabled.12
.potx, application/vnd.openxmlformats-officedocument.presentationml.template
.ppam, application/vnd.ms-powerpoint.addin.macroEnabled.12
.ppsm, application/vnd.ms-powerpoint.slideshow.macroEnabled.12
.ppsx, application/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptm, application/vnd.ms-powerpoint.presentation.macroEnabled.12
.pptx, application/vnd.openxmlformats-officedocument.presentationml.presentation
.xlam, application/vnd.ms-excel.addin.macroEnabled.12
.xlsb, application/vnd.ms-excel.sheet.binary.macroEnabled.12
.xlsm, application/vnd.ms-excel.sheet.macroEnabled.12
.xlsx, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltm, application/vnd.ms-excel.template.macroEnabled.12
.xltx, application/vnd.openxmlformats-officedocument.spreadsheetml.template

Related

How to open .pdf, .doc files in Windows Phone (C#)

Is there any possibility to open word or pdf file in Windows Phone ?
I get the file byte data from specified API, and I want to have possibility in my application to preview the file...
you might have a look at this tutorial:
http://mobile.dzone.com/news/displaying-pdf-files-windows
But the component used is not open source. http://www.componentone.com/SuperProducts/PdfViewerPhone/
As far as i know there are no open source pdf viewer implementations for WP7/8 available.
You could try to get ComponentOne for free or with an massiv discount if you are an registered windows phone developer. Have a look at http://dev.windowsphone.com/en-us/featured/partners
I think you need to use FOXIT SDK for WP7

How OneNote accesses url of copied text from firefox, how can I use this in my app

When you copy text from a webpage in firefox (a non microsoft product) into OneNote it adds the url of the webpage along with the copied text as "Pasted from" as in the following example:
Apache OpenOffice is an open-source office productivity software suite
Pasted from <http://en.wikipedia.org/wiki/Openoffice>
How OneNote access the url info of the copied text from a non microsoft app. How can I access similar information programmatically in my apps using c++/C# or other technologies? Is there some api to access additional information from system clipboard like url, source application, source file etc?
As explained in the documentation for the HTML clipboard format, Web browsers can provide an optional SourceURL to specify where the HTML came from.

How to read pptx engine name from pptx files

Given pptx file, how to know which engine created the file? (Ex, MSOffice, docx4j/pptx4j, etc.) Perhaps, there is some place in Office Open XML structure where it's acceptable to put the signature.
It would normally go in the extended properties part:
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties">
<Application>Microsoft Office PowerPoint</Application>
which Powerpoint stores at /docProps/app.xml
That part can also contain <AppVersion>
No guarantee that an application will write or update that though. docx4j, for example, will do so only if configured to.

What are the mime types of the various file types native to .NET?

I'm using Visual Studio 2010 to open files from a server, by going to File\Open\File (Control-O) and typing in a URL. The server is serving the document from an URL without an extension (http://hostname/path/document).
If I set the mime type to text/xml, Visual Studio properly opens the document as an XML document when using text/xml, and a JavaScript document when using text/javascript. What are the mime types for .vb, .cs and other native file types in .NET? I've tried text/plain, text/csharp, and others, but all attempts opens as plain text.
Can you serve it with Content-Disposition: attachment and make sure the file name has the right extension? (the URL can stay the same...)

Where can I learn more about the PowerPoint 2010 file format?

Where can I find the PowerPoint file format definition, like the header/XML/directory structure?
PowerPoint 2010 uses three primary markup languages - PresentationML, DrawingML and PowerPoint 2010 Extentions. The first two are part of ISO/IEC 29500:2008 specs, the last one isn't.
But in all cases with and above PowerPoint 2007, the document structure (i.e. what XML and other files go where in a .pptx and how they relate) is an implementation of the Open Packaging Convention. For details, go to the section PresentationML document structure of the Open XML Explained e-book. For 2010-specific extensions, this document lists them: PowerPoint Extensions to the Office Open XML File Format.

Resources