Skip to main content

Posts

Navigating to Bookmarks on Word document Uploaded to SharePoint online

 Requirement: Word document with bookmarks uploaded to SharePoint online and creating URLs for every bookmark to use them as links on SharePoint page.  Upload and open the word document on the site.  Select Navigation on the ribbon On the left Navigation pane hover over the bookmark and select the link icon Paste the link in a note pad. You can see the random extension got generated for the bookmark.  You can use this URL as a link on sharepoint page where it will directly point to the bookmark location. 
Recent posts

Change "Created By' field in SharePoint Library

I got an requirement to change the created by to different user after a user left the firm.  I tried an approach with Powershell but I found it easy to update in content database.  Change the "Created by" field through the SQL content database(Tables dbo.alldocs and dbo.alluserdata). In dbo.alluserdata change tp_author to the new sharepoint ID, and any of the nvarchar names referencing the old account name. In dbo.alluserdata and dbo.alldocs change just tp_draftownerid.  Through PowerShell and credit goes  here   # Get the SharePoint Assembly # You will need to run this on the SharePoint Server [Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") # The site my list was in was at  http://dev # create a new object called $SPSite $SPSite = New-Object Microsoft.SharePoint.SPSite(" http://dev/") # Make sure you have the last “/” in the url on the site # allow $SPWeb to be the OpenWeb from the si

Sign in as different User - SharePoint 2013 and higher

Usually when you have 2 user accounts (regular and admin) in your organization and infrastructure will give only access to your admin account and when you try to open a sharepoint 2013 site it says access denied by default coz you logged in with your regular account by default and SharePoint 2013 dont give option to "sign in as different user" by default. You can use _layouts/closeConnection.aspx?loginasanotheruser=true this extension to get the sign-in pop up window. Hope this helps

Run workflow on existing items - SharePoint 2013 or higher

I had to create a workflow on a existing list which has already around 250 items. I need to run the workflow on existing items which don't change.  1. I can use retention , but I dont have CA access to either enable or check the timer jobs related to it.  2. Custom timer job or solution (As this is one time thing I didnt wanted to exhaust my energy) Solution (Which i thought is useful for me)  Change the workflow initiation to "Run when the item is changed" create a column with number type open the lint in "quickview"  add "some number" in all the items in the new column Click "Stop" on the top of the list.  It will run the workflow on all items one time as you made the change on every item by adding a field value.  Hope this helps someone in need without any extra effort. 

Hide custom header and footer in windows for sharepoint 2010/13

Hi All, I gone through this and wanted to share. I had a master page with custom header and footer and everytime when I try to "add item" or "add document" to either list or document library, it shows the header and footer and it was so annaoying and after doing some research I found a piece of class from sharpoint need to be added to avoid them. In master page, where you add the header or footer you need to close the div with class="ms-dialogHidden noindex" , it will hide from the windows.

sharepoint 2010 list hyperlink column open in new window

Sharepoint designer solution: http://blog.sharedove.com/adisjugo/index.php/2011/06/26/setting-a-link-target-in-the-sharepoint-2010-data-view-web-part/ Lot of other possibilities: http://www.sharepointdiary.com/2011/02/sharepoint-link-list-open-in-new-window_21.html#ixzz2aWtiNarl I liked the java script one very much, might be bit tedious but works like a charm. You can Make Selected Links in a Links List Open in a New Window with Little JavaScript and content editor web part. Here is how: when creating links in the Links List, add   #openinnewwindow   on the end of each link that you would like to open in a new window. Add the content editor webpart, and place the following code in it: <script language= "JavaScript" > _spBodyOnLoadFunctionNames.push( "PrepareLinks" );   function PrepareLinks() {    //create an array to store all the anchor elements in the page     var anchors = document.getElementsByTagName( "a" );