View previous topic :: View next topic |
Author |
Message |
shosa Newbie
Joined: 10 Mar 2008 Posts: 6
|
Posted: Mon Mar 10, 2008 7:04 pm Post subject: Call Notifier checking Outlook Contacts - Done |
|
|
Hello,
after some toying around I programmed a solution to check incoming calls against your Outlook contacts - I just need to integrate the VB Script I made into the Call Notifier Java Script.
If anyone can give me a hand here since I'm an absolute idiot when it comes to Java Script, I'd be grateful.
Here is what I made in VB. The 'searchString' variable must be the 'thePhoneNumber' from the Call Notifier script.
[code:1]
On Error Resume Next
Const olFolderContacts = 10
Dim arrContacts (1000)
Dim arrLength, ItemCount
Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set colContacts = objNamespace.GetDefaultFolder(olFolderContacts).Items
ItemCount = 0
For Each objContact In colContacts
line = objContact.HomeTelephoneNumber & objContact.BusinessTelephoneNumber & objContact.MobileTelephoneNumber
dline = Replace (line, " ", "")
line = objContact.FullName & "_" & dline
arrContacts(ItemCount)= line
ItemCount = ItemCount +1
Next
SearchString = "+43664"
For Each InputItem In arrContacts
TempString = InputItem
If InStr(TempString, SearchString) > 0 Then
pos = InStr(TempString, "_")
displayString = Left(TempString, pos-1)
End If
Next
[/code:1]
If you have any questions, just ask - and a big thanks to you Java wiz kids out there!
|
|
Back to top |
|
 |
shosa Newbie
Joined: 10 Mar 2008 Posts: 6
|
Posted: Tue Mar 11, 2008 1:12 pm Post subject: |
|
|
Ok, I've changed the whole stuff to vbs now. Enjoy -
[code:1]
function CallStatusChanged( theTerminal, theCallStatus, thePhoneNumber, theCallType, theCID )
'On Error Resume Next
Const olFolderContacts = 10
Const Title = "Incoming call from "
Dim arrContacts (1000)
Dim arrLength, ItemCount
Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set colContacts = objNamespace.GetDefaultFolder(olFolderContacts).Items
If theCallStatus = 7 Then
If Not thePhoneNumber = "" Then
ItemCount = 0
For Each objContact In colContacts
line = objContact.HomeTelephoneNumber & objContact.BusinessTelephoneNumber & objContact.MobileTelephoneNumber
dline = Replace (line, " ", "")
line = objContact.FullName & "_" & dline
arrContacts(ItemCount)= line
ItemCount = ItemCount +1
Next
SearchString = thePhoneNumber
For Each InputItem In arrContacts
TempString = InputItem
If InStr(TempString, SearchString) > 0 Then
pos = InStr(TempString, "_")
displayString = Left(TempString, pos-1)
'WScript.Echo displayString
End If
Next
displayString = Title & displayString
Else
displayString = Title & " unknown number"
End If
Call ShowMessage (displayString , NoIcon, -1, 1000)
End If
End Function
[/code:1]
|
|
Back to top |
|
 |
pepe6859 Newbie
Joined: 10 Mar 2008 Posts: 10
|
Posted: Tue Mar 11, 2008 1:27 pm Post subject: |
|
|
So when ready to install this will do what Im asking in another post about to display caller name from CALL NOTIFIER right?
The thing is that now I need to syncronize my Nokia PC SUITE with otlook express and till now I've been not able to do so :-(
But a least we are going in the right path jejejejeje
|
|
Back to top |
|
 |
shosa Newbie
Joined: 10 Mar 2008 Posts: 6
|
Posted: Tue Mar 11, 2008 2:45 pm Post subject: |
|
|
This is what the script does - see attached screenshot. Please note that I am using it with Outlook 2007 not Express.
Description: |
|
Filesize: |
31.62 KB |
Viewed: |
30415 Time(s) |

|
|
|
Back to top |
|
 |
pepe6859 Newbie
Joined: 10 Mar 2008 Posts: 10
|
Posted: Tue Mar 11, 2008 2:57 pm Post subject: |
|
|
Hi Shosa
Im using office outlook 2007 also (sorry for my mistake)
So that means tha it is already a working script? I copy and paste and thats it?
I did it and not working at all.
I erase the old content and paste the new as it is.
Thankes for any advise.
|
|
Back to top |
|
 |
shosa Newbie
Joined: 10 Mar 2008 Posts: 6
|
Posted: Tue Mar 11, 2008 3:01 pm Post subject: |
|
|
You'll need to edit the xml file so it matches the new filename (callnotifier.vbs not .js)
|
|
Back to top |
|
 |
pepe6859 Newbie
Joined: 10 Mar 2008 Posts: 10
|
Posted: Tue Mar 11, 2008 4:06 pm Post subject: |
|
|
I still trying to get a software to make my .vbs jejejeje the HTLM already edited.
Thanks for ur tips
|
|
Back to top |
|
 |
pepe6859 Newbie
Joined: 10 Mar 2008 Posts: 10
|
Posted: Tue Mar 11, 2008 6:14 pm Post subject: |
|
|
I dont have the knowlage about debbuger and so on. So not able to install it :?
|
|
Back to top |
|
 |
pepe6859 Newbie
Joined: 10 Mar 2008 Posts: 10
|
Posted: Wed Mar 12, 2008 8:34 am Post subject: |
|
|
I'm lost!!!!
|
|
Back to top |
|
 |
pepe6859 Newbie
Joined: 10 Mar 2008 Posts: 10
|
Posted: Wed Mar 12, 2008 11:07 am Post subject: |
|
|
:shock: At least Outlook syncronized with my phone!!!! :D :D :D :D
Only the script file still offering resistance jejejejeje
|
|
Back to top |
|
 |
frrik Newbie
Joined: 16 Apr 2008 Posts: 2
|
Posted: Thu Apr 17, 2008 12:03 am Post subject: |
|
|
Hi,
I cant get this to work. It's all done by the book - I think - but I can't figure it out.
This is the log:
Tue Apr 15 19:57:13 2008
Call Notifier - Körningsfel i Microsoft VBScript
[Line: 18 (10)] [color=red]Objektet stöder inte egenskapen eller metoden[/color].: 'objContact.HomeTelephoneNumber'
The RED text reads something like [i]"Object does not support the feature or method"[/i].
HELP PLEASE!
|
|
Back to top |
|
 |
InGeNeTiCs Newbie
Joined: 30 Apr 2008 Posts: 1
|
Posted: Wed Apr 30, 2008 5:32 pm Post subject: |
|
|
Ok, so how do I change the display interval on this? It seems like it only pops up for half a second before it disappears. Hardly long enough for me to decide whether I want to ignore the person calling or not.
Thanks
|
|
Back to top |
|
 |
vwmomo Newbie
Joined: 23 Aug 2007 Posts: 5
|
Posted: Sat May 03, 2008 2:04 am Post subject: Just displays Unknown Number |
|
|
Did everything I was suppose to do and synced my address book from my phone.. Im wondering also if I can get it to show longer its only up for a half a second... Just shows "Incoming call from unknown number"
Thomas
|
|
Back to top |
|
 |
shosa Newbie
Joined: 10 Mar 2008 Posts: 6
|
Posted: Tue May 06, 2008 1:26 pm Post subject: |
|
|
This entry controlls how long the caller ID is displayed
[code:1]
Call ShowMessage (displayName , NoIcon, -1, 10000)
[/code:1]
Edit the "10000" (equals 10 seconds) to fit your needs.
Regards - Tom
|
|
Back to top |
|
 |
shosa Newbie
Joined: 10 Mar 2008 Posts: 6
|
Posted: Tue May 06, 2008 1:33 pm Post subject: |
|
|
Frrik,
this line
[code:1]
line = objContact.HomeTelephoneNumber & objContact.BusinessTelephoneNumber & objContact.MobileTelephoneNumber
[/code:1]
represents the fields which are queried in Outlook (Mobile Phone Number, etc.) - if you use other fields (like Business Phone Number 2 or alike) you'll need to adapt those fields to your needs.
Or your Outlook is not 2007 that is also possible (I'm afraid those objects only exist in Outlook 2007).
Regards - Tom
|
|
Back to top |
|
 |
|