Requirement:-
Visual Studio 2008
Vsto
Let start:-
What we do Normally do when we want to use colum in word.
Normal Word
Selection of Colum
When we click on Colum divide in 2 part.
Now We do same think in C#
Image 1 Remain same
Code do the Colum in C#
Selection of Colum
When we click on Colum divide in 2 part.
Now We do same think in C#
Image 1 Remain same
Code do the Colum in C#
public void Pagesetuptest()
{
if (this.ActiveWindow.View.SplitSpecial != WdSpecialPane.wdPaneNone)
{
this.ActiveWindow.Panes[2].Close();
}
if (this.ActiveWindow.View.Type != WdViewType.wdPrintView)
{
this.ActiveWindow.ActivePane.View.Type = WdViewType.wdPrintView;
}
Selection mysel = this.ActiveWindow.Selection;
mysel.PageSetup.TextColumns.SetCount(2);
mysel.PageSetup.TextColumns.EvenlySpaced = -1;
mysel.PageSetup.TextColumns.LineBetween = -1;
}
Output
{
if (this.ActiveWindow.View.SplitSpecial != WdSpecialPane.wdPaneNone)
{
this.ActiveWindow.Panes[2].Close();
}
if (this.ActiveWindow.View.Type != WdViewType.wdPrintView)
{
this.ActiveWindow.ActivePane.View.Type = WdViewType.wdPrintView;
}
Selection mysel = this.ActiveWindow.Selection;
mysel.PageSetup.TextColumns.SetCount(2);
mysel.PageSetup.TextColumns.EvenlySpaced = -1;
mysel.PageSetup.TextColumns.LineBetween = -1;
}
Output
thanks for your code
ReplyDelete