VBa Code :-
ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary) _
.PageNumbers.StartingNumber = 3
C# Code :-
public void StartingPageNumber()
{
ThisApplication.ActiveDocument.Sections[1].Footers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].PageNumbers.StartingNumber = 3;
}
VBA Code :-
With ActiveDocument.Sections(1)
.Footers(wdHeaderFooterPrimary).PageNumbers.Add _
PageNumberAlignment:=wdAlignPageNumberLeft, _
FirstPage:=False
End With
C# Code :-
public void PagenumberFooterPrimary()
{
object aligment = Word.WdPageNumberAlignment.wdAlignPageNumberLeft;
object FirstName = false;
ThisApplication.ActiveDocument.Sections[1].Footers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].PageNumbers.Add(ref aligment, ref FirstName);
}
VBA Code :-
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary) _
.PageNumbers(1).Alignment = wdAlignPageNumberCenter
C# Code :-
public void PagenumberAlign()
{
ThisApplication.ActiveDocument.Sections[1].Headers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].PageNumbers[1].Alignment = Microsoft.Office.Interop.Word.WdPageNumberAlignment.wdAlignPageNumberCenter;
}
VBA Code :-
Dim objPages As Pages
Set objPage = ActiveDocument. _
ActiveWindow.Panes(1).Pages
C# Code :-
public void PanePage()
{
Word.Pages objPage = ThisApplication.ActiveDocument.ActiveWindow.Panes[1].Pages;
}
VBA Code :-
Dim objPage As Page
Set objPage = ActiveDocument.ActiveWindow _
.Panes(1).Pages.Item(1)
C# Code :-
public void Pageitem()
{
Word.Page objpage = ThisApplication.ActiveDocument.ActiveWindow.Panes[1].Pages[1];
}
VBA Code :-
ActiveDocument.ActiveWindow.Split = True
For Each aPane In ActiveDocument.ActiveWindow.Panes
aPane.DisplayRulers = False
Next aPane
C# Code :-
public void ActiveWindowPanes()
{
ThisApplication.ActiveDocument.ActiveWindow.Split = true;
Word.Panes wordPanes = ThisApplication.ActiveDocument.ActiveWindow.Panes;
foreach(Word.Pane wordPane in wordPanes)
{
wordPane.DisplayRulers = false;
}
}
VBA Code :-
ActiveDocument.ActiveWindow.Split = True
For Each aPane In ActiveDocument.ActiveWindow.Panes
aPane.DisplayRulers = False
Next aPane
ActiveDocument.ActiveWindow.Panes.Add SplitVertical:=20
C# Code :-
public void ActiveWindowPanes()
{
ThisApplication.ActiveDocument.ActiveWindow.Split = true;
Word.Panes wordPanes = ThisApplication.ActiveDocument.ActiveWindow.Panes;
foreach(Word.Pane wordPane in wordPanes)
{
wordPane.DisplayRulers = false;
}
object SpiltVertical = 20;
ThisApplication.ActiveDocument.ActiveWindow.Panes.Add(ref SpiltVertical);
}
VBA Code :-
ActiveDocument.ActiveWindow.View.Type = wdNormalView
If ActiveDocument.Footnotes.Count >= 1 Then
ActiveDocument.ActiveWindow.View.SplitSpecial = wdPaneFootnotes
response = _
MsgBox("Do you want to close the footnotes pane?", vbYesNo)
If response = vbYes Then _
ActiveDocument.ActiveWindow.ActivePane.Close
End If
C# Code :-
public void SplitSpecial()
{
ThisApplication.ActiveDocument.ActiveWindow.View.Type = Microsoft.Office.Interop.Word.WdViewType.wdNormalView;
if(ThisApplication.ActiveDocument.Footnotes.Count >= 1 )
{
ThisApplication.ActiveDocument.ActiveWindow.View.SplitSpecial = Microsoft.Office.Interop.Word.WdSpecialPane.wdPaneFootnotes;
}
}
VBA Code :-
With Selection.Paragraphs
.Alignment = wdAlignParagraphRight
.LineSpacingRule = wdLineSpaceDouble
End With
C# Code :-
public void Selectionpara()
{
ThisApplication.Selection.Paragraphs.Alignment = Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphRight;
ThisApplication.Selection.Paragraphs.LineSpacingRule = Microsoft.Office.Interop.Word.WdLineSpacing
.wdLineSpaceDouble;
}
VBA Code :-
Set pr1 = Selection.Range.SpellingErrors
sc = pr1.Count
Set pr2 = Selection.Range.GrammaticalErrors
gc = pr2.Count
Msgbox "Spelling errors: " & sc & vbCr _
& "Grammatical errors: " & gc
C# Code :-
public void SpellingErrs()
{
Word.ProofreadingErrors proofreadingSpelling = ThisApplication.Selection.Range.SpellingErrors;
int sc = proofreadingSpelling.Count;
Word.ProofreadingErrors proofreadingGrammatical = ThisApplication.Selection.Range.GrammaticalErrors;
int gc = proofreadingGrammatical.Count;
}
VBA Code :-
Set myRange = Selection.Range.SpellingErrors(2)
myRange.Select
Set myRange = Selection.Range.GrammaticalErrors(1)
Msgbox myRange.Text
C# Code :-
public void SpellingandGramm()
{
Word.Range wordRange = ThisApplication.Selection.Range.SpellingErrors[2];
wordRange.Select();
wordRange = ThisApplication.Selection.Range.GrammaticalErrors[1];
wordRange.Select();
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment