Class MsOfficeExternalPreviewApplication
Microsoft Office applications try to manage resources, processes on its own, so Process.Start() will return valid process id only if there are no other instances of MS office running. In other case Process.Start() call will return immediately without returning valid process id, because existing instance of MS office application will take over process creation and opening the file. To avoid this, special DDE switch has to be passed to MS Office application when it is started. Class below customizes starting of MS Office application. see: http://support.microsoft.com/kb/210565 for command line switch and see: http://social.msdn.microsoft.com/Forums/hu-HU/csharpgeneral/thread/21014f97-1732-4261-afe5-2127b2e64f68 for
Inheritance
Implements
Inherited Members
Namespace: Sdl.FileTypeSupport.Framework.PreviewControls
Assembly: Sdl.FileTypeSupport.Framework.PreviewControls.dll
Syntax
public class MsOfficeExternalPreviewApplication : GenericExteralPreviewApplication, IFileTypeDefinitionAware, ISingleFilePreviewApplication, IAbstractPreviewApplication, IAbstractPreviewController, ISingleFilePreviewController, IDisposable
Constructors
MsOfficeExternalPreviewApplication()
Declaration
public MsOfficeExternalPreviewApplication()
Properties
DdeSwitch
Gets or sets dde switch allowing to open every file in separate instance of MS Office Application directly.
Declaration
public string DdeSwitch { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
LaunchApplicationForFile(TempFileManager)
Start external application for given file
Declaration
protected override Process LaunchApplicationForFile(TempFileManager managedTempFile)
Parameters
Type | Name | Description |
---|---|---|
TempFileManager | managedTempFile | File desriptor to open with application |
Returns
Type | Description |
---|---|
System.Diagnostics.Process | Process id of external application |