+ Reply to Thread
Results 1 to 8 of 8

Can't disable Word Alerts

  1. #1
    Registered User
    Join Date
    02-06-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2016
    Posts
    50

    Can't disable Word Alerts

    I have a macro that I'm using for extracting data from a word document, however, Word interrupts the process with conversion confirmation dialogue boxes and other alerts. I would like to turn of all word alerts while this macro is running.

    Here's my code:

    Please Login or Register  to view this content.
    Ideas?

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Can't disable Word Alerts

    There should be few times that you will need that. It is commonly used when doing a mail merge.

    Try using early binding to make sure that you are using proper syntax at compile time rather than run time. You can easily change it back to late binding in the production version.

    Note how I used constant values rather than constant variables for the late binding method.
    Please Login or Register  to view this content.
    Last edited by Kenneth Hobson; 09-11-2017 at 05:01 PM.

  3. #3
    Registered User
    Join Date
    02-06-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2016
    Posts
    50

    Re: Can't disable Word Alerts

    OK, I've updated my code with what I THINK is early binding, but I'm still getting alert messages. Here's my updated code:

    Please Login or Register  to view this content.

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't disable Word Alerts

    Hi,

    You're disabling in the wrong place. Use
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  5. #5
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Can't disable Word Alerts

    You did not set a wdApp object. Referencing it therefore errors. I showed you how to get to the MSWord Application object from the MSWord document, wdDoc. IF you don't want to reference the MSWord Application object as I did, you can do it with:
    Please Login or Register  to view this content.
    To fix the lines in red and probably your MSWord alerts, change wdApp to wdDoc.

    I normally set wdApp before setting the document. I like to get the reference to an existing wdAdd or add a new instance. Then I can delete a created instance if needed.

    You should get an error for wdDoc.Visible as well. That is an MSWord Application command. Compile should have shown the Visible issue. I like to Compile from the Debug menu before a Run.

  6. #6
    Registered User
    Join Date
    02-06-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2016
    Posts
    50

    Re: Can't disable Word Alerts

    OK, I've broken this down and I'm testing with this code below, but I'm still getting alert messages. I'm not getting any errors.

    Please Login or Register  to view this content.

  7. #7
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't disable Word Alerts

    I think it would be better to open an application first, keep that open, and then open each document
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-06-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2016
    Posts
    50

    Re: Can't disable Word Alerts

    That's working great now guys! Thanks for getting me going in the right direction!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to disable application alerts On workbook opening!
    By Korjaaja in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-08-2014, 12:11 PM
  2. Disable word from trying to load links
    By koticphreak in forum Word Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2013, 05:52 PM
  3. Replies: 1
    Last Post: 06-16-2013, 12:35 AM
  4. How to disable track changes in Word 2007
    By sugaprasad in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2013, 12:47 PM
  5. Replies: 0
    Last Post: 08-15-2012, 08:13 AM
  6. Disable AutoMacros in Word Doc and delete all text files
    By abousetta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2010, 03:03 AM
  7. Disable all kinds of messages/warnings/alerts in Excel?
    By hraza in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-06-2009, 04:17 AM
  8. Replies: 16
    Last Post: 12-17-2005, 11:40 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1