Results 1 to 10 of 10
  1. #1
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post

    Creating OneNote Notebook for Access data

    I have a need to create OneNote notebooks with notebook, section and pages title names coming from an Access query. I've found a few examples of creating pages via vba, but have not found anything on creating notebooks and sections. Has anyone come across some examples they could point me to?

    Thanks,
    Marty

  2. #2
    2 Star Lounger HiTechCoach's Avatar
    Join Date
    Sep 2011
    Location
    Oklahoma City, OK
    Posts
    162
    Thanks
    0
    Thanked 24 Times in 24 Posts
    Boyd Trimmell aka HiTechCoach (Access Information here)
    Microsoft MVP - Access Expert
    "If technology doesn't work for people, then it doesn't work."

  3. #3
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post
    Thanks for the reply. I should have included in my original post I wish to do this work fro within Access 2007/10 using vba.

  4. #4
    2 Star Lounger HiTechCoach's Avatar
    Join Date
    Sep 2011
    Location
    Oklahoma City, OK
    Posts
    162
    Thanks
    0
    Thanked 24 Times in 24 Posts
    I assumed you would be using Access VBA to perform OneNote Automation. This requires using the OneNote Object model.

    I use Access VBA a lot to perform Automation with Word, Excel, PowerPoint, FrontPage and Outlook. Have not had the need for OneNote Automation. In all cases I depend heavily on the Object Model for the Office App I am automating. For example with Excel I create a new workbook and multiple worksheets that have data from Access. I would think this is similar to what you want to do with OneNote.


    You have peaked my curiosity. Would you mind sharing a brief description of what kind on data you are wanting to put into OneNote?
    Boyd Trimmell aka HiTechCoach (Access Information here)
    Microsoft MVP - Access Expert
    "If technology doesn't work for people, then it doesn't work."

  5. #5
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post
    Boyd,

    Happy too, andthanks for your interest.

    First somebackground, my client performs reserve studies for entities such as condoassociations, planned developments and park districts among others. Basically areserve study provides an inventory-list of all things the entity isresponsible for maintaining, an assessment of the remaining useful life, a 30year expense forecast and a funding plan to meet the projected expenses. The first step in performing the reserveanalysis is to go on-site, identify, assess and record all the "stuff" the entity maintains. Thisinventory stuff categorized into a standard major component and standardsub-component. Over the years the total list of sub-components has grown to abouta 1000 items.

    A challenge thefield inspectors have is to be knowledgeable about every component they recordin the study so they can adequately discuss maintenance issues, assess eachcomponent's useful and remaining life, and determine what the currentreplacement cost is likely to be. Eachfield inspector has complied their own personal set of notes on all thecomponents they have come across. They would like a way to easily share thisinformation among themselves.

    Our first use ofOneNote is to create a set of notebooks, one for each major component and eachnotebook would have a section for each related sub-component. Each page wouldbe created by the field inspectors and populated with information from theirpersonal notes. They are currentlyfinalizing a OneNote template for the entry of their information.

    I thought, given thesize of the major/sub-component list, it would be a good idea to create thenotebook skeletons programmatically. SoI need to be able to create a OneNote section programmatically.

    The second idea wehave is to create a OneNote notebook from the most recent client study rightbefore a field inspector goes out to an inspection. In this case the notebookstructure would have each section correspond to a major component from thestudy and each page correspond to a sub-component. Various pieces of information from the studywould be added to each page. SinceOneNote can be run on mobile devices such as an iPhone and iPad, it would nowbe easy for the inspector to record his notes and pictures with eachsub-component. Often the inspectors arein the field for a week or two. So it becomesa significant issue to transcribe their notes and apply to the correct studycomponent when their memory is less than fresh … that's of course assuming theycan read their notes which is frequently not the case. With everything in OneNote, the office staffcould have legible notes and pictures, tied to specific components without theinspector bringing them back to the office.

    My search on OneNoteObject Model seemed to keep coming back to codeplex.com as the most robust setof OneNote tools. However, their websitesuggests and editor such as Visual Studio C# Express as a good editor to usewith their code. Unfortunately I'm not aC# guy. Many of the remaining search results came back to an Excel VBA examplefor creating pages, but nothing on how to create a section in VBA.

    Marty

  6. #6
    2 Star Lounger HiTechCoach's Avatar
    Join Date
    Sep 2011
    Location
    Oklahoma City, OK
    Posts
    162
    Thanks
    0
    Thanked 24 Times in 24 Posts
    Marty,

    Thanks for the explanation. Very interesting project.

    Using OneNote for note taking is a great. That is exactly what OneNote does well.

    Do you keep all the data in OneNote?

    How are you extracting the data from OneNote?


    Does OneNote allow you to create macros/vba code? If so then you might be able to do it all from within OneNote and read an Access database to get the data.

    I use VBA code in FrontPage to read web site and store all the content in a database. I use FrontPage VBA code to generate a new site by reading the updated content in the database. Maybe you could do something similar.
    Boyd Trimmell aka HiTechCoach (Access Information here)
    Microsoft MVP - Access Expert
    "If technology doesn't work for people, then it doesn't work."

  7. #7
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post
    Boyd,

    Ah there's the rub. I'm currently trying to figure out how to go about accomplishing either of these to projects. My initial thought has been to do the work from within Access, but as mentioned before having trouble tracking down some examples. If I can solve the challenge of creating the notebooks, I'll then look at extracting information from them.

    Marty

  8. #8
    2 Star Lounger HiTechCoach's Avatar
    Join Date
    Sep 2011
    Location
    Oklahoma City, OK
    Posts
    162
    Thanks
    0
    Thanked 24 Times in 24 Posts
    Marty,

    If it we my project I would firs worry about getting the data out of OneNote. If that is not possible then there really is no need to spend any time getting the data into OnNote.
    Boyd Trimmell aka HiTechCoach (Access Information here)
    Microsoft MVP - Access Expert
    "If technology doesn't work for people, then it doesn't work."

  9. #9
    New Lounger
    Join Date
    Feb 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Marty,

    I ran across this post, I have been looking for the same help in creating a OneNote notebook from within access using VBA. I'm surprised that onenote does not have the same functionality as the other office programs. I did just figure out a couple of things and wanted to see if you did as well. I have some code so I can click and open a one note notebook from my access form. I also just figured out that if I create a couple of blank pages and store them in a public location I can create code to create the folder copy the blank pages to the folder and then open those pages using one note and it thinks it is a notebook and adds to my notebooks.

    Tell me where you are and I can share more if need be.

    Jeff

  10. #10
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,235
    Thanks
    202
    Thanked 796 Times in 729 Posts
    Marty,

    Maybe this is what you are looking for: Application Interface OneNote.
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •