Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2021, 08:03 PM
jec1 jec1 is offline AutoNew macro not working in Normal template Windows 7 32bit AutoNew macro not working in Normal template Office 2013
Advanced Beginner
AutoNew macro not working in Normal template
 
Join Date: Jan 2012
Posts: 84
jec1 is on a distinguished road
Default AutoNew macro not working in Normal template

Hi, when I create a New Word document from the Normal Template it does not automatically fire this macro. AutoExec - doesn't work because the Application is not open. Does anyone know how to make it work automatically without playing the macro?


Module AutoNew

Sub Main()
'StylePane Open
With Application


.TaskPanes(wdTaskPaneFormatting).Visible = True
.CommandBars("Styles").Position = msoBarRight
.CommandBars("Styles").Width = 300
End With
' ActiveWindow.DocumentMap = False
End Sub
Reply With Quote
  #2  
Old 06-23-2021, 08:50 PM
gmayor's Avatar
gmayor gmayor is offline AutoNew macro not working in Normal template Windows 10 AutoNew macro not working in Normal template Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Add a macro to your normal template to call your 'Main' macro.

Code:
Sub AutoNew()
    Main
End sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 06-23-2021, 09:59 PM
jec1 jec1 is offline AutoNew macro not working in Normal template Windows 7 32bit AutoNew macro not working in Normal template Office 2013
Advanced Beginner
AutoNew macro not working in Normal template
 
Join Date: Jan 2012
Posts: 84
jec1 is on a distinguished road
Default

Thank you Graham.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with attaching template in AutoNew sub jmasiak Word VBA 4 09-25-2020 08:07 AM
AutoNew macro not working in Normal template My Normal.Dotm is not working any more ! (Denmark) ksor Word 7 04-01-2018 05:10 PM
AutoNew macro not working in Normal template Normal dot not working properly John9210 Word 13 02-12-2018 07:50 AM
Auto-update field codes in Outlook Template - AutoOpen Macro not working victoriasun Outlook 5 12-22-2015 01:54 AM
Macro to open template not working Brandi Mail Merge 2 06-24-2010 09:29 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:54 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft