Blog Archives

How to export multiple pages from OneNote to a single Word document

I needed to find a way to export a number of pages from a OneNote notebook into Word documents. The technique I used and will step through in this post was to:

  • Create a new OneNote section (temporarily in needed) to arrange the pages I wanted to export (one section per Word document I wanted)
  • Export the entire section into a Word (*.docx) file
  • Automatically fix up image sizing issues with a custom macro

image

Right-click on the section tab and select Export…

image

Change the export file type to be a Word document (*.docx)

image

This will export all pages from the OneNote section and append them all into one Word document. This is a pretty good result except for the pictures. In many cases the pictures are wider than the page width and look half missing.

image

The solution to quickly and easily address the image width problem in bulk is to create a Word macro to resize all images in a Word document that are too wide to fit on the page.

Here’s how we create the Word macro (this is in Outlook 2016)

The Developer toolbar needed for creating macros isn’t visible by default so to switch it on to File | Options | Customize Ribbon and ensure Developer is checked

image

You should now get the Developer toolbar appearing

image

Select Macros, give the new macro a name and select a scope for where to save the macro (this determines where it will be available later on).

image

You will now be dropped into the VB Macro Editor experience which looks nothing like Word! Don’t worry you just need to paste the following code in as shown

image

Here’s the macro code to copy/paste

Dim i As Long
With ActiveDocument
For i = 1 To .InlineShapes.Count
If PointsToCentimeters(.InlineShapes(i).Width) > 15 Then
With .InlineShapes(i)
.LockAspectRatio = msoTrue
.Width = CentimetersToPoints(15)
End With
End If
Next i
End With

The result should look like this, you can then save and close the macro editor window

image

Now back in Word, with your document open (with the oversized images) select Developer | Macros, select your new macro and click Run

image

Once the macro has completed all the images that were over 15cm in width will have been resized to fit on the page.

This assumes the pages are in portrait orientation and that the maximum width of an image should be 15cm

image

Advertisements

Office Lens: The simple and free way to create an Outlook Contact from a business card

I’ve found Office Lens to be an awesome app for Windows Phone. Recently the app was enhanced to allow for the specific task of scanning business cards.

So how does it work? Simply fire up the free Office Lens app on your Windows Phone and tell it you want to scan a business card. Take the photo (scan) and save it to OneNote. Here’s what I ended up with when I scanned my own business card.

office-lense-scan-business-cards-cameron-dwyer-01-onenote

In OneNote (either directly on the phone or back on your PC – once OneNote syncs) you get the full picture of the business card at the bottom of the OneNote page, but it creates a section of formatted text above the image which extracts the main details from the business card and creates hyperlinks to call, email or open website addresses. Pretty cool.

The awesomeness doesn’t stop there. Embedded in the OneNote page is a .vcf file “BizCard”.

office-lense-scan-business-cards-cameron-dwyer-01-open-business-card

Click on the “BizCard” file and a full Outlook Contact profile is composed with all the details filled out ready to save.

office-lense-scan-business-cards-cameron-dwyer-03-create-new-outlook-contact-from-business-card

The screenshots above are from OneNote Desktop on my PC, but you get similar functionality directly on your phone. You can see the “BizCard” link and pressing it composes a new contact directly on your phone with all the details filled out which you can then edit/change before saving. Now that is really cool.

I’m looking forward to the next SharePoint Conference when I come home at the end of the day with a wad of business cards in my pocket.

Here’s an official article about the feature

http://blogs.office.com/2014/12/08/office-lens-gets-networking-scan-business-cards-onenote-contacts-outlook

You can download the Office Lens Windows Phone app for free from the Windows Phone Store.

%d bloggers like this: