New
#11
The whole document, including the macro. Once you exit the VB editor the macro will be available and will save along with the current document.
The whole document, including the macro. Once you exit the VB editor the macro will be available and will save along with the current document.
Okay, I guess I've got to choose "normal.dotm" from the dropdown list? Thanks for being so patient with a complete macro-newbie
I've just noticed that once I finish creating a macro then exit Word, I get no save notification. When I open word again, the macros I created are still there so it seems that the mecros must be part of an "auto-saved" template
After some tinkering it seems that the macros are indeed saved automtically. Currently it'll open already saved documents @ the % you desire but when starting a new document, fresh start of Word, it reverts back to the default.
There is a AutoExec sub that can be used to execute a macro when word starts but the problem is that it looks for a document which does not yet exist. It's running before the new document even opens...
Thank you very much for experimenting around in Word to find out why the macros are recalcitrant when Word automatically opens/generates a blank document I consider the problem solved, your code works beautifully, and I gave you a rep for your patience, time and excellent help! Happy Easter!
I can't get this to work when I open Word 2010 for the first time (and a new document opens automatically with it), nor does it work when I open a .docx file sent to me as an attachment. The macro DOES, however, seem to work when I already have Word open and click File -> New. While scouring around, I noticed that the AutoOpen sub is frequently listed with an underscore (as 'Auto_Open'). Could this be part of the problem? I want EVERY SINGLE DOCUMENT I open to be 111% zoom, regardless of what it may have been saved at. Will this macro accomplish that? Thanks!
I also get the following error when trying to open a Word document from an attachment:
Run-time error '4248':
The command is not available because no document is open.
When I click 'Debug', it highlights the first ActiveWindow command of the AutoOpen sub. Any suggestions??
Sub AutoOpen()
On Error GoTo ErrHandler
ActiveWindow.View.Type = 3 'print layout
ActiveWindow.View.Zoom.Percentage = 110
Exit Sub
ErrHandler:
If Err <> 0 Then
Err.Clear
Resume Next
End If
End Sub