none
Selecting a file using OpenFileDialog RRS feed

  • Question

  • I am developing a Mail-Merge Add-in in visual studio 2008. When I select a file (.docx or .dotx) using OpenFileDialog, Normal.dotm file is being edited automatically. However it works fine if I select a text file. As a result winword.exe doesn't stop even after quitting the Add-In. How to prevent Normal.dotm and NormalEmail.dotm being accessed unintentionally? Please help
    • Moved by CoolDadTx Tuesday, November 11, 2014 5:48 PM Office related
    Tuesday, November 11, 2014 4:57 PM

Answers

  • Hi,

    Try disabling your add ins in Word. Go to Options in Word. Choose Add ins from the menu. In the window click on the GO button next to manage. Uncheck the various add ins one by one and see which one is bugging your code. 


    Maurice

    Wednesday, November 12, 2014 6:06 PM

All replies

  • Hi,

    Try disabling your add ins in Word. Go to Options in Word. Choose Add ins from the menu. In the window click on the GO button next to manage. Uncheck the various add ins one by one and see which one is bugging your code. 


    Maurice

    Wednesday, November 12, 2014 6:06 PM
  • You can specifiy a word file using something like this.

    Dim WordFile As String = C:\Folder\Word.docx"
    Dim ps2 As Process = Process.Start(WordFile)
    ps2.WaitForExit()

    Wednesday, November 12, 2014 10:47 PM