Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    NY, NY, USA
    Posts
    654
    Thanks
    10
    Thanked 0 Times in 0 Posts

    word basic code auto open to max size in my normal.dot error message in word 365 works fine early

    I am using my normal.dot from "forever" in word 365
    I find that an old "auto open " code in the normal.dot file is hanging when I open a word document from say an email that causes the document to open in protected view/ read only, it errors out that this code
    Public Sub MAIN()
    If Not WordBasic.AppMaximize() Then WordBasic.AppMaximize
    If Not WordBasic.DocMaximize() Then WordBasic.DocMaximize
    End Sub

    error message 509 in Microsoft visual basic the doc maximize command is not available because this command is not available for reading
    Is there a more up to date "code"
    Thanks
    JK

  2. #2
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Willow Grove, Pennsylvania, USA
    Posts
    205
    Thanks
    4
    Thanked 49 Times in 40 Posts
    The DocMaximize function isn't needed in the latest Word versions because it no longer has any purpose.

    In the old (Word 95 and earlier) versions that contained WordBasic, there were two types of display: Single Document Interface (SDI) allows only one document per program window, and Multiple Document Interface (MDI) allows two or more documents to display child windows inside the main program window (http://msdn.microsoft.com/en-us/library/b2kye6c4.aspx). The purpose of the DocMaximize command was to maximize a child window in an MDI display.

    Newer versions of Word, and specifically Word 2013 that's part of Office 365, do not offer MDI. Every document is always maximized within its program window; only the program window can be maximized, minimized, or restored.

    Just edit the macro to comment out or delete the DocMaximize line. (I'd advise updating all macros to replace WordBasic references with their VBA equivalents wherever possible, but that's probably more work than you want to take on.)

  3. #3
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    NY, NY, USA
    Posts
    654
    Thanks
    10
    Thanked 0 Times in 0 Posts
    thank you for explaining all this much appreciated

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •