SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can create a calendar view in code, however I have as yet been unable to figure out how to change the "Default Scope" (this is the name that appears in the user interface when editing a calendar view). The options in the user interface are Day, Week, or Month - Month being the default. I'd like to be able to change the default to something else, Week for example, but I cannot figure out how to do it, other than using the user interface.

share|improve this question


calView = new SPCalendarView();
calView.ViewType = "week";
share|improve this answer
I've seen that, but as far as I can tell that only relates to adding a view to a web part? If I have access to the SPView object, how do I then use your code? – user259 Aug 17 '10 at 16:14

Try this link

share|improve this answer
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Stuart Pegg Aug 16 '12 at 15:08

You can't do it through API. By sending RPC call to owssvr.dll is the only other way other than UI. For complete solution, visit this link -

share|improve this answer
While this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. See answer for general guidelines. Also we require disclosure of any affiliation with products or websites. Please see May I promote products or websites I am affiliated with here? for guidelines. – SPDoctor Apr 25 '13 at 8:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.