|
|
Title | Add files to the Recent Documents list and clear the list in Visual Basic .NET |
Description | This example shows how to add files to the Recent Documents list and clear the list in Visual Basic .NET. |
Keywords | Office, Word, spell, spellcheck, VB.NET |
Categories | API, Windows, VB.NET |
|
|
To add a file to the Recent Documents list, call SHAddToRecentDocs passing it the flag SHARD_PATH and the document name. (The flag SHARD_PATH means you are passing in a file name.)
To clear the Recent Documents list, call SHAddToRecentDocs passing it a null string.
|
|
Private Sub btnAdd_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnAdd.Click
SHAddToRecentDocs(SHARD_PATH, txtFilename.Text)
MessageBox.Show("OK")
End Sub
Private Sub btnClear_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnClear.Click
SHAddToRecentDocs(SHARD_PATH, vbNullString)
MessageBox.Show("OK")
End Sub
|
|
|
|
|
|