DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Sat, 4 Aug 2007 11:54:26 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    GaryDean am
          2    Mark Rae [MVP]
          3    (Walter Wang [MSFT])


Uploading MS Word Documents   
I'm developing an app to upload MS word documents where I will store them in 
a varbinary to do full text searching on.

My first question is: How can I verify that the uploaded file is a valid MS 
Word Document
second question: Is there a way to convert it to plain text?

Is there a set of methods that deal with office documents?

-- 
Regards,
Gary Blakely
Dean Blakely & Associates
www.deanblakely.com
Date:Sat, 4 Aug 2007 11:54:26 -0700   Author:  

Re: Uploading MS Word Documents   
"GaryDean" <GaryDean@newsgroups.nospam> wrote in message 
news:%23Ybcnhs1HHA.5772@TK2MSFTNGP02.phx.gbl...


> My first question is: How can I verify that the uploaded file is a valid 
> MS Word Document


You can check its MIME type:

if(MyFileInputControl.PostedFile.ContentType != "application/msword")
{
    // do something...
}


> second question: Is there a way to convert it to plain text?


Not natively...


> Is there a set of methods that deal with office documents?


http://www.aspose.com/Products/Aspose.Words/Default.aspx


-- 
Mark Rae
ASP.NET MVP
http://www.markrae.net
Date:Sat, 4 Aug 2007 20:02:33 +0100   Author:  

RE: Uploading MS Word Documents   
Hi Gary,

I agree with Mark, for ASP.NET Web Application, you will have to use some 
third party tool to convert a Word document to plain text since there's no 
built-in support for Office documents in .NET Framework and Office 
automation at server-side is not supported: 

#Considerations for server-side Automation of Office
http://support.microsoft.com/kb/257757

Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Mon, 06 Aug 2007 01:00:49 GMT   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us