Welcome to MSDN Blogs Sign in | Join | Help

Making pages easier to sync with a mobile device

I was thinking of a tool to somehow send selected pages from my different OneNote notebooks to my Windows Mobile phone and went to talk with Dan Escapa (http://blogs.msdn.com/descapa) about some design choices I was facing. He was working on a very similar tool and gave me his code to finish. Nice - saved me a bunch of time.

   

His design was much simpler than mine. He added a toolbar button to copy the currently viewed page to the OneNote Mobile folder when clicked. My design was much more embarrassingly clunky and I scrapped it in favor of finishing his addin.

   

If you want, you can get the setup files and source code from these links:

   

Setup files: http://johnguin.members.winisp.net/Shared%20Documents/CopyToONMobile_Setup.zip

(Edit: looks like WinISP got swamped very quickly.  Here is an alternate download site: http://johnguin.com/Documents/CopyToONMobile_Setup.zip)

   

Code (C#): http://johnguin.members.winisp.net/Shared%20Documents/CopyToONMobile_Source.zip

   

To install, as usual, exit OneNote and run the setup.exe. You will get a button to copy the currently viewed page to the ON Mobile folder. Makes life a little bit easier.

   

And if you click the button twice, you will discover a "feature" I added which Dan did not like. I create a simple XML file to track the GUIDs of pages already copied so you won't get duplicates on the device. Dan wanted to keep it simple and just always make a new copy. To get his original behavior, you can select to never show that dialog again and make a copy always.

   

The log file (copytoonenotemobile.xml) resides in the local settings\app data folder if you want to look at it. It also logs any errors you may hit as comments. Deleting that file will cause the addin to "forget" what has already been copied.

   

Next up, I'll go through some of the bugs found when testing this addin. Let me know if you find more.

Published Monday, June 11, 2007 7:35 AM by JohnGuin

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Making pages easier to sync with a mobile device

Can't make the links to the downloads work.

Monday, June 11, 2007 12:30 PM by Keith Ryde

# Send to Mobile Device - John Guin and I working together

I wanted to post about a new powertoy that John Guin and I worked on called "Send to mobile device".

Monday, June 11, 2007 1:13 PM by OneNote Extensibility & More..

# re: Making pages easier to sync with a mobile device

The server seems to be under heavy load right now.  this is what I get for trying to use nothing but free servers...

All I can suggest is waiting and trying again in a bit.

John

Monday, June 11, 2007 1:58 PM by JohnGuin

# re: Making pages easier to sync with a mobile device

Once I've run the setup file, where do I find the icon in onenote please? (have searched everywhere but cannot see it)  Thanks for your help.

Thursday, June 21, 2007 3:18 AM by tam

# re: Making pages easier to sync with a mobile device

The button should be on the far right of the standard toolbar.  If you try to customize the toolbar, does "Copy to Device" show?

John

Saturday, June 23, 2007 12:03 PM by JohnGuin

# re: Making pages easier to sync with a mobile device

I still not able to see the button :(

Customize toolbar does not show up either...

I tried uninstalling and reinstalling the app. No luck at all.

Monday, June 25, 2007 6:11 PM by Raj

# re: Making pages easier to sync with a mobile device

Is there some decent API doc on the COM object model anywhere? I have not been able to find. If so could someone send me a link at dave@DotNetCodeSlingers.com as it may be a while before I find my way back here. Thanks, Dave

Monday, July 30, 2007 1:23 PM by Dave Kolb

# re: Making pages easier to sync with a mobile device

P.S. The first addin I installed I could not find either until I found that I had addins disabled in the options menu and then restarted ON. Bet is your problem. Dave

Monday, July 30, 2007 1:24 PM by Dave Kolb

# re: Making pages easier to sync with a mobile device

Mine isn't working either... it shows nowhere. I've checked add-ins as well, and its enabled (however, the addins list is empty, meaning copy2device doesn't even exist on it!). So what's the problem? Is there a specific way to install this? (and what do i do  with the code folder..?)

Thursday, May 01, 2008 12:46 AM by Egypt

# re: Making pages easier to sync with a mobile device

First, make sure OneNote has the .NET programmability support installed (it does not install by default).  In your control panel, go to Programs or Add/Remove Programs and rerun setup for OneNote.  When you select a Custom install, you will get a tree view that will show you the option under OneNote to install .NET programmability support.

Install it, then reinstall the Copy To Device addin.

The code folder is only for people who want to see the code I wrote.  If you don't want that folder, you can delete it.

Sorry for the problems,

John

Thursday, May 01, 2008 9:39 AM by JohnGuin

# re: Making pages easier to sync with a mobile device

i restarted my laptop again n now the button shows; thx anyways though... however, ever since i installed the Copy2Device addin, my pics won't open =S completely random but yeah... it gives me the pic's folder path and tells me it's not compatible with Win32 =S ( i have to right click > open with > [..] every single picture!!)

that a bug?

Thursday, May 01, 2008 9:36 PM by Egypt

# re: Making pages easier to sync with a mobile device

Sounds like something went wrong somewhere.  I suggest copying the exact error message and looking that up on the internet.  either that or double check file associations (open a folder and click file \ folder properties \ file types, on WinXP.  On vista, right click the image file and select Properties.  There is a button for Opens With - change it to open with whatever image viewer you want to use.  I use Paint).

Hope this helps, and sorry for the problems,

John

Thursday, May 01, 2008 10:39 PM by JohnGuin

# I'm out until August

I've tried to keep this up to date twice a week since I started. Like most other people who run blogs,

Thursday, July 03, 2008 10:58 AM by OneNote Testing

# Does Not Function

I have been able to install the powertool, but it does not copy when the menu button is pressed.  I installed other powertools and they work, but this does not.  Suggestions.

Thursday, November 27, 2008 7:31 PM by FamDoc

# re: Making pages easier to sync with a mobile device

Can you look in local settings\app data folder for a file named CopyToOneNoteMobile.xml?  That is a log of what happens when you run the tool.  Can you either post it here or send it to me via email and I'll take a look.

Also, I assume you have successfully synced with your mobile phone already, and other than this powertoy, sync with OneNote works as expected, right?

Thanks and sorry for the problems,

John

Thursday, November 27, 2008 9:28 PM by John

# re: Making pages easier to sync with a mobile device

This is a cool feature, John.  Is there any way to make the data sync BACK to the original source if you change it in OneNote Mobile?  

In a perfect world, I'd like data to sync across devices/platforms in OneNote just as it does between my desktops and laptops now (with a little assist from Hamachi.)

Thanks, Kal

Monday, December 29, 2008 12:49 AM by Kal

# re: Making pages easier to sync with a mobile device

Hi Kal,

There is no easy way to keep the data in sync with this powertoy.  I would need to re-write an entire sync mechanism to see if that data has changed on BOTH pages, and that is not a trivial task.

We are working on improving the experience.

Thanks for using OneNote,

John

Monday, December 29, 2008 10:13 AM by JohnGuin

# re: Making pages easier to sync with a mobile device

I would love for this tool to work. Unfortunately I'm having a similar problem to the one FamDoc reported above: once clicked, the "Copy to Mobile" button 1) always stays grayed out and 2) fails to copy the page.

Monday, February 02, 2009 2:17 AM by TechMarketer

# re: Making pages easier to sync with a mobile device

Hello,

can you try this:  make sure OneNote has the .NET programmability support installed (it does not install by default).  In your control panel, go to Programs or Add/Remove Programs and rerun setup for OneNote.  Select a Change install and you will get a tree view that will show you the option under OneNote to install .NET programmability support.  Enable it, finish setup and then reboot.  

Let me know if that fixes the problem,

John

Monday, February 02, 2009 12:14 PM by John

# re: Making pages easier to sync with a mobile device

Dude, it worked! 100% functional now. Wow this is an amazing add-on... absolutely convenient!

Thanks so much John!

Monday, February 02, 2009 2:20 PM by TechMarketer

# re: Making pages easier to sync with a mobile device

This is a really nice add-in, I've been looking for something like this. A couple of suggestions:

Running on Windows XP (Tablet PC Edition), the dialog for overwriting the note came up behind the OneNote window. I clicked the button several times before I realized this. It would be nicer if it showed up in front.

When clicked on a note in my OneNote Mobile notebook that had already been copied, it automatically creates another copy in that same notebook. Shouldn't the button be disabled, or cause it to be copied back to it's original location?

I second Kal's request for a more advanced syncing process. As I understand how complex that is, how about another option in the "overwrite" dialog for copying the OneNote Mobile page back to the main notebook.

Tuesday, March 10, 2009 3:58 PM by clamshell

# re: Making pages easier to sync with a mobile device

Oops. Hit submit before my fourth suggestion:

Some way to automatically copy all notes mentioned in your XML file to OneNote Mobile at once.

Tuesday, March 10, 2009 3:59 PM by clamshell

# re: Making pages easier to sync with a mobile device

Hi Clamshell,

1.  I wish I could solve the focus problem.  I've tried forcing my dialog to have focus, but if some other application takes focus right after mine, it fails again.

2.  Duplicate pages should be created - can you look in the install folder and email me the log files you find there?

3.  We're working on Mobile improvements.  Stay tuned.

4.  I don't understand this request - can you clarify what you mean by "copying all notes in the XML file?"  The XML file lists all the notes you have already copied in order to prevent them from being duplicated.  Deleting this file will allow duplicates to be created since the list of files you have already copied will disappear.  In other words, if you see a page in this file, it should already be in the mobile device folder.

Wednesday, March 11, 2009 11:19 AM by JohnGuin

# re: Making pages easier to sync with a mobile device

Hi Clamshell,

1.  I wish I could solve the focus problem.  I've tried forcing my dialog to have focus, but if some other application takes focus right after mine, it fails again.

2.  Duplicate pages should be created - can you look in the install folder and email me the log files you find there?

3.  We're working on Mobile improvements.  Stay tuned.

4.  I don't understand this request - can you clarify what you mean by "copying all notes in the XML file?"  The XML file lists all the notes you have already copied in order to prevent them from being duplicated.  Deleting this file will allow duplicates to be created since the list of files you have already copied will disappear.  In other words, if you see a page in this file, it should already be in the mobile device folder.

Wednesday, March 11, 2009 11:20 AM by JohnGuin

# re: Making pages easier to sync with a mobile device

Looks like a great add-in now that I have ON sync working

Links do not appear to be working any longer... :(

Tuesday, June 30, 2009 6:45 AM by Mal Evans

# re: Making pages easier to sync with a mobile device

Make sure you use the link to http://johnguin.com/Documents/CopyToONMobile_Setup.zip

The server hosting the other files got decommissioned and I'm still trying to restore from backups.

Sorry for the problems.

Tuesday, June 30, 2009 10:19 AM by JohnGuin

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker