Microsoft Word 2010 Error 4248
Contents |
360 games PC games runtime error 4248 no document is open Windows games Windows phone games Entertainment All Entertainment
Run Time Error 4605 Word 2013
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
Run Time Error 4605 Visual Basic
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation
Run-time Error '5941' Application-defined Or Object-defined Error
Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just run-time error 4605 excel like you, helping each other. Join them; it 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: https://support.microsoft.com/en-us/kb/813983 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 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 http://stackoverflow.com/questions/12037139/normal-dotm-macro-throws-error-opening-protected-document 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 functions from running when the document is in Protected view. The above script becomes: Sub AutoOpen() ' ' AutoOpen Macro ' ' Dim aStory As Range Dim aField As Field ' Check that document is not in Protected View before doing anything If Application.ActiveProtectedViewWindow Is Nothing Then For Each aStory In ActiveDocument.StoryRanges For Each aField In aStory.Fields aField.Update Next aField Next aStory ' set document as unchanged (prevents save dialog popping up when 'closing) - further changes will set this back ActiveDocument.Saved = True End If End Sub share|improve this an
van GoogleInloggenVerborgen veldenZoeken naar groepen of berichten
Search Go to Page... LinkBack Thread Tools Display Modes #1 02-13-2014, 01:33 PM CIF Windows 7 32bit Office 2007 Novice Join Date: Feb 2014 Posts: 7 Run Time Error 4248 when opening Word Doc from Excel I haved a pricing worksheet that our workgroup uses. It opens a Word Document from and Excel Worksheet and merges info from Excel to Word. It worked fine while everyone was using Office 2007. The users that have Office 2010 installed on their computers are getting a Run Time Error 4248 when they attempt to create the Word document from the Word Template. Here is a piece of the VBA code in the Excel worksheet. Code: Dim wrdApp As Word.Application Set wrdApp = CreateObject("Word.Application") Application.ScreenUpdating = False With wrdApp .Documents.Add Template:="G:\ABP\ArchSpec\A-Operations\Group Templates\Quote Templates\MWLinearQuote.dotx" Any help would be very much appreciated. #2 02-15-2014, 09:15 PM macropod Windows 7 32bit Office 2010 32bit Administrator Join Date: Dec 2010 Location: Canberra, Australia Posts: 14,270 That error usually occurs when you try to do something with a document that hasn't opened. In this case, that could be because Word can't find the referenced template. Can the affected users access the template by inserting the path as coded into Windows Explorer? __________________ Cheers, Paul Edstein [MS MVP - Word] #3 02-16-2014, 12:01 PM CIF Windows 7 32bit Office 2007 Novice Join Date: Feb 2014 Posts: 7 They can, but then it doesn't populate correctly. #4 02-16-2014, 02:25 PM macropod Windows 7 32bit Office 2010 32bit Administrator Join Date: Dec 2010 Location: Canberra, Australia Posts: 14,270 Quote: Originally Posted by CIF They can, but then it doesn't populate correctly. Granted, but that wasn't the point of the question, which was to establish that Word 2010 correctly creates a document from the template. That being established, which code line, if any, is highlighted when you get the 4248 error? __________________ Cheers, Paul Edstein [MS MVP - Word] #5 02-16-2014, 02:56 PM CIF Windows 7 32bit Office 2007 Novice Join Date: Feb 2014 Posts