#1
|
|||
|
|||
Word 2010: always open in Draft View
Hi there,
I have the following working fine when I open word and create a New Document. Anyone know how to get this macro to run as word is opening? I.e., I mean by this when I actually run the programme, cannot get the programme to run this macro automatically when it OPENS? As opposed to me having to click New Document every time I open Word? Code:
Sub AutoNew() 'Display filename and path in window title bar ActiveWindow.Caption = ActiveDocument.FullName 'The remaining settings are the same as for autonew ActiveWindow.ActivePane.DisplayRulers = True With ActiveWindow.View .Type = wdNormalView .Zoom.Percentage = 160 'fix the tiny cursor error End With End Sub Last edited by macropod; 12-19-2011 at 06:52 PM. Reason: Fixed code presentation |
#2
|
||||
|
||||
To get it to work as you open documents within a session, I believe you will have to use the same code in an AutoOpen macro.
Or are you saying that it doesn't work for the blank document that opens when you start Word?
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional Last edited by Stefan Blom; 12-16-2011 at 12:55 PM. |
#3
|
|||
|
|||
Hi Stefan, the answer to your question is "no" it doesn't appear to work even when I add the same script to an AutoOpen macro.
I just tried simplifying everything and simply am running the following macros for "All Active and Open documents": Sub AutoNew() ActiveWindow.View = wdNormalView End Sub Sub AutoOpen() ActiveWindow.View = wdNormalView End Sub I am assuming this one will work with Normal.dotm Anyway, nothing happens. The test is really that I close Word in Print view, and re-open the programme. It does not open in Draft view - it opens in Print view! So, whatever I try this will NOT work! Best wishes, Paul |
#4
|
||||
|
||||
Try adding the following line of code:
Options.AllowOpenInDraftView = True at the beginning of each macro.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#5
|
|||
|
|||
Hi Stefan...
I've done that...Still, Word open obstinately in Print View. Here is a screen grab of VB screen (link below), where I created the macros, in-case you can spot anything office. https://skydrive.live.com/redir.aspx...D6A6BC091D!115 |
#6
|
||||
|
||||
Strange. We must be missing something...
If you run the macro manually, for example by pressing F5 when the insertion point is in the AutoOpen sub in the Visual Basic Editor, then does the view change?
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#7
|
|||
|
|||
Hi there Stefan...Just tried what you suggested, and yes, it works from that view. Pressing F5 in VBE makes the view change fine.
Paul |
#8
|
||||
|
||||
Apparently something is preventing the auto macros from running correctly. You are running a stand-alone computer (not on a corporate network)?
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#9
|
|||
|
|||
Hi Stefan...Yes, Standalone, home PC setup. I notice that the autoopen macro is running when I open a new document from email (an attachment from email), because I get an error message caused by the document being opened in Protected mode, which there are postings about elsewhere on the web (the macro gets intercepted by the Protected mode if you will, but at least there is proof it is running). However, when I OPEN word from "cold start" it's a no-go on those macros! This was not something I experienced with Word 2007 where the macros ran fine. It's as if somehow Word is just "not seeing them". Or, the rule that tells Word to open in previous view setting is more powerful or something, and trumps the macro. As you can tell I am not a coder, but I do have the "bug" on this one!
|
#10
|
||||
|
||||
This is very strange. I don't know what to suggest next. :-(
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#11
|
|||
|
|||
Hi Stefan...Ah well, thanks for trying. I find it odd that other Word 2010 users don't have the same problem. I wonder if it's something to with Outlook 2010 sharing the Word interface or something. I don't know...
|
#12
|
||||
|
||||
It really is very strange. :-(
I doubt it could be related to Outlook, though. Starting with Office 2007, Outlook no longer "shares" anything with Word; it uses a separate DLL for word processing (and a separate template called NormalEmail.dotm) when you create and read RTF/HTML messages.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
Tags |
draft view, macro |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel 2010 view of cel missing | isla | Excel | 2 | 09-27-2013 09:35 AM |
My draft message gets deleted from drafts when I send it? | Bansaw | Outlook | 2 | 07-28-2011 08:45 AM |
contact open but can't view? | upperhopton | Outlook | 0 | 07-27-2011 03:08 AM |
Suddenly cannot view open documents... | 2010Problem | Word | 4 | 06-05-2011 01:07 PM |
Text created in Work 2010- will not open in Word 2007 | Ole Sarge | Word | 1 | 05-27-2011 03:06 PM |