Skip to main content

Posts

Showing posts with the label Office 365

PowerShell Get OneDrive email address

If you have a subscription to Office 365, chances are you have OneDrive configured in your system and is linked to your email address.
OneDrive is quite good since you can have your data on the cloud, of course you also have to use common sense and what data you are uploading to the cloud.
OneDrive will come handy since you just need internet connection and you will be able to retrieve your notes or data anywhere.
But how to check which email address is linked to your OneDrive? Well, there' a simple way using PowerShell to view registry keys.
A one liner PowerShell script will come-in handy to do these kind of task.
Here’s the code, if using Hotmail, or Live email:
(Get-ItemProperty-PathHKCU:\Software\Microsoft\OneDrive\Accounts\Personal-Nameuseremail).useremail
For OneDrive Business use this code:

(Get-ItemProperty-PathHKCU:\Software\Microsoft\OneDrive\Accounts\Business1-Nameuseremail).useremail

Type equal sign in Excel without evaluating

Typing equal sign in Excel will trigger Excel to evaluate the contents or the formula that is being typed.
But how to type equal sign plus the contents without evaluating the formula?


Or how to display a formula in a cell using Excel?
In VBA, Excel Macro, VBscript and VB.Net; to put comments or remarks on the code is to use single quote.
A single quote tells the engine that whatever that follows from the quote is a string and not a command and should not be evaluated.
In this way, you can type anything after the single quote “ “.
So, this goes the same way in the Excel interface.
If you want just to show the formula for remarks or whatever purposes but don’t want Excel to evaluate the contents, then just type a single quote before the equal sign or the formula.
Example: ‘=1+1
Excel will just display =1+1 It will be treated as a literal string. Of course, without the single quote then the result will be displayed.
See image below:



That’s it, you can use a single quote to treat formu…

PowerPoint contact System Administrator error while opening the file

Office 365 PowerPoint shows an error contact system administrator when opening the file.
The error if interpreted literally shows that a system administrator is needed to fix the issue due to a security or permissions issue.
Notification errors or any errors that are displayed to inform the user that some processes have gone wrong while processing or opening the file are quite helpful to begin troubleshooting.
But some errors are quite generic or does not really point to what type of solution should be done to resolve the issue.
Literally interpreting the error to resolve the issue sometimes work but sometimes it won’t work as well.
For this error it seems like a permission issue but it’s not.
The first thing to try to eliminate the issue is to open the file manually, like going to “File”, select “Open”, then browse to the folder location of the file and open the file.
If the file can be opened, then security issue or permission issue is not a concern.
But when double clicking the f…

Outlook VBA search for string in email body

How to search for a string in the body of Outlook emails?

How to search for a string in Outlook emails using VBA?

How to find a string in Outlook email body using VBA?

Outlook VBA code below searches a string on the email body and move the email to a specified folder.

Replace variables below with the actual folders and string to search in Outlook:

Destination_Folder_01
Folder_to_be_Searched
string to be searched

Folder_to_be_Searched - all emails in this folder will be searched and if the string matches the will be moved automatically to the destination folder. 


string to be searched - this string will match on the body of the emails

Sub MailItemContent_Move_Search()
Dim olItem As Outlook.MailItem Dim sText As String Dim myNameSpace As Outlook.NameSpace Dim myInbox As Outlook.MAPIFolder Dim myDestFolder2 As Outlook.MAPIFolder Dim mySearchFolder As Outlook.MAPIFolder
Set myNameSpace = Application.GetNamespace("MAPI") Set myInbox = myNameSpace.GetDefaultFolder(olFolderInbox)
‘Repla…

How to insert landscape orientation in Word?

How to insert a different section or page in a Word document?

How to mix portrait and landscape in a Word office 365?

If you are writing a thesis, a report or an article that you need to insert a landscape layout in a specific page in Word document but your orientation all long is portrait and changing the orientation causes the whole layout to change.
Inserting landscape in a specific page in a word document can be done by inserting section breaks. Let’s just make a basic example.
Let’s say you have 3 page document and you want that first page in Portrait mode, second page in landscape and third page in portrait layout also.
First, click on “home” tab, click the “show/hide paragraph marks” option or see the icon below. Enabling this option the section breaks, spaces and tabs will be visible. But what we are interested is to see the “section breaks”.


In the first page position the cursor on the last area at the bottom of the page.
In Word 2010, click on “page layout” in the ribbon ta…