April 1st, 2013, 12:50 PM
Word AddIn that opens an existing word document
I wrote a small Word AddIn program in VB that opens an existing Word document from a specified directory when you click on a button. Here is what I have so far...
Dim Name As String
Name = InputBox("Enter File Name: ")
Dim objWord As Word.Application
objWord = New Word.Application
objWord.Visible = True
objWord.Documents.Open("H:\SNH\" + Name, , , True)
It works perfectly...However, I want to add an If statement, that outputs a message box saying File not found! when the file input is not found. Any help on how to add this new task?
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!