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:

http://www.office-outlook.com/outlook-forum/index.php/m/400393/

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 MDI child 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
 Next

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
 Next
 
 openForm = CType(IIf(openForm Is Nothing, New OrderForm(New Guid(formName)), openForm), Form)
 openForm.MdiParent = Me
 openForm.Show()
 openForm.Activate()

Sharepoint, Part 2

“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:

http://support.microsoft.com/kb/2492798

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:

http://kbalertz.com/833714/requires-Windows-SharePoint-error-message-Office-document-document-library.aspx

http://msdn.microsoft.com/en-us/library/ms427792.aspx

http://lichao.net/eblog/how-to-resolve-edit-document-requires-a-windows-sharepoint-services-compatible-application-and-microsoft-internet-explorer-60-or-greater-error-200901215.html