You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the macro in the "ExcelSampleAdvanced" workbook, I am getting "Compile error: user-defined type not defined" at the line shown below. How do I correct this? Thanks
`
Option Explicit
Sub EvernoteSDKSample()
Dim EvernoteSession As New ENSessionAdvancedForCOM <<<<<<<<<COMPILE ERROR HERE
' Be sure to put your own consumer key and consumer secret here.
Call EvernoteSession.SetSharedSessionConsumerKey(SUPPRESSED, SUPPRESSED")
If EvernoteSession.SharedSession.IsAuthenticated = False Then
Call EvernoteSession.SharedSession.AuthenticateToEvernote
End If
' Get a list of all notebooks in the user's account.
Dim myNotebooks As ENCollection
Set myNotebooks = EvernoteSession.SharedSession.ListNotebooksForCOM()
' Search for some text across all notes (i.e. personal, shared, and business).
' Change the Search Scope parameter to limit the search to only personal, shared, business - or combine flags for some combination.
Dim myNoteslist As ENCollection
Dim textToFind As String
textToFind = "some text to find"
Dim EvernoteNoteSearch As New ENNoteSearchForCOM
Set myNoteslist = EvernoteSession.SharedSession.FindNotesForCOM(EvernoteNoteSearch.NoteSearch(textToFind), Nothing, EvernoteSDK.SearchScope_All, EvernoteSDK.SortOrder_RecentlyUpdated, 500)
' Now load the retrieved text into a worksheet.
Dim currentRow As Integer
Dim result As ENSessionFindNotesResult
If myNoteslist.Count > 0 Then
Dim ref As ENNoteRef
Dim noteStore As ENNoteStoreClient
Dim savedNoteStore As ENNoteStoreClient
Dim edNote As edamNote
Dim edTag As EdamTag
Dim tagList As ENCollection
Dim noteTag As Variant
Dim noteTags As String
Sheet1.Cells(1, 1) = "Note Title"
Sheet1.Cells(1, 2) = "Notebook"
Sheet1.Cells(1, 3) = "Tags"
Sheet1.Cells(1, 4) = "Date Created"
Sheet1.Cells(1, 5) = "Date Updated"
Sheet1.Cells(1, 6) = "Note Contents"
Sheet1.Rows(1).Font.Bold = True
currentRow = 2
For Each result In myNoteslist
Set ref = result.NoteRef
Set noteStore = EvernoteSession.SharedSession.NoteStoreForNoteRef(ref)
Set edNote = noteStore.GetNoteForCOM(ref.GUID, True, False, False, False)
If Not noteStore Is savedNoteStore Then
Set tagList = noteStore.ListTagsForCOM()
Set savedNoteStore = noteStore
End If
noteTags = ""
If edNote.TagGuids.Count > 0 Then
For Each noteTag In edNote.TagGuids
noteTags = noteTags + tagList(noteTag).Name + ", "
Next noteTag
noteTags = Left(noteTags, Len(noteTags) - 2)
End If
Sheet1.Cells(currentRow, 1) = result.Title
Sheet1.Cells(currentRow, 2) = result.Notebook.Name
Sheet1.Cells(currentRow, 3) = noteTags
Sheet1.Cells(currentRow, 4) = result.Created
Sheet1.Cells(currentRow, 5) = result.Updated
Sheet1.Cells(currentRow, 6) = EvernoteSession.SharedSession.NoteTextContent(edNote.Content)
currentRow = currentRow + 1
Next result
End If
End Sub
`
The text was updated successfully, but these errors were encountered:
Be sure you follow the instructions in the Getting Started Guide for referencing the SDK within Excel:
In order to use the SDK with COM, be sure to add a reference to the library first. For example, in a Microsoft Word or Excel Visual Basic window, from the main menu you would select Tools > Add References..., then place a checkmark next to Evernote Cloud SDK for Windows.
In the macro in the "ExcelSampleAdvanced" workbook, I am getting "Compile error: user-defined type not defined" at the line shown below. How do I correct this? Thanks
`
Option Explicit
Sub EvernoteSDKSample()
End Sub
`
The text was updated successfully, but these errors were encountered: