Group:  Other Microsoft Office Products ยป microsoft.public.onenote
Thread: Question about OneNote API

Geek News

Question about OneNote API
DGS 3/23/2007 12:53:05 PM
Hello,

The old 2003 api did not allow you to enter an object at the current cursor
location. Do you know if the new API for OneNote 2007 allows for this?


Thanks,
Derek
Re: Question about OneNote API
Ilya Koulchin <ikoulchine[ at ]hotmail.com> 3/23/2007 5:29:54 PM
DGS wrote:
[Quoted Text]
> The old 2003 api did not allow you to enter an object at the current cursor
> location. Do you know if the new API for OneNote 2007 allows for this?

There is no explicit "insert at cursor" command, however, you can get
the selection when exporting the page content, and then import your
changes at the selected location. You will be able to get the selection
location even if nothing is selected - in that case, you'll just see an
empty text block in the XML that is marked as selected.

Ilya
Re: Question about OneNote API
DGS 3/23/2007 7:48:02 PM
<?xml version="1.0" ?>
- <one:Page
xmlns:one="http://schemas.microsoft.com/office/onenote/2007/onenote"
ID="{B0B6D4E7-DBBF-4279-A9E2-085EFC128000}{1}{B0}" name="test"
dateTime="2007-03-23T16:57:14.000Z"
lastModifiedTime="2007-03-23T19:24:35.000Z" isCurrentlyViewed="true"
selected="partial" style="font-family:Calibri;font-size:11.0pt" lang="en-US">
- <one:PageSettings RTL="false" color="automatic">
- <one:PageSize>
<one:Automatic />
</one:PageSize>
<one:RuleLines visible="false" />
</one:PageSettings>
- <one:Title style="font-family:Calibri;font-size:17.0pt" lang="en-US">
- <one:OE author="d" lastModifiedBy="d"
creationTime="2007-03-23T16:57:17.000Z"
lastModifiedTime="2007-03-23T19:24:35.000Z"
objectID="{118E03D9-24DF-45A2-B902-05F1C46F9919}{15}{B0}" alignment="left">
- <one:T>
- <![CDATA[ test
]]>
</one:T>
</one:OE>
</one:Title>
- <one:Outline selected="partial" author="d" lastModifiedBy="d"
lastModifiedTime="2007-03-23T19:24:16.000Z"
objectID="{29CC9639-B3B0-4AC9-B80C-2470B9F1F2F8}{197}{B0}">
<one:Position x="72.0" y="402.9754333496094" z="4" />
<one:Size width="72.0" height="13.42773056030273" />
- <one:OEChildren selected="partial">
- <one:OE creationTime="2007-03-23T19:24:16.000Z"
lastModifiedTime="2007-03-23T19:24:16.000Z"
objectID="{29CC9639-B3B0-4AC9-B80C-2470B9F1F2F8}{198}{B0}" alignment="left"
selected="partial">
- <one:T selected="all">
- <![CDATA[
]]>
</one:T>
</one:OE>
</one:OEChildren>
</one:Outline>

</one:Page>


Ok, I am able to pull the xml from the current page, and I understand that
the cursor is where selected="all" but I can not figure out the correct xml
syntax for an image.

According to MSDN, an image can either be referenced in a file or is
included inline in base64 encoded.. It does not really go into much detail
other wise.

I am thinking I would want to replace the - <one:T selected="all">
- <![CDATA[
]]>
</one:T>

with something like <one:Image path="pathToPicture"> </one:Image> but I have
not had any luck.

Thanks,
D



"Ilya Koulchin" wrote:

[Quoted Text]
> DGS wrote:
> > The old 2003 api did not allow you to enter an object at the current cursor
> > location. Do you know if the new API for OneNote 2007 allows for this?
>
> There is no explicit "insert at cursor" command, however, you can get
> the selection when exporting the page content, and then import your
> changes at the selected location. You will be able to get the selection
> location even if nothing is selected - in that case, you'll just see an
> empty text block in the XML that is marked as selected.
>
> Ilya
>
Re: Question about OneNote API
DGS 3/23/2007 8:05:12 PM
Figures that I would get it working just after I posted.

Heres what I went with:

<one:Image><one:File path="c:\wallpaper.png"/></one:Image>



"DGS" wrote:

[Quoted Text]
> <?xml version="1.0" ?>
> - <one:Page
> xmlns:one="http://schemas.microsoft.com/office/onenote/2007/onenote"
> ID="{B0B6D4E7-DBBF-4279-A9E2-085EFC128000}{1}{B0}" name="test"
> dateTime="2007-03-23T16:57:14.000Z"
> lastModifiedTime="2007-03-23T19:24:35.000Z" isCurrentlyViewed="true"
> selected="partial" style="font-family:Calibri;font-size:11.0pt" lang="en-US">
> - <one:PageSettings RTL="false" color="automatic">
> - <one:PageSize>
> <one:Automatic />
> </one:PageSize>
> <one:RuleLines visible="false" />
> </one:PageSettings>
> - <one:Title style="font-family:Calibri;font-size:17.0pt" lang="en-US">
> - <one:OE author="d" lastModifiedBy="d"
> creationTime="2007-03-23T16:57:17.000Z"
> lastModifiedTime="2007-03-23T19:24:35.000Z"
> objectID="{118E03D9-24DF-45A2-B902-05F1C46F9919}{15}{B0}" alignment="left">
> - <one:T>
> - <![CDATA[ test
> ]]>
> </one:T>
> </one:OE>
> </one:Title>
> - <one:Outline selected="partial" author="d" lastModifiedBy="d"
> lastModifiedTime="2007-03-23T19:24:16.000Z"
> objectID="{29CC9639-B3B0-4AC9-B80C-2470B9F1F2F8}{197}{B0}">
> <one:Position x="72.0" y="402.9754333496094" z="4" />
> <one:Size width="72.0" height="13.42773056030273" />
> - <one:OEChildren selected="partial">
> - <one:OE creationTime="2007-03-23T19:24:16.000Z"
> lastModifiedTime="2007-03-23T19:24:16.000Z"
> objectID="{29CC9639-B3B0-4AC9-B80C-2470B9F1F2F8}{198}{B0}" alignment="left"
> selected="partial">
> - <one:T selected="all">
> - <![CDATA[
> ]]>
> </one:T>
> </one:OE>
> </one:OEChildren>
> </one:Outline>
>
> </one:Page>
>
>
> Ok, I am able to pull the xml from the current page, and I understand that
> the cursor is where selected="all" but I can not figure out the correct xml
> syntax for an image.
>
> According to MSDN, an image can either be referenced in a file or is
> included inline in base64 encoded.. It does not really go into much detail
> other wise.
>
> I am thinking I would want to replace the - <one:T selected="all">
> - <![CDATA[
> ]]>
> </one:T>
>
> with something like <one:Image path="pathToPicture"> </one:Image> but I have
> not had any luck.
>
> Thanks,
> D
>
>
>
> "Ilya Koulchin" wrote:
>
> > DGS wrote:
> > > The old 2003 api did not allow you to enter an object at the current cursor
> > > location. Do you know if the new API for OneNote 2007 allows for this?
> >
> > There is no explicit "insert at cursor" command, however, you can get
> > the selection when exporting the page content, and then import your
> > changes at the selected location. You will be able to get the selection
> > location even if nothing is selected - in that case, you'll just see an
> > empty text block in the XML that is marked as selected.
> >
> > Ilya
> >
Re: Question about OneNote API
"EMRhelp.org" <EMRhelp.org[ at ]gmail.com> 3/23/2007 8:35:09 PM
On Mar 23, 3:05 pm, DGS <D...[ at ]discussions.microsoft.com> wrote:
[Quoted Text]
> Figures that I would get it working just after I posted.
>
> Heres what I went with:
>
> <one:Image><one:File path="c:\wallpaper.png"/></one:Image>
>
>
>
> "DGS" wrote:
> > <?xml version="1.0" ?>
> > - <one:Page
> > xmlns:one="http://schemas.microsoft.com/office/onenote/2007/onenote"
> > ID="{B0B6D4E7-DBBF-4279-A9E2-085EFC128000}{1}{B0}" name="test"
> > dateTime="2007-03-23T16:57:14.000Z"
> > lastModifiedTime="2007-03-23T19:24:35.000Z" isCurrentlyViewed="true"
> > selected="partial" style="font-family:Calibri;font-size:11.0pt" lang="en-US">
> > - <one:PageSettings RTL="false" color="automatic">
> > - <one:PageSize>
> > <one:Automatic />
> > </one:PageSize>
> > <one:RuleLines visible="false" />
> > </one:PageSettings>
> > - <one:Title style="font-family:Calibri;font-size:17.0pt" lang="en-US">
> > - <one:OE author="d" lastModifiedBy="d"
> > creationTime="2007-03-23T16:57:17.000Z"
> > lastModifiedTime="2007-03-23T19:24:35.000Z"
> > objectID="{118E03D9-24DF-45A2-B902-05F1C46F9919}{15}{B0}" alignment="left">
> > - <one:T>
> > - <![CDATA[ test
> > ]]>
> > </one:T>
> > </one:OE>
> > </one:Title>
> > - <one:Outline selected="partial" author="d" lastModifiedBy="d"
> > lastModifiedTime="2007-03-23T19:24:16.000Z"
> > objectID="{29CC9639-B3B0-4AC9-B80C-2470B9F1F2F8}{197}{B0}">
> > <one:Position x="72.0" y="402.9754333496094" z="4" />
> > <one:Size width="72.0" height="13.42773056030273" />
> > - <one:OEChildren selected="partial">
> > - <one:OE creationTime="2007-03-23T19:24:16.000Z"
> > lastModifiedTime="2007-03-23T19:24:16.000Z"
> > objectID="{29CC9639-B3B0-4AC9-B80C-2470B9F1F2F8}{198}{B0}" alignment="left"
> > selected="partial">
> > - <one:T selected="all">
> > - <![CDATA[
> > ]]>
> > </one:T>
> > </one:OE>
> > </one:OEChildren>
> > </one:Outline>
>
> > </one:Page>
>
> > Ok, I am able to pull the xml from the current page, and I understand that
> > the cursor is where selected="all" but I can not figure out the correct xml
> > syntax for an image.
>
> > According to MSDN, an image can either be referenced in a file or is
> > included inline in base64 encoded.. It does not really go into much detail
> > other wise.
>
> > I am thinking I would want to replace the - <one:T selected="all">
> > - <![CDATA[
> > ]]>
> > </one:T>
>
> > with something like <one:Image path="pathToPicture"> </one:Image> but I have
> > not had any luck.
>
> > Thanks,
> > D
>
> > "Ilya Koulchin" wrote:
>
> > > DGS wrote:
> > > > The old 2003 api did not allow you to enter an object at the current cursor
> > > > location. Do you know if the new API for OneNote 2007 allows for this?
>
> > > There is no explicit "insert at cursor" command, however, you can get
> > > the selection when exporting the page content, and then import your
> > > changes at the selected location. You will be able to get the selection
> > > location even if nothing is selected - in that case, you'll just see an
> > > empty text block in the XML that is marked as selected.
>
> > > Ilya- Hide quoted text -
>
> - Show quoted text -

DGS, are you developing a OneNote product ?

Re: Question about OneNote API
DGS 3/30/2007 7:54:02 PM
Yes, I am developing something that integrates with OneNote 2007.

Today, I started writing an Object Oriented Wrapper for the nasty OneNote
2007 xml API. I am not sure though how deep I will make this wrapper. So
far, it holds all the information up to the page. All the page elements have
yet to integrated into it and I am not sure if I will have time to do the
page elements.

Later,
D


"EMRhelp.org" wrote:

[Quoted Text]
> On Mar 23, 3:05 pm, DGS <D...[ at ]discussions.microsoft.com> wrote:
> > Figures that I would get it working just after I posted.
> >
> > Heres what I went with:
> >
> > <one:Image><one:File path="c:\wallpaper.png"/></one:Image>
> >
> >
> >
> > "DGS" wrote:
> > > <?xml version="1.0" ?>
> > > - <one:Page
> > > xmlns:one="http://schemas.microsoft.com/office/onenote/2007/onenote"
> > > ID="{B0B6D4E7-DBBF-4279-A9E2-085EFC128000}{1}{B0}" name="test"
> > > dateTime="2007-03-23T16:57:14.000Z"
> > > lastModifiedTime="2007-03-23T19:24:35.000Z" isCurrentlyViewed="true"
> > > selected="partial" style="font-family:Calibri;font-size:11.0pt" lang="en-US">
> > > - <one:PageSettings RTL="false" color="automatic">
> > > - <one:PageSize>
> > > <one:Automatic />
> > > </one:PageSize>
> > > <one:RuleLines visible="false" />
> > > </one:PageSettings>
> > > - <one:Title style="font-family:Calibri;font-size:17.0pt" lang="en-US">
> > > - <one:OE author="d" lastModifiedBy="d"
> > > creationTime="2007-03-23T16:57:17.000Z"
> > > lastModifiedTime="2007-03-23T19:24:35.000Z"
> > > objectID="{118E03D9-24DF-45A2-B902-05F1C46F9919}{15}{B0}" alignment="left">
> > > - <one:T>
> > > - <![CDATA[ test
> > > ]]>
> > > </one:T>
> > > </one:OE>
> > > </one:Title>
> > > - <one:Outline selected="partial" author="d" lastModifiedBy="d"
> > > lastModifiedTime="2007-03-23T19:24:16.000Z"
> > > objectID="{29CC9639-B3B0-4AC9-B80C-2470B9F1F2F8}{197}{B0}">
> > > <one:Position x="72.0" y="402.9754333496094" z="4" />
> > > <one:Size width="72.0" height="13.42773056030273" />
> > > - <one:OEChildren selected="partial">
> > > - <one:OE creationTime="2007-03-23T19:24:16.000Z"
> > > lastModifiedTime="2007-03-23T19:24:16.000Z"
> > > objectID="{29CC9639-B3B0-4AC9-B80C-2470B9F1F2F8}{198}{B0}" alignment="left"
> > > selected="partial">
> > > - <one:T selected="all">
> > > - <![CDATA[
> > > ]]>
> > > </one:T>
> > > </one:OE>
> > > </one:OEChildren>
> > > </one:Outline>
> >
> > > </one:Page>
> >
> > > Ok, I am able to pull the xml from the current page, and I understand that
> > > the cursor is where selected="all" but I can not figure out the correct xml
> > > syntax for an image.
> >
> > > According to MSDN, an image can either be referenced in a file or is
> > > included inline in base64 encoded.. It does not really go into much detail
> > > other wise.
> >
> > > I am thinking I would want to replace the - <one:T selected="all">
> > > - <![CDATA[
> > > ]]>
> > > </one:T>
> >
> > > with something like <one:Image path="pathToPicture"> </one:Image> but I have
> > > not had any luck.
> >
> > > Thanks,
> > > D
> >
> > > "Ilya Koulchin" wrote:
> >
> > > > DGS wrote:
> > > > > The old 2003 api did not allow you to enter an object at the current cursor
> > > > > location. Do you know if the new API for OneNote 2007 allows for this?
> >
> > > > There is no explicit "insert at cursor" command, however, you can get
> > > > the selection when exporting the page content, and then import your
> > > > changes at the selected location. You will be able to get the selection
> > > > location even if nothing is selected - in that case, you'll just see an
> > > > empty text block in the XML that is marked as selected.
> >
> > > > Ilya- Hide quoted text -
> >
> > - Show quoted text -
>
> DGS, are you developing a OneNote product ?
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net