Hi All,
I would like to share a link which allows you to download the Tip of the Day webpart for sharepoint.
You can download the webpart here.
Configuring the webpart is clearly explained in the site.
Microsoft 365, SharePoint Online, Power BI, SharePoint On Premises, C#, .Net & Tips
<iframe width="560" height="315" src="http://www.youtube.com/embed/6986O9VA6LU" frameborder="0" allowfullscreen></iframe>
public static void GetDocumentCustomProperties(string filename) { OleDocumentPropertiesClass doc = new OleDocumentPropertiesClass(); doc.Open(filename, true, dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess); //Reading and writing the custom properties to a file StreamWriter sw1= new StreamWriter(@"D:\FileRead_Custom.txt"); CustomProperties obj_CustomProp = doc.CustomProperties; foreach (CustomProperty custom_prop in obj_CustomProp ) { sw1.WriteLine(custom_prop.Name " " custom_prop.get_Value()); } sw1.Close(); doc.Close(false); }
public static void GetDocumentSummaryProperties(string filename) { DSOFile.OleDocumentPropertiesClass doc = new DSOFile. OleDocumentPropertiesClass(); doc.Open(filename, false, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess ); //getting the properties of the document DSOFile.SummaryProperties summaryProp = doc.SummaryProperties; //reading and writng the summary properties to a file string author = summaryProp.Author; string comapanyName = summaryProp.Company; string managerName = summaryProp.Manager; StreamWriter sw = new StreamWriter(@"D:\FileRead.txt"); sw.WriteLine(author); sw.WriteLine(comapanyName); sw.WriteLine(managerName); sw.Close(); }
<script src="http://widgets.twimg.com/j/2/widget.js"> </script> <script> new TWTR.Widget({ version: 2, type: 'search', search: 'SharePoint', interval: 30000, title: 'What people are saying about', subject: 'SharePoint', width: 250, height: 300, theme: { shell: { background: '#8ec1da', color: '#ffffff' }, tweets: { background: '#ffffff', color: '#444444', links: '#1985b5' } }, features: { scrollbar: false, loop: true, live: true, hashtags: true, timestamp: true, avatars: true, toptweets: true, behavior: 'default' } }).render().start(); </script>
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl"> <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/> <xsl:template match="/"> <div> <xsl:apply-templates select="rss/channel"/> </div> </xsl:template> <xsl:template match="rss/channel"> <xsl:variable name="link" select="link"/> <xsl:variable name="description" select="description"/> <ul><xsl:apply-templates select="item"/></ul> </xsl:template> <xsl:template match="item"> <xsl:variable name="item_link" select="link"/> <xsl:variable name="item_title" select="description"/> <xsl:if test="position() < 6"> <li> <a href="{$item_link}" title="{$item_title}"><xsl:value-of select="title"/></a> </li> </xsl:if> </xsl:template> </xsl:stylesheet>
SPSite site = new site("http://siteurl"); using (site) { SPWeb web = site.OpenWeb(); using (web) { SPList lib1 = (SPDocumentLibrary)web.Lists["lib1"]; SPList lib2 = (SPDocumentLibrary)web.Lists["lib2"]; SPListItem item1 = lib1.Items[0]; byte[] fileBytes = item1.File.OpenBinary(); string destUrl = lib2.RootFolder.Url "/" item1.File.Name; SPFile destFile = lib2.RootFolder.Files.Add(destUrl, fileBytes, true); } }