Friday, January 14, 2011

Windows Azure Jump Start video series

The Windows Azure Jump Start video series is for all architects and developers interested in designing, developing and delivering cloud-based applications leveraging the Windows Azure Platform. The overall target of this course is to help development teams make the right decisions with regard to cloud technology, the Azure environment and application lifecycle, Storage options, Diagnostics, Security and Scalability. The course is based on the Windows Azure Platform Training Course and taught by Microsoft Press authors, Manu Cohen-Yashur and David S. Platt.

Session 01: Windows Azure Overview
Session 02: Introduction to Compute
Session 03: Windows Azure Lifecycle, Part 1
Session 04: Windows Azure Lifecycle, Part 2
Session 05: Windows Azure Storage, Part 1
Session 06: Windows Azure Storage, Part 2
Session 07: Introduction to SQL Azure
Session 08: Windows Azure Diagnostics
Session 09: Windows Azure Security, Part 1
Session 10: Windows Azure Security, Part 2
Session 11: Scalability, Caching & Elasticity, Part 1
Session 12: Scalability, Caching & Elasticity, Part 2, and Q&A

Thursday, January 13, 2011

Word Automation Services–Power Point download

Code : http://cid-d1e9ef060fcd5fa2.office.live.com/self.aspx/Public/WordToPDFCoversion.zip

Word Automation Service–FAQ–SharePoint UG

1.) Word Automation service can convert Password protected file ? image

The answer is NO.

2.) Document that contain Review with comments can covert as PDF?

image

The  answer is YES….

Here is the output file

image

SharePoint 2010 : Convert Document to PDF using Word Automation Service

Jan 13th 2011 at SharePointPro.SG (SharePoint User Group) i presented Word Automation Services the step by step walk though give below.

Objective : This session you will lean creating custom solution to convert Word documents to PDF using document library list item event receiver to call Word Automation Services to convert Word documents to PDF when they are added to the list. The event receiver checks whether the list item added is a Word document. If so, it creates a conversion job to create a PDF version of the Word document and pushes the conversion job to the Word Automation Services conversion job queue.

image

Select as as farm solution. (Word Service API’s dose not work with Sandboxed solutions)

image

Select List Definition as a Document Library and click Finish.

Ensue that you BaseType =1 and Type = 10000

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListTemplate
Name="ListDefinition1"
Type="10000"
BaseType="1"
OnQuickLaunch="TRUE"
SecurityBits="11"
Sequence="110"
DisplayName="WToXPS - ListDefinition1"
Description="My List Definition"
Image="/_layouts/images/itdl.png"
DocumentTemplate="121"/>
</Elements>



Right Click project and Add new item Select Event Receiver


image


Event Source  - Select an item was added and click finish.


image


Add project reference and click browse go to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI path and select Microsoft.Word.Server.dll file as reference and click OK.


image


Add following using statement on .CS file

using Microsoft.Office.Word.Server.Conversions;

Click Ctrl-K and Ctrl-S and select if statement


image


Insert following code :

if (properties.ListItem.Name.Contains(".docx") || properties.ListItem.Name.Contains(".doc")) 
{
ConversionJob jobConversion;
ConversionJobSettings jobSettings;
string wordDoc;
string pdfDoc;

jobSettings = new ConversionJobSettings();
jobSettings.OutputFormat = SaveFormat.PDF;

jobConversion = new ConversionJob("Word Automation Services", jobSettings);
jobConversion.UserToken = properties.Web.CurrentUser.UserToken;

wordDoc = properties.WebUrl + "/" + properties.ListItem.Url;

if (properties.ListItem.Name.Contains(".docx"))
{
pdfDoc = wordDoc.Replace(".docx", ".pdf");
}
else
{
pdfDoc = wordDoc.Replace(".doc", ".pdf");
}

jobConversion.AddFile(wordDoc, pdfDoc);
jobConversion.Start();
}

Now i converted the document to PDF i want discard the original document. Use ConversionJobStatus to monitor the ConversonJob process and once the process completed delete the document

 ConversionJobStatus status = new ConversionJobStatus("Word Automation Services",
jobConversion.JobId, null);

while (true)
{
Thread.Sleep(5000);
status = new ConversionJobStatus("Word Automation Services", jobConversion.JobId,
null);

if (status.Count == status.Succeeded + status.Failed)
{
properties.ListItem.Delete();
}
}



Right click Build and deploy your project


Upload files to Document Library


image


The code run  and generated PDF and Deleted the word document.


image


Download the full solution here at  http://cid-d1e9ef060fcd5fa2.office.live.com/self.aspx/Public/WordToPDFCoversion.zip

Sunday, January 9, 2011

SharePoint UG Meeting – 13 Jan 2011

 

Date                      : 13 January 2011

Time                      : 06:30PM – 09:00PM

Location               : Microsoft Singapore Level 22.  One Marina Boulevard

** Refreshments will be provided.  Courtesy of Microsoft DPE Singapore

Please RSVP to confirm your registration and attendance by 12 Jan 2011.  No email response will be sent for your registration.

Session Agenda

Automated Installation of SharePoint 2010 using PowerShell
Chyan Yee Goh, Consultant at Microsoft Consulting
In this session, we will start with some PowerShell basics in SharePoint 2010. After that we will cover the reasons behind the usage of PowerShell and we will go into the challenges and scenarios when installing SharePoint 2010 using PowerShell scripting.

Word Automation Service
K.Mohamed Faizal, Lead Consultant at NCS
This session you will lean creating custom solution to convert Word documents to PDF using document library list item event receiver to call Word Automation Services to convert Word documents to PDF when they are added to the list. The event receiver checks whether the list item added is a Word document. If so, it creates a conversion job to create a PDF version of the Word document and pushes the conversion job to the Word Automation Services conversion job queue.

About Faizal:
Faizal has over a decade of experience in Information Technology with a focus on enabling portals, Internet and Intranet. His area of specialization include but are not limited to evaluate and develop migration strategies for Lotus Notes application to SharePoint/.NET based solution, design content management, web-based self-service and collaboration solutions

Tuesday, January 4, 2011

Windows Azure Webinars - Free

Free Webinars for Windows Azure which going to cover the benefits, implications of -and best practices for - adopting Windows Azure – Don’t Miss it. 

The Business Case for Azure (Part 1) - January 12, 2011

  • The objective of this session is to provide an understanding of why Software as a Service is a compelling business model for today's ISVs and how Windows Azure can be a key enabler for ISVs considering a move to the cloud.

Understanding Implications of the Cloud (Part 2) -January 19, 2011

  • The focus of this session will be on the implications for adopting cloud computing as a core pillar of a go to market strategy. This webinar will provide an understanding of what ISVs face relative to change management challenges and implications for their current business models.

      Easing (Leaping) Into the Cloud (Part 3) -January 29, 2011

      • The objective of this third and final session will be to introduce a decision-making framework - based on real world experience – for rationally adopting Windows Azure as a core element of an application architecture.