How do I change the default map from Bing to Google in Outlook 2003?

Status
Not open for further replies.

makanda

Member
Outlook version
Email Account
POP3
I'm sure this question has been asked many times. I have seen this question on the web but found no solution.

Thank You,

Jerry Probst

Dallas, TX
 
Diane,

Thank you very much for the solution to my question regarding mapping in Outlook 2003.

When you sent me the links earlier I did not realize you wrote code to accomplish the task. I have to admit I saw VBA and my eyes glazed over and I saved the post for future reference.

I followed your directions on pasting the code in the VBA editor and I changed the Address code to strAddress = oContact.HomeAddress.

At this point you said to add the macro to a button on the main Outlook tool bar. Forgive my ignorance, but how do I do that? I have the code in the "ThisOutllookSession" window. Do I need to save the macro somewhere before I create the button? I am real excited about this and don't want to mess it up. lol

Also can I change the url from Zillow to Google and achieve the same results in Google maps?

Finally, regarding the address format. The data I import into my outlook contacts has only two address components. The first contains the [street city, State] and the second is the [zip code]. I import these fields into the [HomeAddressStreet] and [HomeAddressPostalCode] fields respectively. By using the
strAddress = oContact.HomeAddress statement that you included in your post, does Outlook recognize these elements as a single combined address? It seems to work when I click the mapit icon to map the addresses in Bing.



Thank you once again for your help. I do FEMA disaster assistance following major disasters such as hurricanes. I am creating a custom contact / appointment scheduling system to help better organize my day. When I am in the field working, I will repeat many small tasks such as mapping my addresses dozens of times a day. They all add up. Every bit of automation I can build into the system will simplify my job and help me to reach more people in the day.



Adding mapping functions to my contact manager is going to be a very big help.

Regards,

Jerry Probst

 
I tried the macro you sent and figured out how to attach it to a button, but I have not been able to get it too run.

I tried every combination of address sequence I could think of, but none work. Each time I tried a different address I also clicked the Map button on the tool bar and was able to bring up the address in Bing. So I don't think the problem is in the address.

I don't know if this matters. I use Outlook 2003 on Windows XP and use Google Chrome as my default browser.

All I did was cut and paste the code you provided in the [ThisOutlookSession] window in VBA. I saved it and then opened up the customize Toolbar window in Outlook. I went to Macros and selected the macro for [ThisOutlooksession].

The following is the text currently in the VBA window. ...

Sub MapAddress()

Dim strURL As String
Dim oApp As Object
Dim strAddress As String
Set oApp = CreateObject("InternetExplorer.Application")

If TypeName(ActiveExplorer.Selection.Item(1)) = "ContactItem" Then
Set oContact = ActiveExplorer.Selection.Item(1)

strAddress = oContact.HomeAddressStreet

ReplaceSpaces strAddress

strURL = "http://www.zillow.com/homes/" & strAddress

oApp.navigate (strURL)

oApp.Visible = True

'wait for page to load before passing the web URL

Do While oApp.Busy
DoEvents

Loop
End If

Set oApp = Nothing

End Sub

Private Sub ReplaceSpaces(strAddress As String)
strAddress = Replace(strAddress, " ", "-")

End Sub

Let me know if I have done anything wrong.

Thank you

Jerry
 
For google, use "https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=" & strAddress

Is an address in the home address field on the contact? Try testing the macro using the tools, macro command - open a contact, go to tools, macros and choose the macro.
 
Thank you Diane,

I opened a contact. I selected the Home Address. I checked the Address button to see if the address was listed. I ran the macro. And I received this error msg. "Array Index Out of Bounds"

Tnanks for the code for Google Maps. You are awesome.

Jerry
 
strAddress = oContact.HomeAddressStreet is only getting the street address. You need city and state too.

I can't repro your error - the code you posted here worked, except it only mapped the street. The street address was ct and it mapped it to Connecticut.
 
Hmmmm, ok so it is the address format? Let me do some tinkering. I'll get back with you.

Jerry
 
I'm still not having any luck. I keep getting the "Array Index Out of Bounds" message.

One thing I am doing is changing the BusinessAddressStreet ... et al to read HomeAddressStreet ... etc.

Could that be causing the problem. If so I can set up my data import to use the Business Address fields.

Thinking I may have made an error in copying the first time I copied the Code into VBA I deleted what was there and then copy and pasted the Code again from your post. That didn't change things.

I also tried switching the Google Maps code for the Zillow code in case the problem was at their web site. Again that didn't change things.

Sorry this isn't working and for taking up your time. I really appreciate your help.

Thanks

Jerry
 
Try using just strAddress = oContact.HomeAddress - this will use the entire address block.
 
Sorry it took me so long to reply. Because of an unrelated operation I had to do some maintanence and reboot my computer.

When I got back to Outlook I added the HomeAddress code and re ran the macro.

This time I got a message stateing: The Macros in this project are disabled. Please refer to online help or documentation of the host application to determine how to enable macros.

I'm starting to get frustrated.

Thanks for the help.

this will have to wait for another time.

Jerry
 
Diane,

Success! You are brilliant!

When I woke up this morning I started outlook again. I was able to "enable macros" and I ran the macro using the combined HomeAddress code you gave me last night.

At first nothing seemed to happen. I thought it failed again. But then slowly Internet Explorer opened up Google Maps with the correct address.

I then exchanged the Zillow URL and it worked too. Fantastic!!

Now I have a couple questions to get these macros in operation.

First, I don't want to use IE. I use Google Chrome as my default browser on a small 30G VirtualBox XP Guest machine. I try to stay away from IE and don't want to have two browsers open at once. In addition, after using Chrome IE runs excrutiatingly slow.

When I open an address using the Outlook Map link it opens in Google Chrome without a problem.

Do you know why the macro needs to open IE ... and ... how I can change it to Chrome?

Second, Now that I have the code working, I need to create separate Buttons for each URL. I do not see a "Save As" command in VBA. How can I save each version as a separate macro?

Similarly, I also need to do address searches at County Tax Offices. Can I use the same search macro for that purpose by swapping out the Tax Office search URL?

Finally, regarding my two other questions from last night.

I reset the Standard Tool Bar to try to regain the create "New Appointment from Contact". It didn't work. I recall creating a custom tool bar some time back. I included the "New Appointment from Contact" button. After that I did some re-arranging of the Actions Menu. It is possible that I deleted the "New Appointment from Contact" command. I don't recall doing it, but that is the only time I can remember seeing it.

I would like it back. Are there any other tools I can use to reset those commands?

And ... Finally finally, Now that I have these brilliant macros, is there a way that I can save them in case I ever have to re-install Outlook? As I said I use Outlook on a Windows XP Virtual Machine. I want a make a back up so that I can reset my setup in case something catastrophic happens to the Virtual Machine. (It has happend in the past)

Diane, I cannot thank you enough for all your help. As I said, this will allow me to be more efficient in my work and thereby be able to help more people. These macros (and the custom form you helped me with earlier) are going to save so much time every day.

With grateful appreciation!:D

Jerry Probst​
 
This is why it uses ie:

Set oApp = CreateObject("InternetExplorer.Application")

i'll have to see what is needed to use chrome (or FF)

To use different urls - like one for zillow and one for google, you need to use the macro twice, once with each url. copy and paste it, changing the name of each sub so its unique.

for FF or chrome, you need to delete the oApp lines and use

Shell ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" & " " & strURL), vbNormalFocus

I'll add the code to the map page for this (and firefox)
 
on saving macros: one of two ways: copy the macro code to notepad and save it or export the macro - right click on thisoutlooksession and choose export. Oh, a 3rd way: backup or copy the VBAProject.OTM file in the local app data folder path - %localappdata%\microsoft\outlook.

i'll have to look into the new letter to contact stuff.
 
Thank you Diane,

Regading the line that directs the macro to use IE am I supposed to copy the Chrome code you included and substitute it in the same place as the IE code?
 
i have a version of the macro with this change on the bottom of the map page. Otherwise, you need to delete the lines that contain oApps and put the Shell line after the strUrl = line.
 
Diane,

Once again, Brilliant!

I have been successful opening both Google Maps and Zillow from my contacts using the BussinessAddress field.

Chrome opens much quicker than IE.

At first the macro did not run because my Chrome.exe file is in a different location than you included. Once I got that straightened out it worked like a charm.

Thus far I have only been able to save one file and save export copies of both versions.

I still haven't figured out how to save each unique macro under Tool/Macros. Each time I try to save the file with a new name under sub only the latest saved version is visible under the tool/macros menu. For example: I save the Google Maps version first as [MapAddressGoogleMapsChrome()] ... but when I saved the Zillow version as [MapAddressZillowChrome()] ... the Google Maps version disappeared. As I said I have both unique versions exported to a folder. My final task is to create two buttons for the Toolbar -- one for each version.

Can you give me some direction how to accomplish that?

And lastly .... once I finish ... how do I save this setup as a backup in case of future disaster?

Gracias Muchisimo!!!!

Thank you very much!!!

Jerry
 
in ThisOutlookSession, you'll have two macros - one called Sub GoogleMapsChrome () and one called Sub ZillowChrome () They will be identical except for the strUrl line. ThisOutlookSession will look like this:

Sub GoogleMapsChrome ()

'bunch of code

End sub

Sub ZillowChrome()

'bunch of code

End sub

customize the toolbar to add each to the Contact form.

You can backup the code but the toolbar buttons don't backup well. Right click on ThisOutlookSession and choose Export file.
 
Diane,

I'm sorry but I am still only able to save one version of the macro. Each time I save a version the previous version disappears.

I must be doing something incorrect.

Thus far I have simply made the changes in the window titled [VBAProject.OTM - ThisOutlookSession (Code)] and hit the Save VBAProject.OTM command under the File Menu. Each time I have changed the Title in the sub command to reflect the operation of the macro -- i.e., ZillowMapChrome, or GoogleMapsChrome. But when I go the Tool / Macros menu in Outlook I only see the most recent saved macro.

Let me ask a question: What are the macros listed in that menu? In the Microsoft Visual Basic VBAProject.OTM windo there are a couple classes of files that I am unfamiliar with. They are Projects, Sessions, Object, Module, Class Module and Procedure. Is one of these groups what is listed under the macros menu in Outlook. If so How do I properly save the different macros so that they are listed as unique items under the macros menu.

Sorry, about my confusion here. I have tried your suggestions but I must still be something I am overlooking. I have been searching the internet for the answer but I am a little beyond my range of knowledge.

Like I said the macros work perfectly ... I just need to be able to properly save them and recall them to put them to use.

Jerry
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P Outlook 2016 Change Paste Special Default Format Using Outlook 8
E How to display "Change Folder" in Change Default Email Delivery Location in Exchange Outlook 2016 Using Outlook 1
S Outlook 2010 unable to change default font Using Outlook 7
V Change default default save location to Quick Access Using Outlook 1
C Change default "Save Sent Item To" folder Outlook VBA and Custom Forms 9
H Change Default Email Account Using VBA Outlook VBA and Custom Forms 5
C Change default colors for conditional formatting Using Outlook 2
Diane Poremsky To Change the Default E-mail Program in Windows Using Outlook 0
L Change default from english to danish ...... Using Outlook 5
Davzell Change default pop3 account with script, prf or registery ? Outlook VBA and Custom Forms 0
Diane Poremsky Change the All Day Event Default Free/Busy to "Busy" Using Outlook 3
M Change default "automatically test account settings when Next is clicked" Using Outlook 1
David Rahrer Change default Junk E-Mail folder Using Outlook 6
C Change the default sent folder Outlook VBA and Custom Forms 1
JulieB Default data file won't change Using Outlook 6
ogodt Change Default contact form and import from Excel 2010 Using Outlook 1
A iCloud add-on for Outlook: Reminder for new appointment is set to 'None' by default. How to change? Using Outlook 6
B Change default email for address book Using Outlook 1
J Change Default View - Color and font Using Outlook 3
C Change default reminder time for contacts Using Outlook 2
S CHANGE DEFAULT VIEW FOR CONTACT (People) SEARCH - Outlook 2013 Using Outlook 3
M Change default Current View on People Using Outlook 1
T How to change default search engine in Outlook 2013? Using Outlook 3
J How to change my default calendar...? Using Outlook 1
H Outlook default landscape need to change to portrait Using Outlook 1
K Change the default Archive location via GPO in Outlook 2010 Using Outlook 3
F Change default value of date/time type from "None" to Blank Using Outlook 1
G Default Account Change Using Outlook 5
O Exchange + pst: Can I change the default Outlook calendar/tasks/account? Exchange Server Administration 2
S change default contact list in Outlook 2010 to "contacts" rather than "global" Exchange Server Administration 1
K Change default "Display As" for contact email addresses Using Outlook 1
G how to change default calendar view to show this week and future weeks? Using Outlook 1
J How To Change Default View of Tabs in Outlook 2010 Using Outlook 4
H How to make hourglass and change back to default in Outlook class ? Outlook VBA and Custom Forms 3
D How to change account used for replies from default Outlook VBA and Custom Forms 7
C How do I change the default "Add to Outlook Contacts" Folder Using Outlook 6
D RE: How do you change the default insert file path in outlook? Using Outlook 11
V change the Default email Delivery Location Outlook VBA and Custom Forms 3
C How do I change the default character spacing in Outlook e-mail? Using Outlook 3
M Default settings for "Display as" Change? Outlook VBA and Custom Forms 8
M Use Macro to change account settings Outlook VBA and Custom Forms 0
D Unable to change AppointmentItem.Start property Outlook VBA and Custom Forms 3
sjmo2 Change subject for new e-mails only. Outlook VBA and Custom Forms 2
Horsepower Contact phone numbers randomly change Using Outlook 0
whizzard Change FROM address based on TO or CC address Outlook VBA and Custom Forms 8
S Outlook 365 Can I change the possible range of highlighting colours when writing an Outlook email? Using Outlook 1
V Can one change the formatting of email title blocks? Using Outlook 0
S Unable to change Message Class Outlook VBA and Custom Forms 0
S New Outlook Appointment - Select All Body Text and Change Font and Size Outlook VBA and Custom Forms 1
J VBA Cannot programmatically input or change Value for User Defined field Using Outlook 1

Similar threads

Back
Top