Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX Medley1208 Excel Discussion (Misc queries) 0 May 30th 08 04:09 PM
ActiveX RedChequer Excel Discussion (Misc queries) 0 March 9th 05 11:05 PM
ActiveX add-in? [email protected] Excel Programming 7 January 21st 05 01:04 PM
activeX batty Excel Programming 0 September 18th 04 04:13 PM
activex joe Excel Programming 1 August 12th 04 05:22 PM


All times are GMT +1. The time now is 09:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"