Sometimes, you may want to check the meeting location in a map. Thus, in this post, we’ll expose you a piece of VBA code, which will allow you directly map the meeting location straightly within Outlook.
As we all know, Outlook has a native feature for mapping the contact address. However, there is no function for mapping the meeting location. Therefore, many users are looking forward to a method to map meeting location. In general, you can resort to any Map services in Internet browser and then search the meeting location. But without any doubts, it is a bit troublesome. Thus, here we will teach you to map a meeting location directly in your Outlook. Now read on to get the elaborate steps and concrete VBA code.
Map Meeting Location Directly within Outlook
- For a start, launch your Outlook program.
- After getting into the main Outlook window, press “Alt + F11” key buttons.
- Subsequently, you will be able to access the Outlook VBA editor window.
- Then you ought to find and open a module which is not being used.
- Next you could copy and paste the following VBA code into this module.
Sub MapMeetingLocationiwithinOutlook() Dim objMeeting As Outlook.AppointmentItem Dim objWordDocument As Word.Document Dim strMeetingLocation As String Dim strURL As String Dim objExplorer As Explorer Dim objWebBrowser As Object On Error Resume Next Select Case TypeName(Outlook.Application.ActiveWindow) Case "Inspector" Set objMeeting = ActiveInspector.CurrentItem Case "Explorer" Set objMeeting = ActiveExplorer.Selection.Item(1) End Select strMeetingLocation = objMeeting.Location If strMeetingLocation <> "" Then strMeetingLocation = Replace(strMeetingLocation, " ", "-") 'Use Google Maps strURL = "http://maps.google.com/maps?q=" & strMeetingLocation 'Open the map of the meeting location within Outlook Set objExplorer = Application.ActiveExplorer Set objWebBrowser = objExplorer.CommandBars.FindControl(, 1740) objWebBrowser.Text = strURL objWebBrowser.Execute Else MsgBox "Invalid Location", vbExclamation End If End Sub
- After that, for future convenient check, you had better add the new macro to Quick Access Toolbar or ribbon.
- Later you need to change your Outlook macro security level to low.
- Finally you can have a try.
- Firstly, you can open a meeting to view it in its own window or just select a meeting to view it in reading pane.
- Then you can press the newly added macro in Quick Access Toolbar.
- Next Outlook will open the Google Maps in its main window and map the meeting location, like the following screenshot:
Unable to Be Immune from Errors
Despite boasting of multiple features, Outlook still cannot get exempt from errors. For instance, you may come across various problems during using Outlook. Thus, you should make sufficient precautions, like backing up Outlook data on a regular basis and preparing a robust Outlook recovery tool, such as DataNumen Outlook Repair.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including recover mdf and outlook repair software products. For more information visit www.datanumen.com