![]() |
How to set the ActivePrinter Property for Microsoft.Office.Interop
I've created the Microsoft.Office.Interop.Excel.ApplicationClass instance
using following code. theServer = Activator.CreateInstance(ServerType); private static Type ServerType { get { return Type.GetTypeFromProgID("Excel.Application"); } } Type typeof_Server = theServer .GetType(); typeof_Server.InvokeMember("ActivePrinter", BindingFlags.SetProperty, null, theServer ,new object[] { "MyPrinter on Ne03:" }); I'm not able to set printer property for this instance using the above code. It gives an exception unable to set the ActivePrinter Property for the ApplicationClass. In MSDN the ActivePrinter property for Microsoft.Office.Interop.Excel.ApplicationClass instance has following description. public virtual string ActivePrinter {get; set;}This property supports the ..NET Framework infrastructure and is not intended to be used directly from your code. How do i set it. Thanks Vinu |
All times are GMT +1. The time now is 07:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com