Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-10-2014, 08:41 AM
spookiepower spookiepower is offline Problems adding VBA code to word 2010! Windows 7 32bit Problems adding VBA code to word 2010! Office 2010 32bit
Novice
Problems adding VBA code to word 2010!
 
Join Date: Sep 2013
Location: Denmark
Posts: 20
spookiepower is on a distinguished road
Default Problems adding VBA code to word 2010!

I a short VBA code I need to add to my doc, and that needs to be run each time the doc is being opened.

I have found out that to open the VBA editor I need to press Alt+F11, and copy this code -

Private Sub Document_Open()
ActiveDocument.Windows(1).View.ShadeEditableRanges = False
End Sub

But when I click Save, I get the message, that I can't add this code to a document without macros!

What must I do now, to get it to work ?

- Kim -
Reply With Quote
  #2  
Old 02-10-2014, 09:08 AM
gmaxey gmaxey is offline Problems adding VBA code to word 2010! Windows 7 32bit Problems adding VBA code to word 2010! Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,598
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

You document extension needs to be docm not docx
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems adding VBA code to word 2010! VBA Code for adding Macro to QAT OTPM Project 4 08-22-2013 01:33 PM
Problems adding VBA code to word 2010! Many Corruption Problems Word 2010 sleake Word 2 07-25-2013 07:20 PM
Problems adding VBA code to word 2010! Spacing problems with word 2010 Microsoftenquirer1000 Word 5 06-25-2012 12:01 PM
Problems adding VBA code to word 2010! VBA code for adding slash (/) Jasa P Word VBA 6 05-09-2012 10:12 AM
Problems adding more than 1 MP3 audio track to play across slides in PPT 2010 DCSCL PowerPoint 0 08-30-2011 03:21 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:37 PM.


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