Hai ::
In The Powerpoint Application I want To Find out the Ole objects . PowerPoint OLE automation without making the window visible.I make the ShowWindowsInTaskbar also visible false.But still the Power Point application was shown to the User.Any body have idea Regarding that
This Code am used
PowerPoint.Application pptApp = new PowerPoint.Application();
PowerPoint.Presentations objPresentations = pptApp.Presentations;
PowerPoint.Presentation objPresentation;
//SetWindowLong((IntPtr)pptApp.HWND, GWL_EXSTYLE,
//GetWindowLong((IntPtr)pptApp.HWND, GWL_EXSTYLE) | WS_EX_LAYERED);
pptApp.WindowState = PowerPoint.PpWindowState.ppWindowMinimized;
pptApp.Visible = MsoTriState.msoTrue;
pptApp.ShowWindowsInTaskbar = MsoTriState.msoFalse;
//TaskbarList.TaskbarList tblc = new TaskbarList.TaskbarList();
//tblc.HrInit(); // got to call this before we can do anything with the interface
//tblc.DeleteTab(objApp.HWND);
strFID = Guid.NewGuid().ToString();
ToolFile = GetFileElement(ref ACRSXml, ref Doc, ref strParentFID, ref strFID);
ToolVersionXml.AppendChild(ToolFile);
//insert File Into DataBase
strFileName = Doc.GetAttribute("File");
objPresentation = objPresentations.Open(strFileName, MsoTriState.msoTrue, MsoTriState.msoFalse, MsoTriState.msoTrue);
aravindPosted Oct 7, 2010, 9:45 AM
hai nair::
Thank You For Reply!!!!!!!!!!!
I try this code>its working fine.But
string f = @"C:\ACRS-Demo-Files\Consolidated.pptx";
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "POWERPNT.EXE";
startInfo.Arguments = f;
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
Process.Start(startInfo)
I try like this it will not come to visible .But I want Read the Presenations and go to the each slides man.and Find the ole objects from the Each Slides
Suthish NairPosted Oct 7, 2010, 8:28 AM
try using System.Diagnostics.Process.Start and change to visible false instead of objPresentations.Open.