This code unloads AddIns
officeApplication.AddIns.Unload(false);
Edited: Vacation rentals When you need to mix the start of the process and the ability to use the office "application" interface, you will need the Marshal.GetActiveObject command .
Example:
System.Diagnostics.Process.Start(
@"Winword.exe",
@"/a");
Thread.Sleep(2000);
Application officeApplication = (Application)Marshal.GetActiveObject("Word.Application");
Avram source
share