How Outlook 2003 Stssync works

G

Guest

It’s seems to me that Outlook 2003 SP2 stssync synchronize changes in
SharePoint contact list only if I am located in SharePoint contact folder.
So I can mainly synchronize or wait for 20 min remaining on the WSS contact
folder. And stssync doesn’t work if I working in my Inbox folder.

Am I right?

Thanks.
 
S

Sue Mosher [MVP-Outlook]

The background sync should kick in every 20 minutes, regardless of what folder you happen to be viewing at the time.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Ok. But this means that the background sync doesn’t work in my environment.

Outlook 2003 SP2 (11.8002.6568)
SharePoint Portal Server 2003 SP1
Windows 2000 Domain Controller
Locale 1049

Where I’d start to find issue? May be I’d start from proxy settings, default
user credentials error, or alternate portal site URLs, SPN for application
pool identity.
May be Microsoft has hotfix?

Thanks.
 
G

Guest

Create VbaProject.OTM - VBA project for Outlook in C:\Documents and
Settings\%username%\Application Data\Microsoft\Outlook\

Open Outlook and press Alt+F11 to open VbaProject.OTM

Paste this code into ThisOutlookSession Startup event

=====================================================
Private Sub Application_Startup()

' NAME: WSS StsSyncAddOn
'
' AUTHOR : Shilov Pavel (e-mail address removed)
' DATE : 14.02.2006
' VERSION : 1.0.1
'
' COMMENT: Script to sync WSS contact lists. This script must be executed
' on Outlook startup. It opens all WSS contact list folders in
Outlook
' and sync data with SharePoint
'

Dim strMsg1, strMsg2 As String
Dim olApp As New Outlook.Application
Dim oNS As Outlook.NameSpace
Dim fldFolder As Outlook.MAPIFolder
Dim fldFolder1 As Outlook.MAPIFolder
Dim expContacts As Outlook.Explorer
Dim Response
Dim arrAppVer
On Error Resume Next
arrAppVer = Split(olApp.Version, ".")
If CInt(arrAppVer(0)) < 11 Then Exit Sub
strMsg1 = "Outlook should synchronize SharePoint contact lists." &
Chr(13) & Chr(10) & "This can take some minutes" & Chr(13) & Chr(10) &
"Continue?"
strMsg2 = "Contact lists have been synchronized successfully."

Set oNS = olApp.GetNamespace("MAPI")
For Each fldFolder In oNS.Folders
If fldFolder.IsSharePointFolder = True Then
If fldFolder.Folders.Count < 1 Then Exit Sub
Response = MsgBox(strMsg1, vbOKCancel + vbInformation +
vbDefaultButton2, "WSS StsSyncAddOn")
If Response = vbOK Then
For Each fldFolder1 In fldFolder.Folders
Set expContacts = fldFolder1.GetExplorer
expContacts.Activate
expContacts.Close
Next
Response = MsgBox(strMsg2, vbOKOnly + vbInformation, "WSS
StsSyncAddOn")
End If
End If
Next
On Error GoTo 0
End Sub

=====================================================

Sign code with digital signature from your MS CertSrv of your Domain

Use this script to distribute VbaProject.OTM

'==========================================================================
'
' NAME: VBA OTM distribute
'
' AUTHOR: Shilov Pavel , (e-mail address removed)
' DATE : 21.02.2006
' VER : 1.0.1
' COMMENT:
'
'==========================================================================
On Error Resume Next
Dim strPath, strPathToCopy, strFileName, strOfficeKey, res, WSHShell
strPath = "%Yuor share folder%"
strFileName = "Install.cmd"
strOutlookFName1 = "VbaProject.OTM"
strOutlookFName2 = "outcmd.dat"
strOfficeKey =
"HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\UserInfo\UserInfo"
set WSHShell = WScript.CreateObject("WScript.Shell")
strAgent = WSHShell.RegRead (strOfficeKey)
If Err = 0 Then
Set oFS = CreateObject("Scripting.FileSystemObject")
Set oDir = oFS.GetFolder(WSHShell.ExpandEnvironmentStrings("%APPDATA%") &
"\Microsoft\Outlook\")
Set oFiles = oDir.Files
For Each of In oFiles
If (of.Name = strOutlookFName1) Or (of.Name = strOutlookFName2) Then
of.Name = Left(of.Name,Len(of.Name)-3) & "back"
End If
Next
cmd = CHR(34) & strPath & strFileName & Chr(34)
res = WshShell.Run(cmd,0,True)
End If
Set WshShell = Nothing
On Error Goto 0

=======================================================
Install.cmd

Copy %YourShareFolder%\VbaProject.OTM "%APPDATA%\Microsoft\Outlook\" /y
Copy %YourShareFolder%\outcmd.dat "%APPDATA%\Microsoft\Outlook\" /y
 
S

Sue Mosher [MVP-Outlook]

So, you found that just displaying the folder was sufficient to update it?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Yes.
It turned out, that it would be the simplest way. And in that case Outlook
has to update WSS Contact List.

I tried to find events or methods that would help me with Outlook STSSync on
MSDN, but I just found how to add contact list using stssync protocol on SPPT
SDK and another basic article about stssync.

It is a pity. My solution isn’t good, but it works.

Thanks, Sue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top