Monthly Archives: April 2017

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

How to clear the Microsoft Outlook for Mac web browser cache and cookies

imageWhen working with Outlook for Mac the content of email messages are rendered in a web browser control that is specific to Outlook (it does not use Safari). So when you have a need to clear any cached data or cookies it is far from obvious how you should go about clearing this cache. I’m a newbie to Mac so maybe this is obvious to seasoned users! Here’s how I went about it.

  • Start the Finder application
  • Open the Go menu
  • You need to get to the hidden Library folder. To get the Library folder to show up under the go menu, hold down the option button on your keyboard
  • Now open the Library folder

image

  • Find the Containers folder under Library and expand it

image

  • You should be able to find a folder called com.Microsoft.OsfWebHost

image

 

  • To clear out the web browser cache I move the following to the trash:
    • com.Microsoft.OsfWebHost/Library/Caches/com.Microsoft.OsfWebHost (folder)
    • com.Microsoft.OsfWebHost/Library/Caches/Cookies/Cookies.binarycookies (file)

image

 

Restart Outlook and you should now have no cached files being used.

%d bloggers like this: