-
April 1st, 2013, 11:50 AM
#1
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: ")
Console.WriteLine(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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|