title: Office server-side Automation still possible with Office 365?
body: <p>I have an ASP.NET Webforms Application where the user can create reports with server-side office Automation. It basically works with FormFields that are being filled out and in the end the user gets a download with the Office document. The Application is quite old and I did not design this software. I'm also aware of the side effects of office server Automation and this article: </p>
  
  <p><a href="https://support.microsoft.com/en-us/help/257757/considerations-for-server-side-automation-of-office" rel="nofollow noreferrer">https://support.microsoft.com/en-us/help/257757/considerations-for-server-side-automation-of-office</a></p>
  
  <p>It just works for almost 15 years with several different Office Versions, the newest one is Office 2016 but now I have to know if it still would work with Office 365. It looks like a hybrid solution, Software as a Service but still requires installation on the machine somehow.</p>
  
  <p>It's a little bit hacky to set up like:</p>
  
  <p>IIS Application User needs to take ownership of the following folder:</p>
  
  <ul>
  <li>C:\Programme(x86)\Microsoft Office</li>
  <li>C:\Programme\Microsoft Office</li>
  <li>C:\Windows\System32\config\systemprofile\AppData</li>
  <li>C:\Windows\System32\config\systemprofile\Desktop (sometimes missing
  so it needs to be created)</li>
  <li>C:\Windows\SysWOW64\config\systemprofile\AppData</li>
  <li>C:\Windows\SysWOW64\config\systemprofile\Desktop (sometimes missing
  so it needs to be created)</li>
  <li>C:\Programme(x86)\Microsoft.Net\</li>
  <li>C:\Program Files (x86)\Microsoft ASP.NET\</li>
  </ul>
  
  <p>And in addition, some DCOM Configuration for Word and Excel needed. The IIS Application User needs permission to start the office application etc.</p>
  
  <p>I'm not sure if all the requiered dependency are still there with office 365.</p>
  
  <p>Here is a code snippet:</p>
  
  <pre><code>Function CreateDoc(ByVal docpath As String, ByVal docname As String, ByVal Document As String) As String
  
          Dim ff_name As String = ""
          Dim strFileName As String = Nothing
          Dim strExtension As String = Nothing
          Dim fileBytes As Byte() = Nothing
  
  
          Try
  
              Dim w = New Word.Application
  
              w.Visible = m_obj.Project.OfficeDisplay
              w.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone
              w.Documents.Open(docpath)
  
              SetRanges(Document)
  
              Dim i As Integer
  
              For Each ff As Word.FormField In w.ActiveDocument.FormFields
              .
              .
              .
  </code></pre>