Change SharePoint drafts folder location by logon script

In this previous post I explained how to change the default SharePoint drafts folder from
My documents/SharePoint Drafts to another location.

If you have to change this settings for more than 300 users this is not a job you want to do by hand, so here is a possible solution that might work:

Create 2 files:

1) sharepointdraftslocation.reg, this file contains the register keys that need to be added or altered.


Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\Common\Offline\Options]
"Local"=dword:00000001
"Location"="C:\\Users\\tom.vangaever.NEOMATICS\\Documents\\Other SharePoint Drafts\\"

2) sharepointdraftslocation.bat, this file will use the builtin REGEDIT.EXE application to add the correct register values in to the register.

@ECHO OFF
REGEDIT.EXE -S sharepointdraftslocation.reg
cls

By using an active directory group policy you can make sure that this sharepointdraftslocation.bat script is started each time the user logins in on a computer.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Change SharePoint drafts folder location

Scenario:

The infrastructure team decided several years ago that all the “my documents” folders redirect to a network share where you can store your files in order to make this files accessible on any other computer the user has access on.

The downside of this decision is that users in this scenario doesn't have the permissions to create new folders in their documents folder, in other words… SharePoint drafts or SharePoint-concepten in a dutch environment can't be created and by this issue users cannot check out any document from sharepoint…

Solution:

You are able to define a new location for draft documents at 2 places:

1) Open Word 2007 > Word options > Save > Server Drafts locations

2) Register values, this can be useful when you want to distribute these changes using a logon script…

Run > Regedit > HKEY_CURRENT_USER\Software\Microsoft\Office\Common\Offline\Options

in the register there are 2 values that need to be set:

This screen shows the result when the default value is used:

This screen shows the result when the value is altered to a custom location:

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

SharePoint automatic resource file translator

finally the release of SPResourceTranslator tool. this WPF application will automatically translate your resource files from one language to another language.

Download the tool from here

More information on CodePlex:

http://spresourcetranslator.codeplex.com/
http://spresourcetranslator.codeplex.com/wikipage

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Same sharepoint list multiple times in view all site content

A few weeks ago I posted a question on the MSDN forum about a rather strange bug.

Although nobody seemed to know the answer, we were able to find the problem.

When we opened the view all site content on a sharepoint website, we noticed that our custom document library showed 3 times on the screen. Each link redirected to the same list.

When we created the custom views in the schema.xml, we didn't change the DefaultView=”TRUE” to FALSE.

It seems that when more than 1 view is set as DefaultView, the list is showed more than once in the view all site content page.

when we changed the DefaultView to FALSE and left only A View as default.The other 'ghost' document libraries dissapeared.

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Using BPOS smtp relay in order to send mails using C#


string const string SMTPADDRESS= "stp.mail.emea.microsoftonline.com";

try
{
  MailMessage mail = new MailMessage();
  mail.from = new MailAddress("from@company.be");
  mail.To.Add("customer1@company.be");
  mail.To.Add("customer2@company.be");
  mail.Subject = "Mail sent using BPOS SMTP relay";
  mail.Body= "This mail has been sent using ssl";

  SmtpClient smtpServer = new SmtpClient(SMTPADDRESS)
  smtpServer.Port = 587;
  //TODO: put these configurations in config files.
  smtpServer.Credentials = new System.Net.NetworkCredentials("from@company.be","password");
  smtpServer.EnableSsl = true;
  smtpServer.Send(mail);
  return true;
}
catch(Exception ex)
{
  return ex.ToString();
}


http://msdn.microsoft.com/en-us/library … ssage.aspx
http://msdn.microsoft.com/en-us/library … lient.aspx

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

What do CC and BCC stand for?

I was chocked that I didn't knew the answer to this question immediately, offcourse we all know the result of putting someone in CC or BCC… :)

so here we go:

Cc
Cc is shorthand for Carbon copy . If you add a recipient's name to this box in an Outlook e-mail message, a copy of the message is sent to that recipient, and the recipient's name is visible to other recipients of the message.

Bcc
Bcc is shorthand for Blind carbon copy . If you add a recipient's name to this box in a mail message, a copy of the message is sent to that recipient, and the recipient's name is not visible to other recipients of the message. If the Bcc box isn't visible when you create a new message, you can add it.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Workflow activities Child Replicator activity in Parent Replicator not working

When binding a replicator from within another replicator, you will discover the following behaviour:

We have 2 replicators:
ParentReplicator & ChildReplicator

We have 4 roles:
role1,role2,role3 and role4

We have 5 users:
user1,user2,user3,user4 and user 5

each user is connected to a role in a dictionnary>

role1 has 2 users: user1 & user 2
role2 has 1 user: user 3
role3 has 1 user: user 4
role4 has 1 user: user 5

We want to iterate through each role and create a task for each user in this role.

through the designer we bind the initialchilddata property to List Roles property

using code we capture the ParentReplicator_ChildIntialized
event and execute this code:

The result is this:

Role 1
Role 2
– user 1
– user 3
Role 3
– user 2

SO it seems like the ChildData is only set the next iteration?…

The reason for this behaviour is because we are settings the InitialChildData on the wrong object, the object we are using is living in another context.

Use:


//use the control in this context
ReplicatorActivity rep = e.Activity.GetActivityByName(PanretReplicator.Name, true) as ReplicatorActivity;
rep.InitialChildData = users.Select(u => u.Sid).ToList();


here we go!

Conclusion: ALWAYS use the sender or e.Activity to get your childactivities to avoid these unhappy behaviour…

read more:
Pro WF: Windows Worklfow Foundation Pages
Very nice post that pushed me in the right direction

Good luck;)

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)