none
how to set default value to the alert/message box when we hidde them RRS feed

  • Question

  • I want to hidde the alert/message box from word by setting the property of DisplayAlerts = WdAlertsLevel.wdAlertsNone, yes, it works, but the default value is No, I want to set it as Yes. You know, there are Yes/No/Cancel butttons, so how to make word get Yes automatically?

    Thanks

    Wednesday, June 8, 2011 1:56 AM

Answers

  • I have no direct experience of this, and don't know how to create the situation, but I don't believe there is anything you can do - except at a very low level (some kind of Windows app that watches for the message and issues the desired response).
     
    I have to say that the message confuses me - how, exactly, does Word know where to find files that are not in the expected location?
     

    Enjoy,
    Tony
    www.WordArticles.com
    Friday, June 10, 2011 12:05 PM

All replies

  • There's no setting in Word that will configure dialog boxes and messages to dismiss automatically or not show.

    Word is an end-user tool. The Developer APIs are an nice extension, but the application is meant for the end-user, not the developer. There's nothing in Word that will automatically and completely suppress messages targeting the end-user.


    Cindy Meister, VSTO/Word MVP
    Wednesday, June 8, 2011 4:18 AM
    Moderator
  • Thank you.

    I'm developing an application in C#, actually, we can manipulate word in background, and there is an Word API that can hidde the alert/message box, as I said, it is DisplayAlerts = WdAlertsLevel.wdAlertsNone.

    Thursday, June 9, 2011 12:54 AM
  • Which message in what circumstance?
     

    Enjoy,
    Tony
    www.WordArticles.com
    Thursday, June 9, 2011 7:14 AM
  • The alert message is "Some of the files in this web page aren't in the expected location. Do you want to download them anyway? If you're sure the web page is from a trusted source, click Yes.".

    The application is written in C#, which can capture the CF_HTML format content in the clip board, and then save the data into a html file(the data is mshtml format). The html file will be opened by word. Here, the issue will come out, if I copy image and text together, then save the data into html. When open the file by word, the alert will come out. If I click Yes, the image will be shown up in word body, otherwise, it will not.

    Here I can hidde the alert message windon by setting the property  DisplayAlerts = WdAlertsLevel.wdAlertsNone, but, word will get command of No. I want to make it get Yes.

    Some guys tell me to convert the html(mshtml format content) to regular html file may be helpful, but I don't know how to do.

    Clearly?

    Thanks

    Thursday, June 9, 2011 8:31 AM
  • Any body who know this here?
    Friday, June 10, 2011 1:55 AM
  • I have no direct experience of this, and don't know how to create the situation, but I don't believe there is anything you can do - except at a very low level (some kind of Windows app that watches for the message and issues the desired response).
     
    I have to say that the message confuses me - how, exactly, does Word know where to find files that are not in the expected location?
     

    Enjoy,
    Tony
    www.WordArticles.com
    Friday, June 10, 2011 12:05 PM