Ms Word Error 4248
Contents |
360 games PC games runtime error 4248 no document is open Windows games Windows phone games Entertainment All Entertainment vba error 4605 Movies & TV Music Business & Education Business Students & educators run time error 5941 word macro Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet
Runtime Error 4248 Word 2007
Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All run time error 4605 word 2010 Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more run time error 4605 visual basic about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges
Run-time Error '5941' Application-defined Or Object-defined Error
Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each
Run-time Error 4605 Excel
other. Join them; it only takes a minute: Sign up QA on MS word Run-time Error 4248 up vote 1 down vote favorite I am writing a VB script on MS word. The program is fine when I https://support.microsoft.com/en-us/kb/813983 ran the program on my computer. But it is failed when the document is opened in protected mode. Since the ms word will enter the protected view mode if the files are downloaded from the Internet and my word file is generated on the server side. After opening the word in protected mode and clicking the "Enable Editing" button , the word is existed from the "protected view mode" and change to "Compatibility Mode". And the ms word http://stackoverflow.com/questions/31911657/qa-on-ms-word-run-time-error-4248 start to execute the VBA program. Here is the program. Private Sub Document_Open() If Application.ActiveProtectedViewWindow Is Nothing Then createButtonFunction (ActiveDocument.Tables.Count) End If End Sub The program keep on saying that "ActiveDocument" is not found. But the number of activate document is 1. How can I set the "ActiveDocument" properties back again after the word is change from "protected view mode" and change to "Compatibility Mode" ???? vba ms-word share|improve this question asked Aug 10 '15 at 4:30 user101539 61 Problem Solved. The Document is null since the word is already open. But the event of document is still fired and causing this problem.Don;t use the default Document and activate document when the document will be opened in protected view mode. –user101539 Aug 10 '15 at 4:54 Dim doc As Word.Document Set doc = ThisDocument createButtonFunction (doc.Tables.Count) Use the ThisDocument is as same as Activate document for my case. –user101539 Aug 10 '15 at 4:57 add a comment| active oldest votes Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook. Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy p
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings http://stackoverflow.com/questions/12037139/normal-dotm-macro-throws-error-opening-protected-document and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it time error only takes a minute: Sign up Normal.dotm macro throws error opening protected document up vote 1 down vote favorite I added the following macro to my Normal.dotm for Word 2010: Sub AutoOpen() ' ' AutoOpen Macro ' ' Dim aStory As Range Dim aField As Field For Each aStory In ActiveDocument.StoryRanges For Each aField In aStory.Fields aField.Update Next aField Next run time error aStory ' set document as unchanged (prevents save dialog popping up when closing) - further changes will set this back ActiveDocument.Saved = True End Sub Now when I open some documents in Word 2010, I get the following error message: Run-time error '4248' This command is not available because no document is open So far this seems to occur for files that are opened in Protected view (e.g. files downloaded from the internet, or email attachments) - if I switch off Protected view in the Trust Centre the problem goes away. ms-word word-vba share|improve this question edited Dec 19 '15 at 18:27 Community♦ 11 asked Aug 20 '12 at 11:52 dunxd 4702926 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote Microsoft wrote a blog entry on detecting whether Protected Mode is running from within a macro. This shows that the value of Application.ActiveProtectedViewWindow is Nothing when a document is not in Protected View. So wrapping the macro functions that refer to ActiveDocument in If statements checking for this will prevent those func