none
Setting MS Word parameters/options programmatically RRS feed

  • Question

  • I am developing an app that calls out and opens Word to edit an html file.  The html files will include certain dilineated merge fields in the file.  This all works well now, but when auto spell is on in Word, it marks these merge fields as misspelled.

    I can get around this by setting a parameter in Word to skip spellcheck for words with numbers, and I make sure all merge field names have a number in them.  BUT...this requires that each user turn this parameter on to skip words with numbers. 

    Anyone know of a way I could programatically turn this skip param on in Word before I have the user open an html file from my app? 

    I tried using Record a Macro to get example code, but it did not provide any code to use to set this parameter.

    Many thanks for any ideas on this,

    Mark

     

     

    , then This is working fine except that when editing an html filee automatic spell check

    Friday, June 24, 2011 9:35 PM

Answers

  • The setting is Application.Options.IgnoreMixedDigits. So you could use

    Dim blnIgnoreMixedDigits As Boolean
    ' Store current value
    blnIgnoreMixedDigits = Application.Options.IgnoreMixedDigits
    ' Set Word to ignore words with numbers
    Application.Options.IgnoreMixedDigits = True
    ' Your code
    ...
    ...
    ' Restore original value
    Application.Options.IgnoreMixedDigits = blnIgnoreMixedDigits


    Regards, Hans Vogelaar
    Friday, June 24, 2011 9:43 PM