A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Replace olFolderContacts for Sharepoint lists in Outlook



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 5th 09, 01:46 PM posted to microsoft.public.outlook.program_vba
Alexnts
external usenet poster
 
Posts: 7
Default Replace olFolderContacts for Sharepoint lists in Outlook

Good morning to all

I am using this piece of code here
http://www.vboffice.net/sample.html?...cmd=showite m
to massively change the internet format field of Sharepoint Contacts in
Outlook.
It works like a charm in the local contact list but not in the cached
Sharepoint lists.
The problem is at this line i think.

Set Items = Session.GetDefaultFolder(olFolderContacts).Items

How can i set the script to selectand workon the Sharepoint lists(local
cached) instead of the local lists?

Best Regards.
Ads
  #2  
Old October 5th 09, 01:58 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default Replace olFolderContacts for Sharepoint lists in Outlook

To get a non-default folder, you need to walk the folder hierarchy using the
Folders collections or use a function that does that for you. For examples,
see:

http://www.outlookcode.com/codedetail.aspx?id=628 - uses a folder path
string
http://www.outlookcode.com/codedetail.aspx?id=492 - searches for a folder by
name

What you're trying to do may not work, though, because (a) SharePoint simply
doesn't support all the fields and functionality of Outlook contacts and (b)
the synchronization process may overwrite whatever changes you make in the
local cached copy of the SharePoint list. I would make the change on an
individual contact and see what happens at the next sync, before making an
investment in coding something bigger.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Alexnts" wrote in message
...
Good morning to all

I am using this piece of code here
http://www.vboffice.net/sample.html?...cmd=showite m
to massively change the internet format field of Sharepoint Contacts in
Outlook.
It works like a charm in the local contact list but not in the cached
Sharepoint lists.
The problem is at this line i think.

Set Items = Session.GetDefaultFolder(olFolderContacts).Items

How can i set the script to selectand workon the Sharepoint lists(local
cached) instead of the local lists?

Best Regards.



  #3  
Old October 5th 09, 02:54 PM posted to microsoft.public.outlook.program_vba
Alexnts
external usenet poster
 
Posts: 7
Default Replace olFolderContacts for Sharepoint lists in Outlook

Hello Sue.
Thank you for your answer.
I am not trying to change any field on sharepoint directly.
I am trying to change the Internet format on the cached sharepoint list.
My whole scenario is this
www.tinyurl.com/defaultrtf (outlook contacts part of this forum)
Using Outlook 2007 the changes i make doesn't alter after a synchronization.
Outlook by default sets RTF to every imported contact (the imports may be
from Sharepoint or ActiveSync.It doesn't matter)
Unfortunately this is a setting that overrides the global mail format under
Outlook and produces winmail.dat attachements to every contact not using
Outlook. (yeah what a mess...)

A note about the second link that searches for a folder by name.
Unfortunately my programming skills are almost a joke, and i can't make it
work.
I guess that this code runs under ThisOutlookSession (Alt+F11).Right?
Also i can't seem to find the place where i insert the argument's name.
(' Arguments: strFolderName = name of folder to search for)
In which part of the code i enter my folder's name?
Let's say the folder's name is DefaultRTF.

Excuse my funny questions and my lousy English.
Best Regards.



"Sue Mosher [MVP]" wrote:

To get a non-default folder, you need to walk the folder hierarchy using the
Folders collections or use a function that does that for you. For examples,
see:

http://www.outlookcode.com/codedetail.aspx?id=628 - uses a folder path
string
http://www.outlookcode.com/codedetail.aspx?id=492 - searches for a folder by
name

What you're trying to do may not work, though, because (a) SharePoint simply
doesn't support all the fields and functionality of Outlook contacts and (b)
the synchronization process may overwrite whatever changes you make in the
local cached copy of the SharePoint list. I would make the change on an
individual contact and see what happens at the next sync, before making an
investment in coding something bigger.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Alexnts" wrote in message
...
Good morning to all

I am using this piece of code here
http://www.vboffice.net/sample.html?...cmd=showite m
to massively change the internet format field of Sharepoint Contacts in
Outlook.
It works like a charm in the local contact list but not in the cached
Sharepoint lists.
The problem is at this line i think.

Set Items = Session.GetDefaultFolder(olFolderContacts).Items

How can i set the script to selectand workon the Sharepoint lists(local
cached) instead of the local lists?

Best Regards.




  #4  
Old October 5th 09, 03:16 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default Replace olFolderContacts for Sharepoint lists in Outlook

If you've already tested to see whether changes persist after a sync, that's
great. You should then have everything you need now to complete your
project.

The code sample at http://www.outlookcode.com/codedetail.aspx?id=492 is
designed as a generic function that can be used in many different
environments. To use it in Outlook VBA, either in ThisOutlookSession or
another module, you would want to change this statement:

Set objApp = CreateObject("Outlook.Application")

to

Set objApp = Application

in order to use the intrinsic Application object that Outlook VBA exposes.

The first comment on the code sample is an example of its usage.
GetFolderByName() is a function, so you pass the folder name to it as you
would any other function argument, e.g. MyFunction(myargument). Put it in
your code where you need to return the folder to work on.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Alexnts" wrote in message
...
Hello Sue.
Thank you for your answer.
I am not trying to change any field on sharepoint directly.
I am trying to change the Internet format on the cached sharepoint list.
My whole scenario is this
www.tinyurl.com/defaultrtf (outlook contacts part of this forum)
Using Outlook 2007 the changes i make doesn't alter after a
synchronization.
Outlook by default sets RTF to every imported contact (the imports may be
from Sharepoint or ActiveSync.It doesn't matter)
Unfortunately this is a setting that overrides the global mail format
under
Outlook and produces winmail.dat attachements to every contact not using
Outlook. (yeah what a mess...)

A note about the second link that searches for a folder by name.
Unfortunately my programming skills are almost a joke, and i can't make it
work.
I guess that this code runs under ThisOutlookSession (Alt+F11).Right?
Also i can't seem to find the place where i insert the argument's name.
(' Arguments: strFolderName = name of folder to search for)
In which part of the code i enter my folder's name?
Let's say the folder's name is DefaultRTF.

"Alexnts" wrote in message
...
Good morning to all

I am using this piece of code here
http://www.vboffice.net/sample.html?...cmd=showite m
to massively change the internet format field of Sharepoint Contacts in
Outlook.
It works like a charm in the local contact list but not in the cached
Sharepoint lists.
The problem is at this line i think.

Set Items = Session.GetDefaultFolder(olFolderContacts).Items

How can i set the script to selectand workon the Sharepoint lists(local
cached) instead of the local lists?

Best Regards.






  #5  
Old October 6th 09, 11:15 AM posted to microsoft.public.outlook.program_vba
Alexnts
external usenet poster
 
Posts: 7
Default Replace olFolderContacts for Sharepoint lists in Outlook

Thank you for your answer Sue!

Regarding GetFolderByName, from what i can understand i have to create a Sub
that calls this function.Right?

The code that rockman posts (in the first post) to run behind a button
doesn't seem work on me. (nothing happens).
I have also tried to test the code that Emory Brown posts in your " New
and improved GetFolder() function" posts but the debugger stops on "Dim regex
As RegExp"

Argghhh...
I really thought that i could bypass this bug of Outlook (regarding the
dafaultrtf) without having special programming skills.

Best Regards.
Alex

"Sue Mosher [MVP]" wrote:

If you've already tested to see whether changes persist after a sync, that's
great. You should then have everything you need now to complete your
project.

The code sample at http://www.outlookcode.com/codedetail.aspx?id=492 is
designed as a generic function that can be used in many different
environments. To use it in Outlook VBA, either in ThisOutlookSession or
another module, you would want to change this statement:

Set objApp = CreateObject("Outlook.Application")

to

Set objApp = Application

in order to use the intrinsic Application object that Outlook VBA exposes.

The first comment on the code sample is an example of its usage.
GetFolderByName() is a function, so you pass the folder name to it as you
would any other function argument, e.g. MyFunction(myargument). Put it in
your code where you need to return the folder to work on.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Alexnts" wrote in message
...
Hello Sue.
Thank you for your answer.
I am not trying to change any field on sharepoint directly.
I am trying to change the Internet format on the cached sharepoint list.
My whole scenario is this
www.tinyurl.com/defaultrtf (outlook contacts part of this forum)
Using Outlook 2007 the changes i make doesn't alter after a
synchronization.
Outlook by default sets RTF to every imported contact (the imports may be
from Sharepoint or ActiveSync.It doesn't matter)
Unfortunately this is a setting that overrides the global mail format
under
Outlook and produces winmail.dat attachements to every contact not using
Outlook. (yeah what a mess...)

A note about the second link that searches for a folder by name.
Unfortunately my programming skills are almost a joke, and i can't make it
work.
I guess that this code runs under ThisOutlookSession (Alt+F11).Right?
Also i can't seem to find the place where i insert the argument's name.
(' Arguments: strFolderName = name of folder to search for)
In which part of the code i enter my folder's name?
Let's say the folder's name is DefaultRTF.

"Alexnts" wrote in message
...
Good morning to all

I am using this piece of code here
http://www.vboffice.net/sample.html?...cmd=showite m
to massively change the internet format field of Sharepoint Contacts in
Outlook.
It works like a charm in the local contact list but not in the cached
Sharepoint lists.
The problem is at this line i think.

Set Items = Session.GetDefaultFolder(olFolderContacts).Items

How can i set the script to selectand workon the Sharepoint lists(local
cached) instead of the local lists?

Best Regards.






  #6  
Old October 6th 09, 01:37 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default Replace olFolderContacts for Sharepoint lists in Outlook

Yes, your scenario needs a macro, which is a public, argumentless
subroutine. What happens when you step through the demo procedure in the
debugger? Have you checked the VBA basics at
http://outlookcode.com/article.aspx?id=49?

If you're not using regular expressions in your project, you don't need that
Dim statement from the other sample or any of the code that references
regex.

In general, you're going to have to understand the code in order to use it.
That doesn't mean "special" programming skills in your scenario, just basic
skills and a willingness to spend some time learning.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Alexnts" wrote in message
...
Thank you for your answer Sue!

Regarding GetFolderByName, from what i can understand i have to create a
Sub
that calls this function.Right?

The code that rockman posts (in the first post) to run behind a button
doesn't seem work on me. (nothing happens).
I have also tried to test the code that Emory Brown posts in your " New
and improved GetFolder() function" posts but the debugger stops on "Dim
regex
As RegExp"

Argghhh...
I really thought that i could bypass this bug of Outlook (regarding the
dafaultrtf) without having special programming skills.

Best Regards.
Alex

"Sue Mosher [MVP]" wrote:

If you've already tested to see whether changes persist after a sync,
that's
great. You should then have everything you need now to complete your
project.

The code sample at http://www.outlookcode.com/codedetail.aspx?id=492 is
designed as a generic function that can be used in many different
environments. To use it in Outlook VBA, either in ThisOutlookSession or
another module, you would want to change this statement:

Set objApp = CreateObject("Outlook.Application")

to

Set objApp = Application

in order to use the intrinsic Application object that Outlook VBA
exposes.

The first comment on the code sample is an example of its usage.
GetFolderByName() is a function, so you pass the folder name to it as you
would any other function argument, e.g. MyFunction(myargument). Put it
in
your code where you need to return the folder to work on.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Alexnts" wrote in message
...
Hello Sue.
Thank you for your answer.
I am not trying to change any field on sharepoint directly.
I am trying to change the Internet format on the cached sharepoint
list.
My whole scenario is this
www.tinyurl.com/defaultrtf (outlook contacts part of this forum)
Using Outlook 2007 the changes i make doesn't alter after a
synchronization.
Outlook by default sets RTF to every imported contact (the imports may
be
from Sharepoint or ActiveSync.It doesn't matter)
Unfortunately this is a setting that overrides the global mail format
under
Outlook and produces winmail.dat attachements to every contact not
using
Outlook. (yeah what a mess...)

A note about the second link that searches for a folder by name.
Unfortunately my programming skills are almost a joke, and i can't make
it
work.
I guess that this code runs under ThisOutlookSession (Alt+F11).Right?
Also i can't seem to find the place where i insert the argument's name.
(' Arguments: strFolderName = name of folder to search for)
In which part of the code i enter my folder's name?
Let's say the folder's name is DefaultRTF.

"Alexnts" wrote in message
...
Good morning to all

I am using this piece of code here
http://www.vboffice.net/sample.html?...cmd=showite m
to massively change the internet format field of Sharepoint Contacts
in
Outlook.
It works like a charm in the local contact list but not in the
cached
Sharepoint lists.
The problem is at this line i think.

Set Items = Session.GetDefaultFolder(olFolderContacts).Items

How can i set the script to selectand workon the Sharepoint
lists(local
cached) instead of the local lists?

Best Regards.








 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace olFolderContacts for Sharepoint lists in Outlook VBA Alexnts Outlook - Using Contacts 1 October 1st 09 06:38 PM
SharePoint Lists in Outlook Humphrey Outlook - Installation 2 October 27th 07 01:30 PM
Sharepoint-Lists and adm-Template ??? Christian Gröbner [MVP] Outlook - General Queries 7 July 19th 07 05:15 PM
Exception occured when retrieving ContactItem in olFolderContacts OctopusThu Outlook - Using Forms 1 November 9th 06 03:54 PM
Distribution Lists sourced from linked SharePoint Contact Lists Marcela Outlook - Using Contacts 4 July 17th 06 12:08 AM


All times are GMT +1. The time now is 07:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.