Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SmartDoc ActiveX
Hi All:
I'm running the tutorial from he http://msdn.microsoft.com/library/de...HV01079910.asp I'm doing it with Excel instead of Word. The only thing from the tutorial I haven't been able to accomplish is to make the ActiveX control (Calendar in this case) Click event work, because I haven't figured out how to translate that part of the example to Excel. I know that Document will be Workbook, not sure about Selection. Any guidance will be highly appreciated. This is the relevant code: Microsoft.Office.Interop.Word.Document objDoc; Microsoft.Office.Interop.Word.SmartTagAction objCalendar; Microsoft.Office.Interop.Word.Selection objSel; objDoc = (Microsoft.Office.Interop.Word.Document)Document; objSel = objDoc.ActiveWindow.Selection; foreach (Microsoft.Office.Interop.Word.SmartTagAction objAction in objSel.XMLParentNode.SmartTag.SmartTagActions) { if (objAction.Name=="Calendar") { objCalendar = objAction; if (objCalendar.PresentInPane == true) { objCal = (MSACAL.Calendar)objCalendar.ActiveXControl; objCal.Click += new MSACAL.DCalendarEvents_ClickEventHandler(CalendarC lick); break; } } } Thanks in advance, Pete B. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ActiveX | Excel Discussion (Misc queries) | |||
ActiveX | Excel Discussion (Misc queries) | |||
ActiveX add-in? | Excel Programming | |||
activeX | Excel Programming | |||
activex | Excel Programming |