Menu

 

Sunday, August 1, 2010

Refernce Collection :- (O) Other Correct Exception

VBA Code :-

For Each aCap In AutoCorrect.OtherCorrectionsExceptions
MsgBox aCap.Name
Next aCap

C# Code :-

public void OtherCorrectException()
{
Word.OtherCorrectionsExceptions wordCorrectexception = ThisApplication.AutoCorrect.OtherCorrectionsExceptions;

foreach (Word.OtherCorrectionsException wordOe in wordCorrectexception)
{
string strName = wordOe.Name;
}
}

VBA Code :-

AutoCorrect.OtherCorrectionsExceptions.Add Name:="TipTop"

C# Code :-

public void OtherExcepAdd()
{
string strName = "Tip Top";
ThisApplication.AutoCorrect.OtherCorrectionsExceptions.Add(strName);
}

VBA Code :-

MsgBox AutoCorrect.OtherCorrectionsExceptions(1).Name

C# Code :-

public void OtherExcepObject()
{
object Name = 1;
string strName = ThisApplication.AutoCorrect.OtherCorrectionsExceptions.get_Item(ref Name).Name;
}

No comments:

Post a Comment