WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Problem of openning doc files on IIS 7

 
   Home -> Office -> Conversions RSS
Next:  word 2007 will not open after migrating  
Author Message
Eslam Kamal

External


Since: Jul 31, 2007
Posts: 4



(Msg. 1) Posted: Thu Mar 27, 2008 1:17 am
Post subject: Problem of openning doc files on IIS 7
Archived from groups: microsoft>public>word>conversions (more info?)

Hi,
I have a Web Application with this C# code hosted in IIS 7 (Vista).
I have Word 2007 on the server. My target is to save files as RTF.
--------------------------------------------------------------------------------
// Save As RTF
//
object True=true, False=false, Missing = System.Reflection.Missing.Value;
ApplicationClass app = new ApplicationClass();
object inFormat = WdOpenFormat.wdOpenFormatAuto;
//
// The following line fails to open the file and "doc" is always null
//
Document doc = app.Documents.OpenOld(ref inFile,ref False,
ref True,ref False,ref Missing,ref Missing,ref Missing,
ref Missing,ref Missing,ref inFormat);
//
// The rest of code is to save as RTF and close word
//
object saveFormat = WdSaveFormat.wdFormatRTF;
doc.SaveAs2000(ref outFile,ref saveFormat,ref Missing,ref Missing,
ref Missing,ref Missing,ref Missing,
ref Missing,ref Missing,ref Missing,ref Missing);
doc.Close(ref Missing,ref Missing,ref Missing);
app.Quit(ref Missing,ref Missing,ref Missing);
--------------------------------------------------------------------------------
This code fails to open files and msword.exe fails to close correctly.
Open() or OpenOld() returns null with no exceptions in IIS 7 (Vista), but
works fine in Desktop Applications or in IIS 6 (Win 2003).
I tried similar code in C++ and it also fails.
I tried also to put this code in a seperate exe and call it like this:
RTFConv.exe <inFile> <outFile>, but it also fails.

I want a solution for this problem or maybe another way for converting DOC
files to RTF from server side code on IIS 7.

Thanks,
Eslam Kamal
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Conversions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET