Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-23-2013, 06:32 AM
bobk544 bobk544 is offline Can no longer read and save WORD documents as TXT files Windows 7 32bit Can no longer read and save WORD documents as TXT files Office 2010 32bit
Novice
Can no longer read and save WORD documents as TXT files
 
Join Date: Apr 2009
Posts: 10
bobk544 is on a distinguished road
Default Can no longer read and save WORD documents as TXT files

Hello, after getting a new Windows7 work PC, i can no longer programatically read WORD documents from a C# program and SAVE those WORD documents as new TXT files, but on my previous Windows7 work PC, I was able to read WORD documents and SAVE those WORD documents as new TXT files programatically using C#.



Also, on my new work PC, i don't have ADMIN rights, but i didn't have ADMIN rights on my previous work PC and was able to generate new TXT files from WORD documents programatically.

So for now, i'm transferring my WORD documents to my personal Windows8 machine at home and generating the TXT files there and tranferring the TXT files back to my Windows7 work machine.

I also checked the WORD option settings on my work PC and didn't see anything in particular that seemed to be blocking the reading and saving of WORD documents to a TXT file format ie:

Code:
Microsoft.Office.Interop.Word.Application newApp = new Microsoft.Office.Interop.Word.Application();
 
object miss = System.Reflection.Missing.Value; object path = pathin; object readOnly = false;
 
Document doc = newApp.Documents.Open(destFile, ref miss, ref readOnly, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss);
 
object format = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatDocument;
 
object nFileName = pathin + "\\" + fileName + ".txt"; object FileFormat = 
Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatText;
 
object oMissing = System.Reflection.Missing.Value;
 
doc.SaveAs(ref nFileName, ref FileFormat, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
doc.Close();
Might anyone know if there is a WORD option setting i need to turn on or turn off or a configuration i need to change that will enable the reading and saving of WORD documents to TXT files programatically?

Thanks very much for any ideas! BobK
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can no longer read and save WORD documents as TXT files After Word crash, can no longer save as .docx mrwednesday Word 4 10-15-2013 01:21 AM
mouse no longer works inside word documents? trob Word 0 02-01-2012 11:36 AM
Word documents suddenly and randomly open read only Jennifer Murphy Word 0 09-03-2011 10:13 PM
Read text from word documents using VBA? maxald Word VBA 0 08-17-2010 06:51 AM
Can't save word document in anything but read format Stuckie Word 0 01-21-2010 12:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft