Log in

View Full Version : Hotmail on your PocketPC at last!


sk4rlath
02-15-2002, 04:01 AM
Once I found out that I couldn’t have Hotmail on my iPaq, I set out to make something to let me get it on there without having to manually move all the messages. Although I haven’t got it to do it automatically when I sync (working on that… ^_-) I DID manage to make a VBA macro for Outlook to sync the folders and copy the contents of the special Hotmail folder’s inbox into the Personal Folders’ inbox. To call it, you can just go to the macros menu and run it (personally, I replaced the Send/Receive button on the toolbar with a call to my macro, so all I have to do is start up Outlook and hit Send/Receive to get my Hotmail onto my iPaq). To use, just drop into the VB Macro editor (Tools > Macros > Visual Basic Editor), paste the code in there. Hit save, and voila!

Dim WithEvents sync As SyncObject

Sub MoveMail()

Set sync = Session.SyncObjects("All Accounts")

sync.Start

End Sub

Private Sub sync_SyncEnd()
Dim Hotmail As MAPIFolder
Dim HotInbox As MAPIFolder
Dim Personal As MAPIFolder
Dim Inbox As MAPIFolder
Dim Message As MailItem

Set Hotmail = Session.Folders("Hotmail")
Set HotInbox = Hotmail.Folders("Inbox")
Set Personal = Session.Folders("Personal Folders")
Set Inbox = Personal.Folders("Inbox")

For Each Message In HotInbox.Items
Message.Move Inbox
Next Message

End Sub

Have fun with this one, and tell me if it doesn’t work. I have Outlook xp and I haven’t gotten a chance to test it out on anything else.

zucchini
02-15-2002, 11:35 AM
hi, thanz for the code, it work like a chamz!

but there is one problem, i would like to save a copy of the msg inside my hotmail account, thus instead of moving the msg, can i alter the program so that it copy the msg and send it to the inbox?

Thanz again!

sk4rlath
02-15-2002, 11:40 AM
Shouldn't be a problem to copy them over instead of moving them. I'll take a look at it. ^_-

I also recieved an email from someone who uses Office 2000 - apparently the script doesn't work for 2k. That's to be expected: VBA isnt backwards compatible for the most part. I'll try to snag a copy and fiddle with it till I get it to work on 2000 as well. If I do, it'll most likely be a separate script for xp and 2000.

zucchini
02-15-2002, 11:49 AM
thanz, will keep an eye on this one. :)

spg
02-15-2002, 04:52 PM
Looks good, nice job.

~Spencer

ipaq-PHD
02-16-2002, 05:35 PM
Thanks :D

gamboagarcia
02-17-2002, 01:18 AM
I'm probably to stupid for this. I have Office XP too, I followed your steps but it didn't worked.

Let me tell you what I'm doing:

1. Copy the code.
2. In outlook XP: Tools | Macro | VBE
(when VBE opens nothing but the Project Explorer window is open.)
3. Selected Insert | Class Module then Paste / Compile...
4. Save.
5. Close VBE.
6. In outlook XP: Tools | Macro | VBE | macros...
7. nothing there!!!!

Did the same with a Module intead and a message apears warning that WithEvents work within Class Modules only!!!

ThisOutlookSession Object and a message warns about "marcos in this project are diabled"

What Im doing wrong???

sk4rlath
02-17-2002, 01:26 AM
What's your security level for macros set at? I had the same problem (disabled macros) for quite sometime myself until I set the security to low. It's because my macro isn't digitally signed that it's disabled (digital signing costs about $200! That's why it's not signed ^_-). If setting it doesnt seem to work try restarting Outlook. If it still doesn't work, try rebooting. I can't remember exactly how I got it to work, but the above sounds about right.

Update: With a bit of help in finding it from the wincedev mailing list (these guys are the real deal - they know what they're talking about), I've located something I can look at to make a real ActiveSync item for Hotmail. Then you wouldn't even have to open Outlook! I'll be working on that now. ^_^

mclaughlinc
02-17-2002, 02:48 AM
I could not believe Microsoft left support for Hotmail out. I switched to MSN Broadband only to find out that I had to use Web based mail and in Outlook 2002 the folder where ny new messages go does not sync to my Pocket PC not even in Pocket PC 2002 OS. Did you also notice that Rules in Outlook 2002 do not work on Web based e-mail accounts?

Jason,

This is one that needs to be pasted along to Microsoft to address in the next release. Let's face it we expect Microsoft products to work with other MIcrosoft products.
:?

spg
02-17-2002, 03:14 AM
Let's face it we expect Microsoft products to work with other MIcrosoft products. :?


Very well put, I wonder what we CAN expect if one Microsoft product is incompatible with another? I mean come on, at least allow us to sync the hotmail folder without macros!

Now I know that if you have a wireless connection, there is a PPC version of hotmail web access that can be used. But the majority do not have wireless access. Microsoft could definitely make some improvements in this category.