VBA Code :-
Windows.Arrange ArrangeStyle:=wdTiled
*
ActiveDocument.ActiveWindow.NewWindow
NewWindow
Windows.Add
*
MsgBox Windows(1).Caption
C# Code :-
public void WindowCollection()
{
object objwdTitled = Word.WdArrangeStyle.wdTiled;
ThisApplication.Windows.Arrange(ref objwdTitled);
ThisApplication.ActiveDocument.ActiveWindow.NewWindow();
object objActiveWindo = 1;
string strCaption = "";
strCaption = ThisApplication.Windows.get_Item(ref objActiveWindo).Caption;
}
VBA Code :-
MsgBox Selection.Words.Count & " words are selected"
With Selection.Words(1)
.Italic = True
.Font.Size = 24
End With
C# Code :-
public void SelectionWord()
{
int wordCount = ThisApplication.Selection.Words.Count;
ThisApplication.Selection.Words[1].Italic = 1;
ThisApplication.Selection.Words[1].Font.Size = 24;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment