ODFB & “Office Home & Business 2016” Issue!

I’ve been working with a client on an issue they had. A user had upgraded his Office suite to Office Home & Business 2016, after the upgrade, something with OneDrive For Business didn’t seem right. Documents stopped syncing, and stuff weren’t working as expected.

When checking OneDrive For Business, it was gone off the computer, so by following this KB article, you need to download OneDrive for business again and do the installation. You do this by following the points in the article, and having the .txt file in place for installation. Everything would seem to work fine, but you may encounter that it would stay for too long with no result. What you might want to do is change the .txt file, so replace the attribute Level=”None” to Level=”Full”. This way, if the command encounters any issue, it would really show that exact error or warnings.

For me what happened, is it shown incompatibility with what I was trying to install, and the system type. The default value in the .txt file for system type is “32” as shown in the “OfficeClientEdition” attribute, whereas the user was using 64-bit system. So change this value to “64” and you should be good to go.

 

Hide Upload Button + CSS Tip!

At times, you want to hide something that’s rendered by default in SharePoint, for example some of the ribbon’s controls rendered right away with the page. I’ve seen some people going with the way of hiding the whole “New” group in a document library in order to prevent user from using the upload or new folder options.

For the new folder, everyone knows it can be easily disabled from the library’s settings, but for the Upload button in the ribbon, you can use pure CSS to do so, but you will need to find the right selector, and use it right. We all know how to use developer tools to pick the right css classes, so as can be seen below:

UploadDoc

So you might be tempted to do something like this:

And.. that won’t work, you might be tempted as well to add !important to the end to force it to apply, but again.. it won’t work. It’s because CSS considers the dot character as part of the css itself to identify a class, and it won’t understand it’s part of the ID. In this case, you need to use escaping characters in CSS which is the backslash!

So your code should look like this:

Now you should end up with something similar to this:

Upload3

Hope this will quickly help someone out there!

External Sharing Report In SharePoint Online

Hello readers! This is a short blog post to share with you a PowerShell script that would be helpful for Office 365 admins in order to know who shared content in SharePoint Online. This script will create a .csv file with a list for each site collection that has content shared outside of the organization, as well as the name of the person with access to your environment, his email, the date when he accessed your environment the first time as well as who invited him to your environment.

Here’s a link to the script on codeplex. Hope this helps someone out there when he’s asked to do a such a report!

Root Site Collection Features Missing in SharePoint Online

When working with SharePoint online, you may think that the features and the way SharePoint is administered is similar to the way it’s administered on-premises, but there are some cases that may be tricky. One of these cases is once you create get your SharePoint online site up and running, you open the root site collection at the Url: http://DomainName.sharepoint.com and you do some work, then you’d like to save your team site as a template.. but the option is not there.

You may even face this problem when trying to:

  • Change themes.
  • Add content editor web part,
  • Deploy Sandbox solutions
  • Use SharePoint designer to style that site collection!

These are some major functionalities that you would want to use in your Office 365, but you can’t, and then you’ll start being frustrated about how SharePoint Online is limiting you from doing the work you’re supposed to do and you’ll start to embrace the on-premises way again!

But, it’s not a problem with Office 365, it’s actually a security feature in Office 365 for custom scripts, which means that it helps the global administrator for Office 365 to secure his sites from scripts being used here and there.

The scripting functionality is disabled in the root site collection by default, that’s why when you create another site collection under a managed path, scripting will be enabled and you’ll be able to use SharePoint Designer and other functionalities with no differences from the on-premises part, while the scripting is disabled, you’ll get this message when opening SharePoint Designer for the root site collection:

5-12-01

Then..

5-12-03

To enable scripting in Office 365, you should go to SharePoint administration center > Settings > Custom Script, as shown below:

5-12-02

 

To enable scripting for the root site collection, you should enable it for self-service created sites.

Hope this helps someone out there!

Basic operations in SharePoint with Excel

 

End users are the core foundation of SharePoint usage, SharePoint was made to serve end users, developers do custom solutions to serve end users, and admins make sure the environment is working fine so end users can do their work easily. One of the features that SharePoint provides out of the box, is the ability for end users to use the tools they already know, and integrate it with SharePoint, and one of these tools is Excel. 

 

This blog post is targeted towards end users who are new to SharePoint and wondering how they can use Excel within SharePoint, so let's see some super easy steps on what you can do with SharePoint. 

 

Let's say you are working on an Excel document locally on your computer, for me for example, let's say am working on a document listing partners for my company, my Excel workbook looks like this: 

 

1 Title 
2 Fictional Company 1 
3 Fictional Company 2 
Address 
MTL 
MTL 
Number of Projects

 

 

Now I would like to have this in SharePoint as a list, so I can share it with others. When you want to import an Excel sheet do SharePoint, SharePoint will not import the whole document, it will ask you for a specific range that you may want to upload to it. For example, If you have an Excel workbook with columns A through J, you might want to upload the columns A to F only, so you don't have to create a new Excel sheet just for these columns. There are multiple ways to do so, but the easiest way is, to highlight the area that you want to upload to SharePoint 

 

Fictional Company 1 
Fictional Company 2 
Address 
MTL 
MTL 
Number of Projects 
2

 

 

And then click Formulas from the ribbon, and choose Define Name: 

 

Formulas 
Text Date & 
Time • 
Library 
-itle 
Data 
Lookup & 
Reference • 
Review 
Math & 
View 
More 
Power Pivot Tell me what you want to do 
—x @ Define Na me 
Use in Formu 
Na me 
Trace P re 
Trace Del 
Trig • Functions • 
Manager Create from Selection Remove 
Defined Names

 

 

Add a descriptive name: 

 

C:\Users\owner\AppData\Local\Temp\msohtmlclip1\02\clip_image004.png

 

 

And Save your document, and make sure to close it. 

 

What did we just do? We have our Excel sheet as it is, we just gave a name to the selected area that you want to upload to SharePoint, that's it, nothing major.

 

Now to upload your document to SharePoint, you have to forget about all other browsers, and use Internet Explorer, because the upload to SharePoint functionality requires a browser that supports ActiveX control, so you will have an error like this if you try to use Edge or Chrome: 

 

technifier.sharepoint.com says: 
This feature requires a browser that supports ActiveX controls.

 

 

So open Internet Explorer, and select the gear icon, then choose Add an app: 

 

Change theme 
Office 365 settings 
Add an app 
Site conte 
Change the look 
Site settings

In the search box, you can type: Excel, then you'll see "Import Spreadsheet" app, click it and give it a name, in my case I'll just name it: Our Partners, give it a description if you want, and click browse, then choose your document, and hit import. If you get an error that looks like this: 

 

Message from webpage 
The specfied file is not a valid spreadsheet or contains no data to 
import.

Then you need to add the current SharePoint site to the list of trusted sites in Internet Explorer, to do so, click on the gear icon in Internet Explorer on the far top right corner: 

 

Machine generated alternative text:
Print 
Zoom (100%) 
Saf ety 
Add site to Apps 
View downloads 
Manage add-ons 
F12 Developer Tools 
Go to pinned sites 
Compatibility View settings 
About Internet Explorer 
Ctrl+J

 

 

And choose Internet Options, Open Security tab, and click Trusted Sites, then click Sites button: 

 

 

Machine generated alternative text:
Genere!o Security Privacy Content Connections Programs 
Select a zone to Vien or change security settings. 
Internet Local Intranet Restricted 
sites 
T rusted sites 
This zone contains vvebsites that pu 
trust not to damage your computer or 
Advanced

 

 

 

Make sure to add the current SharePoint site URL, and click Add, then Close. Then try to import the document again. If it gave you the same error, then try restarting Internet Explorer, and repeat the steps before to Import from Excel sheet. 

 

Now, once you click on Import, your Excel document will open and you'll see a popup that looks like this: 

 

Import to Windows SharePoint Services list 
Range Iype : 
Table Range 
Range of Cells 
Table Ran e 
Named Ranae

 

 

Choose Named Range, and choose the Name you specified earlier, and hit Import. Wait for the SharePoint magic to take place, and you'll see your Excel sheet uploaded to SharePoint:

 

Our Partners 
@ new item or edit this list 
All Items 
Title 
Find an item 
p 
Address Number of Projects 
Fictional Company 1 
Fictional Company 2

 

 

If you check the columns for this list, you'll see that SharePoint is smart enough to infer the types of columns, and it will create a Number column for our "Number of Projects" column: 

 

Columns 
A column stores information about each item in the list The following columns are currently available in this list 
Column (click to edit) 
Title 
Address 
Number of Projects 
Modified 
Created 
Created By 
Modified By 
Type 
Single line of text 
Single line of text 
Number 
Date and Time 
Date and Time 
Person or Group 
Person or Group

 

 

 

 

You successfully uploaded a Range in your Excel workbook to SharePoint and created a list out of it! That's all good, and it's all basic stuff. Now let's try it backwards! Let's say you have a SharePoint list, that's called Our Partners, and you want to be able to view it in Excel locally, without opening the site. What can you do in this case? Remember that the Import process is just one time push from Excel to SharePoint, and it won't make any kind of connection between the document on your computer and the list. 

 

Click on the List tab, and choose "Export to Excel"

 

Ccnnect to Export t 
Outlook Excel 
Open with Access 
Open with Project 
& Export 
Form Web Parts 
Edit List 
Customize in 
New Quick Step 
Customize List

 

 

 this will open a dialog asking you to either save it or open it, note this will not save or open an Excel file, it will open/save a .iqy file, which is a Web Query file, it will not contain any data, but it will hold a connection reference to your SharePoint list. You can choose to open it, and it will open in Excel, and Excel will ask you if you trust this source, for sure we trust it because it's coming from SharePoint, so click on Enable: 

 

Microsoft Excel Security Notice 
Microsoft Office has identified a potential security concern. 
File Path: 
Data connections have been blocked. If you choose to enable data 
connections, your computer may no longer be secure. Do not enable 
this content unless you trust the source of this file. 
Enable 
Disable

 

 

Now you'll see the data coming in Excel and it looks like this: 

 

Title 
2 Fictional Company 1 
3 Fictional Company 2 
Address Number of Projects Item Type Path 
MTL 
MTL 
5 Item 
2 Item 
sites/HaitiSchoolproject/Lists/Our Partners 
sites/HaitiSchoolproject/Lists/Our Partners

 

 

REMINDER: This is a .iqy file, it doesn't hold the actual data, it just gets the data from SharePoint and shows it to you, if you're offline, it will not be able to display your data. So what to do? We can save it as an Excel sheet now, click Control + S and save it somewhere on your computer. 

 

Now we have our Excel sheet with the data locally, so we don't have to be connected to the internet to see the data .. But .. How can we get the latest data from SharePoint? Suppose that I am collaborating with other people, and they add data to this list, and I have this Excel file on my computer and am too lazy to open the browser and check the updates, I can click on the "Data" tab, and hit Refresh: 

 

Page Layout 
her Existing 
Formulas 
Review 
Show Queries 
From Table 
View Power Pivot 
Connections A 
Properties 
Query • Recent Sources 
Connections 
Refresh 
Edit Links 
All 
Connections 
Get & Transform 
Title 
dress Number of Projects Item Type Path 
5 Item 
2 Item 
sites/HaitiSchoolproj 
sites/HaitiSchoolproj

 

 

But.. Yes, another but.. What if I am too lazy to keep clicking Refresh to refresh my data? I can click on Connections - Just beside the Refresh button, and choose Properties: 

 

 

Review 
View 
Power Pivot 
Connections Al 
Design Tell me what you want to do 
Show Queries 
From Table 
Recent Sources 
Transform 
Properties 
Refresh 
Edit Links 
All 
Connections 
Clear 
Reapply 
Sort 
Filter 
Text to 
Flash Remove Data Consolidate Relationships Manage 
Advanced Columns 
Fill Duplicates Validation • 
Data Tools 
Data Model 
Add. 
Remove 
pr erties... 
Refresh 
Manage Sets... 
Close 
What-I f 
Analysis 
Sort & Filter 
acts Item Type Path 
5 Item 
2 Item 
sites/HaitiSchoolproject/Lists/Our Partners 
sites/HaitiSchoolproject/Lists/Our Partners 
Workbook Connections 
Name 
Description 
Last Refreshed 
Locations where connections are used in this workbook 
Click here to see where the selected connections are used

 

 

Then I can choose: Enable background refresh, and specify that I want to refresh data when the file is opened: 

 

Usage Definition 
Refresh control — 
Last Refreshed: 
Z] Enable background refresh 
Refresh every 60 
IV minutes 
Z] Refresh data when opening the file 
Remove data from the external data range before saving the workbook 
Z] Refresh this connection on Refresh All

 

Click OK and close the Excel sheet. Let's try it out, add a new entry in the SharePoint list: 

 

 

Address 
Fictional Company 3 
Fictional Address 
Number of Projects 51

 

 

Then open your document again, it might ask you to Enable External Connections if it's the first time you open it after the previous configuration, so click Enable Content: 

 

SECURITY WARNING External Data Connections have been disabled 
Enable Content

 

 

Then the records added in SharePoint will appear in this document: 

 

 

Title 
Address 
Number of Projects Item Type Path 
2 
4 
Fictional Company 1 MTL 
Fictional Company 2 MTL 
Fictional Company 3 Fictional Address 
5 Item 
2 Item 
5 Item 
sites/HaitiSchoolproject/Lists/Our Partners 
sites/HaitiSchoolproject/Lists/Our Partners 
sites/HaitiSchoolproject/Lists/Our Partners

 

 

 

Now we don't need to see the last 2 columns, am going to highlight them and right-click then click Hide

 

 

 

Number of Projects Item TYE . 
5 Item 
2 Item 
5 tem 
Cut 
Copy 
Paste Options: 
Paste Special... 
Insert 
Delete 
Clear Contents 
Format Cells... 
Column Width... 
Unhide 
ject/Lists/Our Partners 
oject/Lists/Our Partners 
ject/Lists/Our Partners

 

 

 

Then save your document. That's it, now every time you open this Excel document, it will auto refresh from SharePoint and show you only the data that you need. 

 

We learned in this post, how to get data from Excel into SharePoint as a list, how to give an Excel sheet a Named Range. We learned that Importing Data from Excel will require Internet Explorer as the importing process will require a browser that supports ActiveX controls. We learned how to pull data from SharePoint as a Web Query file (.iqy), which is a file that just connects to SharePoint and doesn't hold any real data, and if you want to save the data, you can save this file as an Excel Document (.xlsx), and we learned how to get the latest data from SharePoint without having to manually asking for it. 

 

HTML6 .. Already?

There have been a lot of buzz on the internet about the release of HTML6,  and seems like it’s going to replace a lot of stuff we used to do with JavaScript (if it’s approved) .. more than HTML5 could do.

The idea is to have <FIXTURES> tag in the Head tag of the HTML page, this Fixtures tag is a repository of code, each code block is called a model, and this model can either be static or it can be retrieved dynamically from SQL. These fixtures are then referenced in the body tag. So in the body tag of your HTML page you can reference chunks of HTML content that was declared previously in the Head tag, which can be static or dynamic, without needing JavaScript. This seems to be the replacement of the Single Page Application model (SPA) that’s currently implemented using some JavaScript frameworks such as Angular. So each part that will be changed will be inside a model in the Fixtures tag.

To read the proposal for the HTML6, have a look here:  https://lists.w3.org/Archives/Public/public-whatwg-archive/2015Mar/0071.html

Client Side Rendering in Forms In Depth

 

SharePoint gives new capabilities that developers can use to do same tasks required in previous versions of SharePoint using client side technologies. The main capability introduced in SharePoint 2013 is CSR (Client Side Rendering). The most common used method for CSR way is to manipulate users data for fields or list views.. But what about forms?

Someone is going to say: “Yes, SharePoint provides JS Link property for list forms as well, so what’s new with it?” Well, there’s more into it. Let’s see what can be done in list forms and to what extent we have the flexibility to do the forms we want.

Here we have a list called Customers, with a new form that looks like this:

 

csr1

Now, we want to make this look different, so we’ll be using JS Link for that. If you edit the newform page, and edit the web part:

csr2

Then go to Miscellaneous, you will find three important properties there:

  1. Form Template Name
  2. JS Link
  3. CSR Render Mode

 

csr3

 

We know that with JS Link we will be able to add a JS file and manipulate our form’s design. We also know that CSR Render Mode being set to standard it tells SharePoint to renders the form using CSR, and setting it to Server Render will make it depend on XSLT for that. But what about Form Template Name and its ListForm value?

If you had experience with SharePoint customization from previous versions specially for forms, you know that SharePoint uses technique called: Rendering Templates. Which is a group of predefined templates SharePoint has and uses them to render its pages and forms. If you have an on premises environment, you can go to this path: SharePoint Hive\TEMPLATE\CONTROLTEMPLATES, you will find a file called: DefaultTemplates.ascx:

csr4

 

If you open that file, you will find many controls with the tag: <SharePoint:RenderingTemplate.. . If you search for ListForm, you will find that it’s actually a rendering template that SharePoint uses to render its forms. But the good thing to know is, you can use another value which is CSRListForm. But what’s the difference?

The difference is that ListForm renders everything for you from SharePoint, like the layout for the form, the label names and so on, so if you need to use JS Link to style your list forms while you are using ListForm rendering template, you would need to use jQuery to restructure your HTML. So what if we use CSRListForm instead? Your list form would look like the following:

csr5

It will only render the fields for you, no labels, no buttons, no spaces between fields, nothing.. just fields. So you will have a clean output that you can play with in JS Link as much as you like! That’s neat!

Now let’s add a JS Link property to a .js file and try to style our form, there’s a file that my friend Muawiyah Shannak created and posted on MSDN, you can download the JS Link file here: https://code.msdn.microsoft.com/office/CSR-code-samples-11-Fully-54ebcaa6

Here we are declaring the objects necessary to form our view:

 

Inside the viewTemplate function we have the following code:

 

As can be seen, we’re constructing the HTML for our form, for this article and on MSDN, we made it static just for learning and explanation purpose. You can do whatever technique you prefer to form the HTML.

Three things to note about this code:

  1. Note how we have {{placeholders}} for each field we want to add in our HTML.
  2. Note also the getSPFieldRender function, I’ll explain that later on.
  3. The input button has an onclick function = SPClientForms.ClientFormManager.SubmitClientForm(‘{{FormId}}’) . This will allow us to use the out of the box capabilities to leverage the submit action and handling validations in the form.

Back to getSPFieldRender, this will go look into the form for each field by its internal name, and will get this field’s HTML, which will be replaced instead of the place holders such as {{TitleCtrl}}. This happens by using the CurrentFieldSchema and drilling down to the Field’s HTML from the ctx.Templates.Fields, As shown below:

 

Now, when apply this JS Link to our list form, SharePoint will render the fields, and place them instead of our placeholders, it would look like below:

csr6

Without using any jQuery hacks, you can now apply your designs to your list forms with the use of CSRListForms.

Hope that gave more understanding to List Forms and CSR.

Focused Inbox and Office 365 Emails

Microsoft introduced a feature called Clutter, that will route emails that don't seem important to the user to another folder called Other. This was a good approach to help users focus on emails that would be important to them, and they can check the Other folder later on, however, users needed to visit another folder in order to see emails. That's why Microsoft introduced Focused/Other filters.

 

Now in Office 365, emails will have 2 filter tabs, Focused and Other. Important emails are going to appear in the Focused tab, and other emails will appear the other tab clearly. Now a lot of questions might come up when using these features, so let's review some of them: 

 

  • How can a user control what emails appear in other and what emails appear in focused tab? 

There are algorithms that teach the application what emails are good enough to appear in the Focused tab, so once a user moves an email from the Other tab to the Focused tab, Outlook will know that this email source is important for the user, and it'll make sure to make upcoming emails from this source appear in the Focused tab.

 

  • Can a user disable this whole functionality in his Outlook application?

Yes, you can do so by selecting the filter dropdown beside the tabs, and unchecking the option to "Show Focused Inbox", as shown in the image below: 

Focused Other 
Filter 
Next: No events for the ne 
V All 
Filter 
no-reply@sharepoi 
Raed Ibrahim mentioned y 
Raed Ibrahim: Hey @Moha 
Last week 
Microsoft 
Changes coming to Power 
Find the version that's best f 
Microsoft Online Se 
Unread 
To me 
Flagged 
Mentions 
Sort by 
Show as 
V Show Focused Inbox 
View your Office 365 Ente

 

 

Now let's have a look at this scenario, let's say you're working on a project inside SharePoint online, and one of your colleagues mentions you in the newsfeed inside that project portal, like the following image: 

 

Newsfeed (9) 
Raed Ibrahim 
Hello @Mohamed D«halli I am excited to start on this project What's the plan? 
A few seconds ago Like Reply

 

You're going to receive an email from: no-reply@sharepointonline.com,  But .. That email is going to appear only under the Other tab, and here's the catch, you won't receive notifications for emails that appear under the Other tab. By notifications I mean, you won't get notified when you're working in Office 365 that you received a new email: 

 

Undo 
? Mohamed Dernalli 
Notifications 
Nothing new right now

 

Remember that the newsfeed web part only sends emails when you're mentioned. 

 

So how do you solve this? You can't just ask each employee to disable the Focused functionality. You have 2 options in this case, either tell Exchange Online to route all emails from no-reply@sharepointonline.com to the Focused tab, or you can just disable the Focused inbox functionality on the tenancy level. Here's how we can do that: 

 

 

Go to your Office 365 Exchange admin center, and from the left navigation, click "mail flow". Click the + sign to add a new rule: 

 

permissions 
compliance management 
organization 
protection 
mail flow 
mobile 
public folders 
unified messaging 
Create a new rule... 
Apply rights protection to messages... 
ere are no Iti 
Apply disclaimers... 
Bypass spam filtering... 
Filter messages by size.. 
Generate an incident report when sensitive information is detected... 
Modify messages... 
Restrict managers and their direct reports... 
Restrict messages by sender or recipient... 
Send messages to a moderator... 
Send messages and save a copy for review...

 

 

A new window will appear, that looks like this: 

 

new rule 
Name: 
*Apply this rule if... 
Select one 
*Do the following„. 
Select one 
Properties of this rule: 
Audit this rule with severity level: 
Not specified 
Choose a mode for this rule: 
@ Enforce 
O 
Test with Policy Tips 
O 
Test without Policy Tips 
More options... 
Riahts Manaaement Services (RMS) is a premium feature that requires an Enterorise Client Access License (CAL) or a RMS 
Save 
Cancel

 

 

 

 

Give the rule a name, let's say: "Other to Focused Emails Routing", then choose "The recipient address includes…" and click "Enter words…" and add the address you want to appear under Focused tab for all users, in this case no-reply@sharepointonline.com, then click the + sign and hit OK. 

 

 

specify words or phrases 
Cancel

 

 

 

Then go all the way down and click "More options…":  

 

new rule 
Name: 
*Apply this rule if... 
Select one 
*Do the following„. 
Select one 
Properties of this rule: 
Audit this rule with severity level: 
Not specified 
Choose a mode for this rule: 
@ Enforce 
O 
Test with Policy Tips 
O 
Test without Policy Tips 
More options... 
Riahts Manaaement Services (RMS) is a premium feature that requires an Enterorise Client Access License (CAL) or a RMS 
Save 
Cancel

 

 

In the "Do the following…" dropdown list, choose: Modify the message properties > set  a message header

 

the following„. 
Select one 
Select one 
Forward the message for approval.„ 
Redirect the message to.„ 
Block the message„. 
Add recipients„. 
Apply a disclaimer to the message... 
Modify the message properties.„ 
Modify the message security„. 
Prepend the subject of the message with.„ 
Notify the sender with a Policy Tip... 
Generate incident report and send it to„. 
Notify the recipient with a message.. 
remove a message header 
set a message header 
apply a message classification 
set the spam confidence level (SCL)

 

 

 

Set the header to: X-MS-Exchange-Organization-BypassFocusedInbox  and the value to true. So the final result should be: 

 

new rule 
Name: 
Other to Focused Emails Routing 
*Apply this rule if... 
The recipient address includes„. 
add condition 
*Do the following„. 
Set the message header to this value.. 
add action 
Except if... 
add exception 
Properties of this rule: 
Audit this rule with severity level: 
Not specified 
A for this 
Set the message header 'X-MS-Exchange-Organization- 
BypassFocusedInbOx' to the value •Enter text 
Save 
Cancel

 

 

Click save, and that's it. You can wait for a couple of minutes, and then test it. Upcoming emails will be delivered to the Focused tab, and you will receive notifications.

 

 

 

The other option would be to disable the Focused inbox functionality for all users in the tenancy, which leaves you with PowerShell. Once you connect to Exchange Online using PowerShell, you can run the following 2 commands: 

 

Get-OrganizationConfig

Set-OrganizationConfig -FocusedInboxOn $false

 

 

I prefer doing the first approach, and just routing the important emails to users' Focused tab, and give them the freedom to have it if they need. 

 

 

 

 

 

 

 

Customizing Visual Studio Code

Many developers are using Visual Studio Code recently, especially open source developers who are enjoying its features, but some people don’t like the font (Monaco) that comes by default with Visual Studio Code, or maybe they want to use bash commands in terminal. The good thing is, you can customize Visual Studio easily, because Visual Studio Code was built in JavaScript, so in order to customize it, you can modify a JSON file that comes with it. You can open the settings file by going to File > Preferences > Settings, or by clicking Control + , 

 

 

It’ll open a JSON file where you can customize many things, let’s say that we want to use bash commands inside of VSCode , to do this make sure you have bash installed, if not, the easiest thing to do is to go to: https://git-scm.com/downloads  and download the one for your OS. 

Once bash is installed, you’re ready to customize VSCode to use it instead of command prompt. To do this, add this line in VSCode’s settings.JSON file: 

"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",

 

So your file would look like this

 

 

Note that the value on the right side is the path to the bash executable file. Now if you click Control + ` (backtick), the terminal will appear, and you will see bash.exe as the default tool to write your commands: 

 

 

Let’s have another scenario, let’s say you want to increase the font size, you add something like this: 

"editor.fontSize": 17

 

Now let’s try to change the font-family, to do so, add this: 

"editor.fontFamily": "Lato"

 

So your file would look like this: 

 

 

Now you’ll wonder, how can you know which fonts are available on your OS? For Windows you can execute these 2 commands in PowerShell: 

[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")

(New-Object System.Drawing.Text.InstalledFontCollection).Families

It will list all fonts you can use. Want to have extra fonts? You can get new ones from https://fonts.google.com , after you download your font, you will have a font.zip file, extract it and you’ll see the fonts you downloaded as font-name.ttf. Right click on the font name and choose install.. and that’s it! 

 

I hope this gave you an idea on how to customize VSCode to suite your needs, it’s an awesome editor and it’s worth considering when developing your applications. 

 

 

Cool HTML5 stuff to try out

I’ve been busy lately with changing work and working on some projects, but I would like to share with you some nice HTML5 ideas that may inspire you and give your better understanding into what HTML5 is now capable of doing:

Make a wind for your Lion

Keyboard with sounds

Pomodoro Timer  (Just like some of Chrome’s Apps)

CSS Logo Animation

That would give you some ideas on what can be done with HTML5, CSS3 alone, without the need for custom development. Interesting how we can use these techniques now to build fancy stuff on top of SharePoint either online or on premises with the capabilities now available to us to leverage these techniques.