Category Archives: Toolbox

Things you should have in your toolbox

TechNet Wiki Summit – This is for You!

Banner2_jpg-550x0

First things first. This Summit is for you and is Free to attend! Go to this page and register. Have a look here at what this Summit has to offer you. Date:  March 17-18-19, 2015. Well with that done let me explain a little about TechNet and TechNet Wiki.

Community work
One of the things I like to do when I have some spare time is write blog posts about the technology is use in my work related activities. Before you can answers questions or help people with their technology related issues you have to gain the knowledge yourself. Well let me tell you the TechNet environment is just the place to start. Whether you just want to absorb or really want to participate this is the place to be.

TechNet Home
Sure every site has a starting point. TechNet is no exception. Here we go… http://www.technet.com
TechNet_IINow have a look. The Home page does offer some interesting options. But have a look at the menu bar. That’s where the real magic is. The Third option “Wiki” has a ton of information at your disposal. Credo here? Can’t find it – Write it! How cool is that.
TechNet_IIITake your time
Let me tell you, this is not the place you explore in a couple of minutes. There is so much going on that might take you a while so here’s the tip: bookmark this place and come back regularly. All activity you see here is done by enthusiasts, evangelists and people who want to be involved. You can be a part of that as well. Tip: half way down this page you will find a link to the Wiki Ninja’s blog. Have a look there and see how much activity is going on!

Gallery
So what could this option be? Some sort of show off directory what everyone is doing? No way this is the place where enthusiasts share their knowledge. Thousands of free downloads contributed by volunteers. Looking for a script to print all AD users to an Excel file? It’s here. Looking for free Powershell scripts? It’s here. Go on have a look and see what’s available for you. I’ll bet you find what you have been looking for all this time. Same credo here… can’t find it, write it and contribute it here.

Forums
For years I have been active in Forums and this one is no exception. Users from all around the world post their questions here and it is up to the community to answer them. Let me tell you if you post a question here it will be answered!
TechNet_IForums are the place where you go to if you have a question and would like some help from other people who just might know the answer. Just about every IT related subject can be a topic. I have to say that by just reading answers from all those volunteers you will gain a lot of knowledge as well. Best thing would be to participate. And don’t be fooled you will be taken seriously here no matter how simple the question might be.

Summit Tracks
I hope this post will give you some insights in the TechNet community. As I stated earlier the upcoming Summit is organized entirely on a voluntary base. You can choose from various tracks:

TechNet_Dev_Track

TechNet_Wiki_Track

TechNet_Infra_Track

Well all I have to say now is I’ll be there… will you?

p.s. you don’t even have to leave your house for it 🙂

Advertisements

CustomUI Editor: Trigger Your Own Macro

 

Custom_UI_ButtonPreviously I did some posts about the CustomUI editor. This nifty little tool makes it easy to create your own ribbon in the various Office applications. We have seen how to add your own ribbon, add icons to your ribbon and how to add a gallery to your ribbon. In this post I will show you how you can add a ribbon, a button and how you can assign an action to your button. The example will show a userform in Excel when you click the button in your own customized ribbon. As always I will describe the steps to achieve the result we want. So let’s do this!

 

First things first. Startup Microsoft Excel. It is important to know that there is a distinction in versions one might use but I will point those out to you. The example I made uses Excel 2010 (and beyond) but it is possible to use Excel 2007 as well.

Blank document Save as
The first step we need to do is create a blank document in Excel and save it as ‘Macro enabled’ workbook. Why? Because we want to assign a macro to the button we will create in our ribbon and files which contains macro’s are mandatory to save as macro enabled workbook!

CustomUi Editor
Ok with the blank Excel workbook saved we can now open the CustomUI editor and start our journey. We will start from scratch. Choose open file and browse to the file you just created in Excel and click ‘Open’. Your Excel document will appear in the treeview. Now click on Insert from the menu bar.
Important: this is where the distinction between versions is made. So if you are using Office 2007 choose the second option from the drop down menu otherwise follow the example.

Custom_UI_EIT_IIf you have selected one of the two options you will see an additional node appear in the treeview. You should see a little icon with the word custom next to it. Ok we are doing great so far. Now because we don’t want to reinvent the wheel all the time we are going to use some default XML code. Again go to the Insert option from the menu bar and from the drop down choose ‘Sample XML’ and choose ‘Custom Tab’ from the next menu.

Custom_UI_EIT_IINow with that in place we can do the necessary tuning to make it ours. The default sample XML has all the elements we need. It will create the ribbon, group and button we are looking for. But because it is a sample we need to modify it to our needs. In the picture below I ‘boxed’ the part we need to modify:

Custom_UI_EIT_IIIIn the picture below you will see the modifications i have made to the existing XML to make it our own. I’ll describe the changes I have made.

Custom_UI_EIT_IV

  1. Changed the tab id: this is important because the tab id should be unique. This can be anything you’d like to call it. I called it ‘EITID’ which is the abbreviation for ExcelImportToolID
  2. Changed the group id: this is important because the group id also has to be unique. can you explain why I chose ‘grpEIT’ ?
  3. Changed the button id. You know by now that this is important so make it unique. You might notice that I keep the names in sync with the other ID’s.
  4. Make sure the imageMso has a capital M because otherwise it won’t show the icon!
  5. The final piece is the onAction bit. This is where I attach my macro reference.

Save, save, save
Of course you need to save from time to time so now would be a good moment! Let’s continue to the next step. Let us see if this works so far. Open Excel and open your document you’ve just created. It should contain a ribbon with just one button. it should look like this:

Custom_UI_EIT_VHave the same output? Ok, just remember it does not do anything yet because the macro is not there yet. So if you click the button you would get an error!

The macro
In the Excel file i created a userform (doesn’t have to be that fancy a blank userform will do). If you want to follow this example make sure the userform is called ‘frmImport’. Click insert – Userform from the menu bar and create your userform. Save your Excel file and we are ready for the next step. Adding a ‘callback’ from the customui editor.

Custom_UI_EIT_VI

Back to the CustomUI
Open the customui editor again and open your Excel file. You should see the XML code you have created earlier. Now to generate the callback for Excel click on the last button in the menu bar as shown below: Custom_UI_EIT_VIIIYou will see that the custom ui editor will generate some callback code for you. Copy that piece of code and after that close the custom ui editor.

Custom_UI_EIT_IX

Open the Excel file again in Microsoft Excel and go to the VBE (Visual Basic Editor). I added a separate module for clarity. You can do so by clicking: Insert – Module from the menu bar within the VBA environment.  When done you should see a clean module. Paste your code from the custom ui editor here:

Custom_UI_EIT_VII

Last step:
The final step we have to do is add the actual action between the lines the custom ui editor created for us. In this case we want to show the userform when the button is clicked. So all we have to do is add the line: frmImport,show between the lines that are already there. Be curious… test your ribbon callback by clicking on your button in your custom ribbon!

Custom_UI_EIT_XTaddddaaa! there it is! Well done. Now nothing is keeping you from adding more buttons and adding more macro’s to your customized ribbon. So go ahead and feel free to add more buttons and more actions by simply expanding you xml using the customui and expanding your vba module with the generated code you just have to paste and copy. Let me know how it goes 🙂

CustomUI Editor – add a gallery to your ribbon tab

Gallery_IX


In earlier posts i showed you how you can use the CustomUI editor to create your own tabs in the ribbon of the Office Applications. The second post told you how you could add your own images to your buttons in the ribbon. In this post i will show you how to create a gallery. As usual i will use Microsoft Word as the sample application. First let me show you what we mean by ‘a gallery’.

A gallery consists of a button with an additional arrow. This little arrow activates an expendable menu with various options to choose from. In the picture you see the gallery of the column options in Word. Now this is what we are after. We want to create our own gallery with pictures of Office applications which we can choose from. So the scenario is to create a tab with a button with an additional arrow which will show the various images to choose from which we can insert in our document. Gallery_I


First the prepping

  • Make sure you have a couple of images which you can add to your gallery. For this example i use the office apps icons i have.
  • Make sure you have the custom ui editor installed. If you don’t have it yet you can grab it here
  • Open Microsoft Word and save the document as a template (.dotm). You don’t have to type anything. For now we are just using the document as the container for our ribbon tab


Creating your XML in the customUI editor
So we are ready to create our xml in the customui editor. Open the customUI editor and choose open. Browse to the Word file you have just saved and open it. You will see an empty ui editor screen. From here it is up to you. In the first post i wrote about the ui editor i explained that a tab in the ribbon has a few default aspects that should be present in order for the tab to show up. First we need the namespace section. This is distuingished by the <customUI tag. Next thing is the <ribbon tag that should be present. The third tag we are looking for is the <tabs tag. After the tabs tag we need a <tab tag. The last essential tag that needs to be present is the <group tag. Now the easy thing is that every open tag needs a closing tag. For readability we indent every new tag. To sum up: for every tab you create you at least need this bit of starting xml.

In the image you see that you can start this bit of default xml by choosing custom tab from the menu. This will create the xml for you to start with. It will even add a button with a happy face on it 🙂 Gallery_II


Tuning the xml to create our gallery
With the default xml in front of us we are going to tweak this to our wishes. We don’t need a button so we get rid of that line of xml. After the group tag we add a new line of xml starting with a new indent below groups. We will choose the appropriate tag for the gallery option which is <gallery id. Somehow that did not come as a suprise right? I think that you know by now that you should have a closing tag as well. I have the habit of already placing the closing tags before i start adding info to the tag. So place the closing tag as well and you xml should look something like this:

Gallery_III


A quick word about naming conventions and ID’s
Every tag in the xml shoud get an ID. Wait… let me rephrase that. It should get a unique ID. In the xml you are writing this should be a unique name. Take a close look at the image above. You see that the follwing tags have been identified:

  • tab id=”MyGallery”
  • group id=”grpApps”
  • gallery id=”glyApps”


The tag ID’s are always preceeded by the object. So tab, group and gallery all have the word id after them separated by a space. This is mandatory. After that you see a description between double quotes. It is this name – which you provide – that has to be unique! So why is this so important? Well many people copy and paste xml code. So imagine if you copy and paste the lines of code of ten buttons. You would have 10 matching names for the buttons and that is not allowed. Every button should have a unique name. Just be aware of that if you start copy – pasting stuff!


Add the pictures to you xml
So we have the base xml ready and now would be a good time to add the pictures to your xml. In this example we are going to add the app. pictures. In the menubar click on “Insert” – “Icon…”. Browse to your directory where your images are. Select the ones you would like to add and click open. When done you might think that nothing has happened. You pictures are actually added to the xml but you just don’t see them yet. Click on the + sign to see your pictures added to your xml.

Gallery_V
Gallery_VI


Finish the xml
Ok we have the images added to the xml. Now let’s finish the remaining xml lines. First we are going to set the general options for the gallery. After we have done that we add the lines for adding the pictures to our gallery. Take a look at the image to see the lines of xml i have added:

Gallery_VII

Check the syntax
As a final check we have to see if the names used to reference the images are correct. In the image tag of you xml there is a reference to the images in the treeview of the custom ui editor. Make sure the name you use in your xml is identical to the name in the treeview. So with that in place click the save button.
Gallery_VIII


The gallery options
In your xml you have added some properties to the gallery. We set the label, imageMso, size, columns, rows, itemHeight, itemWidth and screentip settings. Important for the gallery in the ribbon are the columns, rows, itemheigh and itemwidth properties. You might have to do some tweaking here to get the view you think is most appropriate for you wishes. The columns settings will show the pictures in the cumber of columns you define here. It is possible to set this property to one. In that case you will see one column. The itemHeight and itemWidth properties are more important. Play around with these values to get the proper height and with properties without getting a distorted picture. Just adjust the numbers, click save and view the tab again. Not good? close the document, adjust the numbers in the xml again, save the document and view again.


View the result
Yep we are excited to see the end result… Open your word document and see if the additional tab is there. Click on the tab, see if the gallery button is there and click the arrow to expand it. You should see the images you have added to your xml. See the very first image of this post to see my result 🙂


In the next blogpost is will show you how you can add the chosen images to your document. For now this is the start. Experiment a bit, try different images, more or less images.

CustomUI Editor Part II

Add your own icons to your own ribbon

In this post i will show you how easy it is to add your own icons to your own ribbon in Microsoft Office. For this example i will use a Word document but you can just as easy make this in Excel and PowerPoint. In earlier posts i wrote about the custom UI editor. This insanly great tool for creating your own ribbons in Microsoft Applications. So that will be the tool i am using in this post. You can download the custom ui editor tool here.

The example i am creating here is a simple Word document with a custom tab with custom icons.

First make a word document which you want to use for this example. I will call it: Custom Icons. The custom UI editor tool was last updated for 2010 but to show that you can easily use this for 2013 documents i created a 2013 Word document. So the document is created, saved in a location and we are good to go. You can click on the various images to see enlargements!

Open the CustomUI editor

The next step is to open the custom ui editor. Choose open en locate your document to which you want to add a custom ribbon. For my example i created an empty Word document with no fancy stuff attached. A plain word document. Next step is to choose a type of ribbon you want to add. For this example i’ll choose a custom tab.

CUE_I CUE_II

Now with that in place you will see that de custom ui editor has presented you with some sample XML in de code window. This is the code you have to modify later on. We will first add our own icons attached to the document. For that i will add some sample icons i have stored on my pc.

CUE_III CUE_V

these are the icons i have added to my ribbon:

CUE_IV

The first time i added some icons this way i was a little startled because i did not see anything happen. You have to click the plus sign to actually see that the icons are added to the document.

CUE_VI CUE_VII

Ok, we have the document, we have the icons all we need to do now is modify the existing xml which was created when we chose custom tab at the beginning. If you are like me and you don’t want to typ to much you will use copy / paste. There’s nothing wrong with that but remember that all the buttons should have unique id’s in order for the ribbon to be created. So copy paste and rewrite the id’s for every button. Als modify the imageMSO part. imageMSO is an internal reference to existing icons from Microsoft Office. Because we are using our own icons you have to reset this option to image=”iconname here” (where iconname here is the name of your custom icon!).

CUE_VIII

The last step we have to do is to check if our ribbon will actual show up in our document. For the sample i have set two icons to large and three of them to normal. This will give you the next output:

CUE_IX

Yep there it is, my very own tab in my ribbon with my very own icons! Wow how cool is that. All done with the custom ui editor!


Pitfalls
Is there anything else i should know before i start taking these steps or will it always work. The only thing you have to remember is adding icons this way the only restriction you have is the size of the icons. In the sample i created here i added icons which have a size of 48X48 pixels. You will just have to test what the maximum size is for adding it to your tab. My advise? stick to 48 x 48 and smaller. That size fits perfectly!


Happy customizing 🙂

Office Lens: Perfect picture from the Whiteboard

Office-Lens_II Every now and again you bump into these great tools you can use for your work. Today i found another one. It is the Office Lens App for your windows phone. Earlier i posted a blogpost about Office Remote. Well you can see Office Lens in the same category here. This app makes taking snapshots from a whiteboard a whole lot easier. But wait you can also scan a document or even a photo. So why would you want to do that one asks? Well if you are like me and you have taken a picture from a whiteboard before you know what a struggle this can be to get a result which actually looks as you would like it to look. Office Lens will help you in the process of taking a picture from the whiteboard, present you with an option to do some additional cropping and in the end the app will fix the image for you.


Ok enough said. Show some results. I have taken a picture from a whiteboard. The first one is actually just a picture with nothing done to it. As you can see the board is very glossy and you see the shadow of me taking the picture. That is not what i want. Well let’s try another angle. With Office Lens i took the same picture and let the app do his work. It cropped the picture and removed the shadow for me. Wow i am officially impressed 🙂

Whiteboard_I Whiteboard_II


As with Office Remote the app comes with clear instructions. When first started you get a couple of screens explaining the app. Yes this is how the apps should work! You can get it here: Office Lens or just search for in on your phone! Nice right..? So start taking pictures from those whiteboards now 🙂

Office_Lens_III Office_Lens_I Office_Lens_IV

Office 2010 Icons Gallery – Icons for your Ribbon

When you create your own ribbons in one of the Office applications such as Word, Excel or PowerPoint you will probably want those nice looking icons in your own ribbon as well. Isn’t there some kind of list available where one can find these icons? Of course there is. and you can find it here

How it works

Once you have downloaded the file, it is actually a Microsoft Word file, open it in Word. You will see this line in the document:

This line states that the actual overview of the icons can be found under the tab File in Word. Be patient though it might take a second or so to load the pictures… When done you will see the following situation:

 On the bottom of the Backstage you will find to menu options imageMSO 0 and imageMSO 1. Klik one of the options to see the icons on the right side of the screen.

Now what you need to do to implement the icons into your ribbon is to look for the description under the icon. This is the description you should typ in your .xml code attached to your document. When you open your doccument you will see that icon appear in your ribbon. How cool is that! All you have to do is pick the one you like and typ its description.

Example:
Let me show you a small section of the xml to show you what i am talking about. Look at the image below. Just after imageMso you typ the title of the description you have found in your word document. Now let’s see if you get it. How will your ribbon look after you have used this piece of xml as seen below?

Happy iconing 🙂 and let me know if it worked!

Just a little more Paint

Edit my Pictures

Having a blog, creating powerpoint presentations, adding pictures to your applications and so on. Regularly i am up to the challenge to edit some pictures i need for work. I don’t like spending hours editting images with photoshop or some other software package i have to study before i get the minimal result i am looking for. In the early days i’ve used SnagIt on a regular base. This all changed when Windows Vista gave me “Snipping Tool”. This is such a perfect little program embedded just in your operating system.

Just that little more

But you now how it goes right? Every app just does that what it is good for. But sometimes i want just that little more. Take the next scenario: you have a picture and clipped it just the way you want it. Now all i need to do is to “blur” the contents just a little because of copyright or some other reason. The standard Paint app from Microsoft is a great tool but something like ‘blurring’ is not an option. Now should i install some mega application just to blur my picture? No you don’t have to. I stumbled upon this app called “Paint.Net” and added it to my toolbox.

Paint.Net

This is one of those jewels you will use for ever. Small, easy to use and free. Yes you’ve read it, it’s free. They take donations so if you think they deserve it donate some with PayPal.
Now let see some screenshots:

Paint.Net Logo

Yep that’s the logo, now some little about info:

About Paint.Net

Website: ofcourse it is much easier to refer to the website where you can download this amazing app! Have a look at the screenshots there.

http://paint.net/

Download it now and start using it. This should be in your toolbox!!

Happy Painting 🙂