VBA Code :-
ActiveDocument.Indexes.Format = wdIndexClassic
C# Code :-
public void IndexesFormat()
{
ThisApplication.ActiveDocument.Indexes.Format = Microsoft.Office.Interop.Word.WdIndexFormat.wdIndexClassic;
}
VB A Code :-
Set myRange = ActiveDocument.Content
myRange.Collapse Direction:=wdCollapseEnd
ActiveDocument.Indexes.Add Range:=myRange, Type:=wdIndexRunin
C# Code :-
public void ActiveDocumentContent()
{
Word.Range myRange = ThisApplication.ActiveDocument.Content;
object direction = Word.WdCollapseDirection.wdCollapseEnd;
myRange.Collapse(ref direction);
object wdtype = Word.WdIndexType.wdIndexRunin;
ThisApplication.ActiveDocument.Indexes.Add(myRange, ref missing, ref missing, ref wdtype, ref missing, ref missing, ref missing, ref missing);
}
VBA Code :-
If ActiveDocument.Indexes.Count >= 1 Then
ActiveDocument.Indexes(1).Update
End If
C# Code :-
public void IndexsCount()
{
int indexActiveCount = ThisApplication.ActiveDocument.Indexes.Count;
if (indexActiveCount >= 1)
{
ThisApplication.ActiveDocument.Indexes[1].Update();
}
}
VBA Code :-
For Each iShape In ActiveDocument.InlineShapes
iShape.ConvertToShape
Next iShape
C# Code :-
public void ShapesCount()
{
Word.InlineShapes wordinlineShapes = ThisApplication.ActiveDocument.InlineShapes;
foreach (Word.InlineShape wls in wordinlineShapes)
{
wls.ConvertToShape();
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment