Tag Archives: microsoft

Outlook error when adding .pst

File access is denied. You do not have the permission required to access the file .pst

Had the above error when trying to add a PST data file to Outlook. Brand new machine, joined to the domain. I had copied the file across the network to the new machine. I tried moving the file into different locations, I tried taking ownership of the file, I tried setting the domain user as a local administrator, check that the ‘Read Only’ flag was not set, I tried moving, instead of copying the file (this has bitten me in the past, believe it or not) etc. After some searching, Google came up with the answer:

icacls file /setintegritylevel L

I found this here:


I ran the icacls command from a command window, however I needed to open that command windows as an administrator, otherwise I got a similar ‘Access Denied’ message. One thing I did not check, which probably should be the first thing to check, was running Outlook as an administrator. However, as I usually add PST’s from the Mail option in control panel, this did not immediately occur to me.



Iterating through open MDIChild forms

I recently had cause to check whether I already had an instance of an MDIChild form open in VB.NET. Using Array.Exists on the MDIChildren property of the MDI Parent form seemed like an elegant way to go. However, after further investigation it looked like i’d need code some supporting functions for the predicate. What I went with in the end was this:

 Dim formName As String = ""     ' Enter form name here

 For Each f As Form In Application.OpenForms
   If f.IsMdiChild = True AndAlso f.Name = formName Then

      ' Yes, we have a MDI Child form open with the required name

   End If

Here’s the complete code to open a new form, or activate the existing form (if there is one) :

 Dim formName As String = ""    Enter form name here
 Dim openForm As Form = Nothing

 ' Iterate and check for instance
 For Each f As Form In Application.OpenForms
    If f.IsMdiChild = True AndAlso f.Name = formName Then
       openForm = f
    End If

 openForm = CType(IIf(openForm Is Nothing, New OrderForm(New Guid(formName)), openForm), Form)
 openForm.MdiParent = Me

Sharepoint Error, Part 2

Sharepoint Error

“The list cannot be imported because a Microsoft SharePoint Foundation-compatible spreadsheet application is not installed or is not compatible with your browser.”

 I resolved the above error by running the Office Setup routine from the installation disk. Incidentally, you’ll need to use 32 bit Internet Explorer when importing your spreadsheet as a list.

However, I still had an issue, where once i’d clicked ‘Import’, the following error occurred:

“An unexpected error has occurred.”
Handy. Not.

However, the following Microsoft Support Article helped resolved the issue:


It would appear that you have to append ‘&ListBaseType=0&DisplayName=Spreadsheet+Import‘ to the URL of the import page.

Thanks to the following websites for help with this: