web 2.0


Microsoft Word Outline

Sometimes, we have a very large document in Microsoft Word and need to move sections of the document around. In order to move such document sections, people often copy and paste. However, this is inneficient when dealing with large documents.

Here's a video a made explaining how to handle that (URL: http://www.youtube.com/watch?v=ArfgwtAzx74):

Tags: ,

Microsoft Word

Word 2007 random text

The other day I had to teach a Word course and I normally take a text with me so that people can replicate what is being taught. This time, however, I decided to use an old trick from Word whereby you can use the =rand() function to get the following:

On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look.

You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly.

To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template.


Besides the traditional =rand() function, we can also use the =lorem() function to return the ubiquitous "Lorem ipsum..." text:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.

Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus.

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci.


In both cases we get a set of three paragraphs, but you can change that by adding arguments to the functions. If you type =lorem(6) you will get six paragraphs whereas if you type =lorem(3,6) you will get three paragraphs with six sentences each.

========
PS: You can also use this in other Office applications such as PowerPoint. Enjoy!

Tags: , ,

Microsoft Word

Office 2010 Cancel on load

Microsoft Office 2010 new features include "cancel on load". This is a little "Cancel" button on the right-hand bottom corner of the application splash screen which can be used to cancel the loading of the application:


Figure 1: Cancel on load

Tags: , , , ,

Microsoft Office | Microsoft Office 2010

Customizing the Ribbon: startFromScratch and Tab visibility

If you start from scratch, then using the getVisible attribute to show/hide a tab will not work, since you'd have to rebuild the functionalities for the elements. However, an option would be to simply start all tabs hidden and then show/hide as you go along, this would avoid the frustrating of having to rebuild each tab using XML to work with them.

Remember that working with startFromScratch does not stop the user from hitting shortcut keys to access certain functionalities (at least for now), so it is pretty much pointless to start from scratch except for the fact you’d have all the tabs and certain commands hidden from the outset. Here’s an option to work with an Excel file. Use the following XML to built your own custom tab:

<customUI
  xmlns="http://schemas.microsoft.com/office/2006/01/customui"
  onLoad="rxRibbon_onLoad">

  <ribbon
   startFromScratch="false">
   <tabs>
    <tab
     idMso="TabHome"
     getVisible="TabHome_getVisible"/>
   <tab
     id="rxTab0"
     label="My Custom Tab">

     <group
      id="rxGrp0"
      label="My Custom Group">

      <toggleButton
       id="rxtglBtn0" getLabel="rxtglBtn0_getLabel"
       imageMso="HappyFace"
       size="large"
       onAction="rxtglBtn0_Click" />
     </group>
    </tab>
   </tabs>
  </ribbon>
</customUI>

You can then write some code in your workbook as follows to control visibility (place code in a standard module):

 

Public rx_oRibbon             As IRibbonUI
Public blnGetLabelState       As Boolean
Public blnHomeTabVisibility   As Boolean

Sub rxRibbon_onLoad(ribbon As IRibbonUI)
  Set rx_oRibbon = ribbon
  blnGetLabelState = False
  blnHomeTabVisibility = False
End Sub

Sub rxtglBtn0_getLabel(control As IRibbonControl, ByRef returnedVal)
  Select Case blnGetLabelState
    Case True
      returnedVal = "Hide 'Home Tab'"
    Case False
      returnedVal = "Show 'Home Tab'"
  End Select
End Sub

Sub TabHome_getVisible(control As IRibbonControl, ByRef returnedVal)
  returnedVal = (blnGetLabelState)
End Sub

Sub rxtglBtn0_Click(control As IRibbonControl, pressed As Boolean)
  blnGetLabelState = pressed
  rx_oRibbon.Invalidate
End Sub

Tags: , , , , ,

Microsoft Office | Microsoft Office - VBA | Ribbon