Microsoft Visual Basic Runtime Error 4605
Contents |
be down. Please try the request again. Your cache administrator is webmaster. Generated Thu, 20 Oct 2016 14:29:39 GMT by s_nt6 (squid/3.5.20)
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive
Vba Error 4605 This Command Is Not Available
Real-Time Help Create a Freelance Project Hire for a Full Time run time error 5941 word macro Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs runtime error 4248 this command is not available because no document is open Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Word Macro Command No Longer Working in 2013 Want to Advertise Here? Solved Word http://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-mso_windows8/run-time-error-4605-in-word-2013-no-information/1ca02c04-5cea-484e-bd23-f4d18183c1b2 Macro Command No Longer Working in 2013 Posted on 2013-11-15 Visual Basic Classic VB Script MS Word 1 Verified Solution 3 Comments 3,319 Views Last Modified: 2013-11-18 When running a Word Macro, one of my people received "Run-Time error 4605: This method or property is not available because this command is not available for reading" when https://www.experts-exchange.com/questions/28295370/Word-Macro-Command-No-Longer-Working-in-2013.html running the following command: Selection.InsertFile FileName:= _ "N:\WORD\Files\NEW_LEASES\_FM_LeaseMstrs\LseWriterExport.tab", Range:="", _ ConfirmConversions:=False, Link:=False, Attachment:=False It works fine on other PCs and I checked her rights, etc., so it seems that this command possibly no longer functions in Word/Office 2013 (the rest of us have 2010 or 2007). Any suggestions for a macro command that would work for both 20010 and 2013? Thank you. 0 Question by:rvfowler2 Facebook Twitter LinkedIn Google LVL 15 Best Solution byunknown_routine In File/Options/General see if there is a check mark in the following box: "Open e-mail attachments and other uneditable files in reading view" If so Uncheck it. Or Add this line to your code: Go to Solution 3 Comments LVL 15 Overall: Level 15 Visual Basic Classic 9 VB Script 2 MS Word 1 Message Accepted Solution by:unknown_routine2013-11-15 In File/Options/General see if there is a check mark in the following box: "Open e-mail attachments and other uneditable files in reading view"
Word user interface «Word 2013 Bug: DocumentBeforeSave event triggering when user chooses "Don't save" Word 2013: AutoSave and the new property IsInAutoSave» Feb 22 2013 Word 2013 Bug: "Not available for reading" error on opening a document Posted by WordMeister http://blogs.msmvps.com/wordmeister/2013/02/22/word2013bug-not-available-for-reading/ in Word 2013, Word object model, tags: bug, object model, Word 2013, workaround The more http://www.vbforums.com/showthread.php?516747-4605-runtime-error people use Word 2013, the more changes and problems are bubbling to the surface. Again, this one was brought to the world's attention in the Word for Developers forum. "Reading mode" was introduced a few years ago to provide a more efficient way to read documents on-screen. By default, documents opened from an e-mail attachment will display time error in this view. As the view is optimized for reading, most editing commands are not available while in that mode. This lock-out also applies to the object model. When code tries to make modifications to the document that aren't allowed while in reading mode, you see run-time error 4605: “This method or property is not available because this command is not available for reading”. Of course, we don't expect to see time error 4605 this error when a document is opened in a different view, such as the default Print Layout. But that's exactly what's happening in Word 2013 when two documents are opened, the header/footer of the second is addressed and information copied from it into the header/footer of the first document, then a method is used that affects the entire first document, rather than a specific range. A somewhat obscure combination of circumstances, but nonetheless legitimate. In effect, it appears that the second of the two document windows being opened is being tagged as open in Reading mode after the header/footer is addressed. This is a bug. The workaround is to add a line of code that explicitly forces the second document window into Print Layout view. Here are the repro steps for VBA. The workaround is the line commented out. Remove the apostrophe at the beginning of the line and the code should then work as expected, with no errors. Create a new document; save as source.docs Create a new document; save it as a template as template.dotx Run the following VBA code Sub ReadModeError() Dim WDApp As Word.Application Set WDApp = Application Dim Doc As Word.Document Set Doc = WDApp.Documents.Add("c:\test\template.dotx") Dim HF As Word.Document Set HF = WDApp.Documents.Open("c:\test\source.docx") 'HF.ActiveWindow.View = wdPrintView 'Workaround to avoid problem D
visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 3 of 3 Thread: 4605 runtime error Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Apr 4th, 2008,04:22 AM #1 Amien View Profile View Forum Posts Thread Starter Hyperactive Member Join Date Jan 2008 Posts 267 4605 runtime error i get the following error in Word-VBA: 4605; method of property is not availible because this command is not availible in read-only mode i'v tried the macro on 3 different computers. But the runtime error only appears on 1 PC .. I runtime appears when i add the following macro: Selection.Tables.Add Range:=Selection.Range, NumRows:=9, NumColumns:=3 Selection.Tables.Item(1).Cell(1, 1).Column.Width = 150 Selection.Tables.Item(1).Cell(1, 2).Column.Width = 20 Selection.Tables.Item(1).Cell(1, 3).Column.Width = 50 ........ the macro works fine .. only the table doesnt appear.. any ideas? Reply With Quote Apr 4th, 2008,07:19 AM #2 westconn1 View Profile View Forum Posts PowerPoster Join Date Dec 2004 Posts 21,945 Re: 4605 runtime error have you checked if the activedocument on that machine is opened readonly? i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part come back and mark your original post as resolved if your problem is fixed pete Reply With Quote Apr 4th, 2008,07:21 AM #3 Siddharth Rout View Profile View Forum Posts Visit Homepage Super Moderator Join Date Feb 2005 Location Mumbai, India Posts 11,940 Re: 4605 runtime error have you checked if the activedocument on that machine is opened readonly? That will not have any impact. It's only that you cannot save it. Infact I just tried it and the macro ran perfectly on a read only document.... A good exercise for the Heart is to bend down and help another up... Please Mark your Thread "Resolved", if the query is solved Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ MyGear: ACER R7 (Win 8.1+Office 2013+VS2013) || Sony VPCCB-45FN with a Win10+Office 2010. || Mac Book Pro (10.6.8) with Office 2011 Reply With Quote Quick Navigation Office