.NET, COM+October 13, 2005 9:53 pm

I have Word 2000, Word 2003 and Word 97 installed on my machine. At a time ,only one exe will be active as per the behaviour. i.e . When I click on the Word 2003 exe (Winword.exe) all icons changes to Word 2003. When I click on Word 2000,all icons changes to Word 2000 and so is with Word 97. Since the compare method of Word 2000 object model accepts only one parameter i.e filename , I am using the same with Word 2003 also. When I tried to compare documents edited with word 2000 using Word 2003 object model, it is not showing track changes on. When I use Word 2000 Compare method, it is working perfectly.

However, when I use Compare method with additional parameter as CompareTarget: =1 (in Word 2003), it is working fine.

Why the Compare method with single parameter as FileName is not working in word 2003 ?

One more problem: I have written code to clean the Word Application as well as Word Document object in the ‘finally’ expression,but Task manager is showing an instance of WINWORD.EXE running under the account of ASPNET user..Can anybody explain the behaviour !!!

Read More Articles
.NET 6:43 pm

Use the Page.Request.Params(”__EVENTTARGET”) to get the name of control who caused postback.
However, this does not return the name of control,if the postback is caused by button/ image button.
You can get the button control by looping through all the controls from Page.Request.Forms and comparing with Button Webcontrol.

Dim controlName as string
controlName = Page.Request.Params(”__EVENTTARGET”)
Dim control as Control
If controlName <> Nothing And controlName <> String.Empty
control =Page.FindControl(controlName)
End If

Read More Articles