Error 5151 Word 2003
Contents |
'5151' message DS Forums RegisterFAQToday's PostsSearchRules My DS Account No account yet? Create one now!OR Login with Digital Spy account word was unable to read this document it may be corrupt 2010 Help with Run-time error '5151' message Search Forums Show Threads Show Posts
Word Was Unable To Read This Document It May Be Corrupt 2007
Advanced Search Go to Page... Thread Tools Search this Thread 01-11-2010, 21:19 #1 waltermcculloch Forum Member word was unable to read this document. it may be corrupt mac Join Date: Oct 2006 Posts: 242 Help with Run-time error '5151' message Hi, Got a problem with a Word Template trying to use at work. It's linked into our system and merges word was unable to read this document it may be corrupt 2013 information into the template. I work on a network. The message is headed up Microsoft Visual Basic and the message reads as follows: Run-time error '5151': Word was unable to read this document. It may be corrupt. Try one of the following: *Open and Repair the file. *Open the file with the Text Recovery converter. I had problems before but I think all I had
Microsoft Word Was Unable To Read This Document It May Be Corrupt
to do was untick the Read Only property of the file/template. This is a new template since I last had this problem. I've tried that and still get the above message. I got the person sitting opposite me to try it and it worked on her PC - checked Word etc and can't see any different in the settings/security. Does anyone have any idea what the problem could be? If you need any other details about the problem just ask. Thanks waltermcculloch View Public Profile Find More Posts by waltermcculloch Please sign in or register to remove this advertisement. 02-11-2010, 08:56 #2 waltermcculloch Forum Member Join Date: Oct 2006 Posts: 242 When you click on the Debug button, the following section is highlighted. Documents.Add Template:=TemplateType$, newtemplate:=0 Not sure if this helps waltermcculloch View Public Profile Find More Posts by waltermcculloch 02-11-2010, 09:13 #3 IvanIV Forum Member Join Date: May 2006 Posts: 24,827 It cannot open the template file. Do you know which one? You could try to doubleclick it to see if Word opens a new document using it as a template. It can b
a new document using the code below:Application.Documents.add(Template:=strAppPath & "\" &"ErrMsgUserguide.dot", NewTemplate:=False, DocumentType:=0)Every time this line fails. What could be causing this another word for unable to read error?If I run the macro from the MS Visual Basic IDE word was unable to read this document. it may be corrupt mac 2011 in Word it works fine.Obviously calling the same macro from the C# application has something to
How To Open A Corrupt Word File
dowith the problem. Any ideas? Howard Kaikow 2006-01-29 13:32:08 UTC PermalinkRaw Message You have to create a Word object in the C# code and use that instead http://forums.digitalspy.co.uk/showthread.php?t=1379706 ofApplication.--http://www.standards.com/; See Howard Kaikow's web site.Post by techieI have a C# application that creates an instance of Word 2003 and executes aApplication.Documents.add(Template:=strAppPath & "\" &"ErrMsgUserguide.dot", NewTemplate:=False, DocumentType:=0)Every time this line fails. What could be causing this error?If I run the macro from the MS Visual Basic IDE in Word it works fine.Obviously calling the http://microsoft.public.word.vba.narkive.com/cIofVIQt/documents-add-fails same macro from the C# application has something to dowith the problem. Any ideas? techie 2006-01-29 14:19:44 UTC PermalinkRaw Message Post by Howard KaikowYou have to create a Word object in the C# code and use that instead ofApplication.I am creating a Word object in my C# code. Its seems that this creates alock on the Documents collection. The macro is unable to add a new documentin Documents.I tried doing the same thing in my C# code and that works. Effectively I'vetransferred that one line from the macro to my C# and that does the trick.I still don't know what causes the problem. Is it a security issue? The C#application is standalone application rather than a website. Tony Jollans 2006-01-29 17:23:01 UTC PermalinkRaw Message I think you're missing the point of Helmut's and Howard's postsApplication.etc.will not work unless "Application" is the name of your object variable whichpoints to the Word object you have created.--Enjoy,TonyPost by techiePost by Howard KaikowYou ha
anything in Word 2003 I get an error 5151. Does anyone know what this means? too_huge, Oct 18, 2004 #1 http://www.office-forums.com/threads/word-2003-error-5151.1642154/ Advertisements Show Ignored Content Want to reply to this thread or ask your own question? It takes just 2 minutes to sign up (and it's free!). Just click the sign up http://www.pcreview.co.uk/threads/access-automation-error-calling-a-word-template.3769037/ button to choose a username and then you can ask your own questions on the forum. Sign Up Now! Similar Threads Word 2003 error with art from earlier version of Word unable to Pauline, Dec 9, 2003, in forum: Word Errors Replies: 3 Views: 62 TF Dec 9, 2003 Run-Time Error 5 Error when opening Word 2003 FlightL, Oct 17, 2004, in forum: Word Errors Replies: 2 Views: 183 Beth Melton Oct 17, 2004 Error starting Word 2003: Visual Basic Runtime Error '53' File Not Found 'wfill32.dll' shapeshifter, Nov 23, 2004, in forum: Word Errors unable to read Replies: 0 Views: 178 shapeshifter Nov 23, 2004 Word 2003: Error 16389: Internal Error Sean McNamara, Jan 14, 2005, in forum: Word Errors Replies: 0 Views: 143 Sean McNamara Jan 14, 2005 Word Office 2003 Error on Startup (Unknown Error returned from App Rick, Mar 3, 2005, in forum: Word Errors Replies: 3 Views: 127 Rick Mar 3, 2005 Getting error msvcrt.dll error while launching Word 2003 Saakar, Jan 9, 2006, in forum: Word Errors Replies: 0 Views: 190 Saakar Jan 9, 2006 Microsoft Word 2003 w\sp1 on Windows 2003 Server Error kccerner, Mar 19, 2007, in forum: Word Errors Replies: 0 Views: 67 kccerner Mar 19, 2007 Word document opens fine in Word 2003 -- error in Word 2002 TEC-Admin, Oct 10, 2007, in forum: Word Errors Replies: 1 Views: 199 Terry Farrell Oct 10, 2007 Loading... Your name or email address: Do you already have an account? No, create an account now. Yes, my password is: Forgot your password? Stay logged in Welcome to Office Forums! Welcome to the Microsoft Office Forums where you can ask questions or find answers on a
Hopefully someone has had this issue and can help, but I’m stumped at this point. Both Word and Access are Office 2003 applications. I’m launching Word from an Access form and the application launches just fine, using either GetObject if there’s an active session or CreateObject it there isn’t. If I open a document I do not have any problems, however, when I attempt to use a template I get an error 5151 “Word was unable to read this document. It may be corrupt.†If I launch Word manually the template opens just fine, but the code cannot seem to do this. I’ve gotten a very functional error routine going, so not all is lost, but my original goal ass not been met. All variables in the code sample below have been explicitly declared and when I step through the code using watch the string variables have all the correct values ---------------------------------------------------------------------------------- strPath = DocPath() 'UDF strTemplate = conAppPath & conDocDot strDocName = frm.txtPlogID.Value & ".doc" Set objWord = GetObject(, "Word.Application") 'intErr is assigned an error number in the error trap If intErr = 429 Then Set objWord = CreateObject("Word.Application") End If With objWord .Activate Set objDoc = .Documents.Add(Template:=strTemplate) .Visible = True End With With objDoc .SaveAs strPath & strDocName .Activate End With objWord.Visible = Tru ---------------------------------------------------------------------------------- Thanks ahead of time, I've been saved more than once by contributors to this forum. -- Kevin Backmann Kevin B, Mar 18, 2009 #1 Advertisements ryguy7272 Guest There are many ways to export data from Access to Word. Here is one: Private Sub cmdExportToWord_Click() Dim objWordApp As Word.Application Dim objWord As Word.Document Dim oSel As Word.Selection DoCmd.OutputTo acOutputReport, "Samples", acFormatRTF, "E:\SamplesReport2.rtf" Set objWordApp = CreateObject("Word.Application") Set objWord = objWordApp.Documents.Open("E:\SamplesReport2.rtf") ' Make Word visible. objWord.Application.Visible = True Set objWord = Nothing Set objWordApp = Nothing End Sub Also, look here: http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html http://www.members.shaw.ca/AlbertKallal/wordmerge/page2.html Ryan--- -- RyGuy-- If the post was helpful, please click the ''Yes'' button to indicate such! "Kevin B" wrote: > Hopefully someone has had this issue and can help, but I’m stumped at this > poin