Categories
Microsoft Office Productivity Technology

Outlook Meeting Attendees In The Invite Body

Personally I do not like the way that Microsoft Outlook prints out meetings especially the fact that attendees are a comma separated list.
I prefer to see all the attendees as a tabular list – with their acceptance response so that I can tick them off as they join the meeting.

The following macro will do this for you.
NOTE 1 : this macro is amending the text of the body of the meeting invite, if you save this and send an update – everyone will see this. I prefer to just run the macro, print the meeting and then close without saving.
NOTE 2 : this is a one off snapshot of the attendee status, if further responses or updates are received you will have to delete the old text then re-run the macro.

Categories
Microsoft Office Technology

Excel – Split one cell to multiple rows

There are times when you have an excel sheet which has multiple lines of text in a single cell, which has been split using a carriage return. NOTE: I’m not talking about text which has wrapped due to the size or formatting of the cell.

If you need to separate the contents of this single cell, into one row per line then this is the macro for you. NOTE: This macro will insert rows into your sheet so you may have to “fix” the layout afterwards. Save your sheet before you run this just in case.

The first function processes the current cell – use this if you only have one cell which you want to split.

Public Sub SplitCellToRows()
    arrValues = Split(ActiveCell.Value, vbLf)
    For i = UBound(arrValues) To LBound(arrValues) Step -1
        'MsgBox i & " " & arrValues(i)
        If i > 0 Then
            ActiveCell.Offset(1).Resize(1).EntireRow.Insert (1)
        End If
        ActiveCell.Offset(Sgn(i)).Value = arrValues(i)
    Next i
End Sub

If you have multiple cells which you want to split out then there is a wrapper macro which will call this multiple times.

Public Sub SplitCellToRows_Multiple()
    For Each cell In ActiveCell.CurrentRegion.Cells
        cell.Select
        SplitCellToRows
    Next cell
End Sub

To use, simply highlight one or more cells and then run the appropriate macro.

Categories
Microsoft Office Technology

Excel – Unfilter all sheets

There are times when you are using an Excel workbook and you simply want to search for some content but on one of the tables on one of the sheets the table which contains the data has been filtered. You can spend more time looking for and then removing the filter than you do in running the actual search.

This macro will remove all filters from your current workbook.

Categories
Microsoft Office Technology

Automatically file Outlook Sent Items to a folder

A commenter on one of my other macros requested this functionality.

Whenever you send an e-mail in Outlook have it prompt you if you want it filed in a folder other than the default Sent Items folder.
Here it is.

Two caveats:
I’m assuming that you are using the default Sent Items folder.
You will have to edit the code to point it to the folder you wish to use.


First you have to define the event handler to monitor your sent items folder.

Private WithEvents SentItems As Outlook.Items

Private Sub Application_Startup()

 Dim NS As Outlook.NameSpace
 Set NS = Application.GetNamespace("MAPI")
 Set SentItems = NS.GetDefaultFolder(olFolderSentMail).Items

End Sub

Now you have to add a routine to handle it.

Private Sub SentItems_ItemAdd(ByVal item As Object)
 
 Dim objMailItem As mailItem
 Set objMailItem = item
 Dim arcFolder As Outlook.MAPIFolder
 Set arcFolder = Outlook.Application.Session.Folders.item("Personal Folders (C)").Folders.item("___ToDo")
 If MsgBox("Move To ToDo?", vbYesNo) = vbYes Then
 objMailItem.Move arcFolder
 End If
 
End Sub

I have a “ToDo” folder in my Personal Folders mailbox (the leading underscores are simply to “help” the sorting in the default view.

It’s this arcFolder location that you will have to adjust to your own required location.

 

Categories
Microsoft Office Productivity Technology

Create an Outlook Appointment from a Mail

Although there is the functionality within Outlook where you can drag an email message and drop it on the calendar menu to automatically create an appointment – it copies many of the attributes of the email but it does not copy the mail sender & recipients to the appointment.

The following macro will allow you to do this:

Categories
Microsoft Office Productivity Technology

Track Changes In Excel

One of the main reasons that I use Microsoft Excel is to keep lists to share with multiple people. Microsoft Word has great versioning and colabarative editing capabilities, Excel not so much. The main problem I have is knowing when a particular row has been changed and who changed it.

The following macro implements this.

Categories
Microsoft Office Technology

Filter Cells In Excel With Strike Through Formatting

I have just finished reviewing an excel spreadsheet where a number of the rows were formatted with strikethough : like this.

The formatting was valid and the rows have to stay there – but I have no need to review those rows. In excel you can filter rows, by contents or even by colour but not by format.

Enter a VBA user function:

Categories
Microsoft Office Windows Work

Microsoft Office–VBA Editor Keeps Opening

For weeks now I have had the mild annoyance that the VBA code editor for various Excel spreadsheet’s appear to be opening at “randomâ€?. I finally tracked it down to me unlocking my PC. If I have excel running then lock my PC, when I unlock it, the VBA code editor appears.

I’m using Office 2003 SP3 on XP Pro SP3.

Turns out that there is a VERY easy fix – don’t maximise the VBA code editor.
If the editor is maximised, it appears on unlock, if it is not maximised it does not appear automatically on unlock.