Find Backup Folder Data Location Using GetSpecialLocation in MS OneNote 2010 in VB.NET
In this article i am going to explain about GetSpecialLocation method. you will find How to Find Backup Folder Data Location Using GetSpecialLocation in MS OneNote 2010.
In this article, I am going to explain how to use GetSpecialLocation method in your program. This method is helpful for us when we try to know about what is the location of the backups folder, automatic and manual backups of your OneNote files. It also provide information about default location of local files for new notebooks.
Microsoft Office 2010 offer some powerful tools, using this tools you can create application. Using Microsoft Visual Basic for Applications (VBA) you can create your own application according to your need. These application can performer some specific task.
For creating application we can use
- VBA host of Excel 2010
- VBA host of PowerPoint 2010
- VBA host of Word 2010
NOTE : OneNote 2010 is not a VBA host.
In this application you have to add Microsoft OneNote 14.0 Object Library reference from external references libraries using the Add References dialog.
Code that we use in this application are given below
' Connect to OneNote 2010.
' OneNote starts if it's not running.
Dim vip As OneNote14.Application
vip = New OneNote14.Application
Dim vipbf As String
Dim vipdnf As String
Dim vipuns As String
Dim msg As String
msg = "OneNote 2010 Special Locations are: " & vbCrLf & _
"Backup: " & vbCrLf & " " & vipbf & vbCrLf & _
"Default Notebook: " & vbCrLf & " " & vipdnf & vbCrLf & _
"Unfiled Notes: " & vbCrLf & " " & vipuns
MsgBox(msg, vbInformation, "GetSpecialLocation")
Step for creating application
Step 1 : Start MS Word 2010:
Step 2 : Using ALT + F11 key start Visual Basic for Applications (VBA) window:
Step 3 : Select on This document and Right click on it and select View code:
Step 4 : Add Microsoft OneNote 14.0 Object Library reference from external references libraries using the Add References dialog:
Step 5 : Write Code in Visual Basic for Applications (VBA) window:
Step 6 : Run the application using F5: