.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Creating MS Word Document programatically in sharepoint foundation as Link Button on Master Page?

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :SharePoint


Can any body help me how to create a new document programatically for OnClick of  a LinkButton on my Homepage  as per the requirement.

I had installed MS OfficeWebApps on my Development Server which its working fine but the "Create Document " is on Top Ribbon for which the link should be on the right side of the Content Page of Home.Aspx as per the req.

Pls guide me how to achieve this.


Thanks in Advance !!!!




Thanks in Advance !!! Cheers !!! Praveen

View Complete Post

More Related Resource Links

replacing menu in a master page - Sharepoint Foundation 2010

I'm in the process of replacing a menu using Jquery and a sharepoint list.The menu data would be retrieved from webservice. But the problem i have is where to place my js menu script the master page. I tried disabling the asp: menu and the content place holders by setting visible to false and the place my div with the new menu just before the first content place holder. But i discover that any time i try and hover the menu.The hover kind of get blocked and it doesn't show. What do i need to take off and where should my js menu be place..

Changing the master page and Css of SharePoint Site programatically

Hi All,

I am trying to change the Site Collection's Master page and alternative css  programatically. Below is the code I am using:


SPWeb spWeb = SPContext.Current.Web;

spWeb.AllowUnsafeUpdates =


spWeb.CustomMasterUrl = spWeb.CustomMasterUrl.Replace(

"default", "NewMaster");

spWeb.MasterUrl = spWeb.MasterUrl.Replace(


steps for creating a custom master page in SharePoint 2010



Can any one please help me out to prepare a custom master page in SharePoint 2010 designer and deploy it to SharePoint site.

i have a html page , which i want to put in my custom master page.

please help


Sharepoint Checked Out Word Document Cross Reference Error on Page number Only



I see the same error as RHABALA reported in an earlier thread, after I check out my Word Document from Sharepoint into Word 2010. 

When I Control-click on any of my Cross References to Page Number, they fail with the warning prompt, they seem to be incorrectly pointing at the Sharepoint path. But when I Control-click an any Cross References to Paragraph Numbers,  they still work. I've added my Sharepoint Site to the trusted list in Internet Explorer, as recommended in that thread, but no difference, the error persists.

Grateful for your assistance.


Button click in master page use in other pages I have to click twice. Why?


In my masterpage I have a menu with buttons. I want the buttons to do something after click. It works but I have to click twice on the button, why? What do I have to do to just to click once?

Creating a custom column with a link to document (other than the name field) in document library



I have a document library with the standard name column linking to the document. However, we'd like to create a custom field and have that link to the document (and edit item menu).

How is this best accomplished?

Thanks in advance!


creating different sub page design template in sharepoint website


I know very little about sharepoint and have outsourced the design of a master page and sub page design for a new website using sharepoint. i received a site master file with all of the necessary images and the home page works just fine. However the file i received for the sub page design template was an ASPX file with the following instructions:


Here I enclosed the inner page layout file. You upload this file by using following instructions. you can change & edit the blue menu section in the master page itself. If I change into modifiable section you need to add the menu in each and every page, otherwise it will show as empty block. Please let me know your comments.


Steps for uploading inner page layout page.


1.Select the Site Actions button and click on Site Settings->Modify All site settings

Sharepoint 2007 - Wiki site - New Pages Not Inheriting Custom Master Page


I am working on a SP site (MOSS not WSS) which is heavily customised away from the OOTB layout. I need to create a Wiki site, which was going well - I've created a master page which displays the miniconsole (this was not visible with our customised layout), and made it the default master page for the site. This has been applied to the two standard pages that come with the Wiki site, however when a new page is created, it seems to inherit the default.master, rather than my custom master page - thus not showing the miniconsole.

When I have created a new page, I am able to use SharePoint Designer to attach my custom master page to it, which works perfectly, however this will not be a viable option going forward as end-users create their new wiki pages.

How can I get the new pages to inherit my master page when they are created?


Request.PathInfo losing Master Page content and CSS link


Hi All-


I'm using Request.PathInfo to response.redirect as user to a different page ( based on the content after .aspx ).  It redirect just fine however, once redirected, the page loses all content from the master page and the CSS link.  I've searched and can't find an answer. 

Does anyone have a solution for this?

Unable to create columns in document library after applying custom master page to site

Hi, I have applied a custom master page to a site.There is a document library in it. I am unable to add columns in it or change the default view.Nothing happens when I click on OK butoon after making my changes. However the columns are created/default view is changed when I apply the default master page. Guess I am missing some TagPrefix or sharepoint control on master page.I had solved this problem earlier in this way but don't remeber it now. Can anyone help?

how to embedd a word document into web page

Hi All, I want to show a new word file opened in a panel/div/frame on web page. Can anybody help me in doing that. I have tried with Iframe but when page loads completely it opens as open save dialog but I want it to be opened on web page. Please help. 

Converting Word Documents library to PDF document library in SharePoint Server 2007

My project requires me to create an event reciever such that when a word file is added to one library the same content pdf file should be added to other library also when a word file is updated,edited or checked in the respective pdf file in other document library should be replaced by a new pdf file with the edited word content . Can we do this in Sharepoint 2007 I have seen this can be done in Sharepoint 2010 http://msdn.microsoft.com/en-us/library/ff181518.aspx

need to link multiple detailsview to page from one master detailsview

I am trying to arrange the information from a SQL record into a 3 column by 3 row table to fit  the form presentation that I want. I have placed on the page 3X3 table and then tried to place a detailsview in the first cell for the first picture called P1dv. I have place a detailsview in the last cell that would control the paging of information called Controldv. I need to fiqure out how to link P1dv paging to Controldv page action. I am using visual web dev. 2005. I am not updating or editing these are read only views.  All help is greatly appreciated.  example of what i need the form output to look like:     picture1   picture2  picture3     name1     name2     name3     Contact1   contact2  contact3what i have coded as of now:asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ContactConnectionString %>" SelectCommand="SELECT * FROM [driveinfo] ORDER BY [Updated_on] DESC"></asp:SqlDataSource>    <table style="width: 827px; height: 339px"> <tr> <td align="

SharePoint 2010 Office Web Apps "Word Web App cannot open this document for viewing because of an un

<label id="message" class="WACStandardDialogLabel">I have provisioned a SharePoint 2010 Server (RTM: 14.0.4762.1000)  with Office Web Apps.</label> <label class="WACStandardDialogLabel">It is a single server with a separate SQl 2008 Standard server.</label> <label class="WACStandardDialogLabel">I have seen that there were some issues in site that were configured with a port.  The Web Application I am having issues with is running on a port  and is extended on 443 as well.</label> <label class="WACStandardDialogLabel">I can view PPTX but Word docx files can't be viewed.  The word docx files howerver can be edited in the browser.</label> <label class="WACStandardDialogLabel">I get the following error when I try to view a word file in the browser:</label> <label class="WACStandardDialogLabel"></label> "Word Web App cannot open this document for viewing because of an unexpected error. To view this document, open it in Microsoft Word. Error Id: 7f644fec-c2d7-4387-b280-31a4647afea1, 20100509213834 " I am seeing an error in the event log that identifies the Application Service account (that includes the Word Viewer Service) can't access the portal site collection database.  -I am using the appl

Delete Page Layouts and Master Pages in SharePoint 2010

Hi I want to delete unwanted Page layouts and master pages in share point 2010. I tried to delete the steps mentioned below as like MOSS 1.Create a New folder 2.Move the page layouts to that New folder 3.Delete the New folder But this approach also failed.. please suggest me to delete... Thanks in Advance ArunWith Love

show word document on aspx page.

Hi,I'm working on an asp.net web application in c#. I need to create a application in which I want to open a word doc in my aspx page. This task is accomplish by this Interop.Word.dll but this dll not working on sever.Is there any other solution.please reply

Uploading doc file into SharePoint Document library Programatically.

Hi all, I want to upload the doc file into SharePoint document library using the FileUpload control. For that I am created a new document library in my SharePoint site. But I am not getting the path of Document library where I want to upload the file. Waiting for your valuable response. Regards,-Kaustubh
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend