Menu

 

Saturday, August 7, 2010

Refence Collection :- (T) TAbleOFAuthorties , TableOfContent,TableOfFiq,Tables,TablesOfAuthorites,TableOFAutoCat,TableOfContents,TableOfFiq,TableStops

VBA Code :-

With ActiveDocument.TablesOfAuthorities(1)
.IncludeCategoryHeader = True
.Update
End With

C# Code :-

public void TOA()
{
ThisApplication.ActiveDocument.TablesOfAuthorities[1].IncludeCategoryHeader = true;
ThisApplication.ActiveDocument.TablesOfAuthorities[1].Update();
}

VBA Code :-

Set myRange = ActiveDocument.Range(Start:=0, End:=0)
ActiveDocument.TablesOfAuthorities.Add Range:=myRange, _
Passim:=True, Category:=0, EntrySeparator:=", "

C# Code :-

public void TOARange()
{

object start = 0;
object End = 0;
object Category = 0;
object Passim = true;
object EntrySeparator = ", ";

Word.Range myRange = ThisApplication.ActiveDocument.Range(ref start, ref End);
ThisApplication.ActiveDocument.TablesOfAuthorities.Add(myRange, ref Category, ref missing, ref Passim, ref missing, ref missing, ref missing, ref EntrySeparator, ref missing, ref missing, ref missing);

}

VBA Code :-

ActiveDocument.TablesOfContents(1).UpdatePageNumbers
*

Set myRange = ActiveDocument.Range(Start:=0, End:=0)
ActiveDocument.TablesOfContents.Add Range:=myRange, _
UseFields:=False, UseHeadingStyles:=True, _
LowerHeadingLevel:=3, _
UpperHeadingLevel:=1

C# Code :-

public void TOAObject()
{
ThisApplication.ActiveDocument.TablesOfContents[1].UpdatePageNumbers();
object start = 0;
object End = 0;
object Category = 0;
object Passim = true;
object EntrySeparator = ", ";

Word.Range myRange = ThisApplication.ActiveDocument.Range(ref start, ref End);
ThisApplication.ActiveDocument.TablesOfAuthorities.Add(myRange, ref Category, ref missing, ref Passim, ref missing, ref missing, ref missing, ref EntrySeparator, ref missing, ref missing, ref missing);

}

VBA Code :-

ActiveDocument.TablesOfFigures(1).UpdatePageNumbers


*
ActiveDocument.TablesOfFigures.Add Range:=Selection.Range, _
IncludeLabel:=True, IncludePageNumbers:=True

C# Code :-

public void TableFig()
{
ThisApplication.ActiveDocument.TablesOfFigures[1].UpdatePageNumbers();

object start = 0;
object End = 0;
object Include = true;
object IncludePagenumbers = true;

Word.Range myRange = ThisApplication.ActiveDocument.Range(ref start, ref End);
ThisApplication.ActiveDocument.TablesOfFigures.Add(myRange, ref missing, ref Include, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref IncludePagenumbers, ref missing, ref missing, ref missing);

}

VBA Code :-

For Each aTable In ActiveDocument.Tables
aTable.Borders.OutsideLineStyle = wdLineStyleSingle
aTable.Borders.OutsideLineWidth = wdLineWidth025pt
aTable.Borders.InsideLineStyle = wdLineStyleNone
Next aTable

C# Code :-

public void TablewdLineStyle()
{
Word.Tables wordTables = ThisApplication.ActiveDocument.Tables;

foreach (Word.Table wordTable in wordTables)
{
wordTable.Borders.OutsideLineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleSingle;
wordTable.Borders.OutsideLineWidth = Microsoft.Office.Interop.Word.WdLineWidth.wdLineWidth025pt;
wordTable.Borders.InsideLineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleNone;
}


}

VBA Code :-

For Each aTable In ActiveDocument.Tables
aTable.Borders.OutsideLineStyle = wdLineStyleSingle
aTable.Borders.OutsideLineWidth = wdLineWidth025pt
aTable.Borders.InsideLineStyle = wdLineStyleNone
Next aTable
*

Set myRange = ActiveDocument.Range(Start:=0, End:=0)
ActiveDocument.Tables.Add Range:=myRange, NumRows:=3, NumColumns:=4
*

ActiveDocument.Tables(1).ConvertToText Separator:=wdSeparateByTabs

C# Code :-

public void TablewdLineStyle()
{
Word.Tables wordTables = ThisApplication.ActiveDocument.Tables;

foreach (Word.Table wordTable in wordTables)
{
wordTable.Borders.OutsideLineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleSingle;
wordTable.Borders.OutsideLineWidth = Microsoft.Office.Interop.Word.WdLineWidth.wdLineWidth025pt;
wordTable.Borders.InsideLineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleNone;
}

object start = 0;
object End = 0;

Word.Range wordRange = ThisApplication.ActiveDocument.Range(ref start, ref End);
ThisApplication.ActiveDocument.Tables.Add(wordRange, 3, 4, ref missing, ref missing);

object sep = Word.WdSeparatorType.wdSeparatorColon;

ThisApplication.ActiveDocument.Tables[1].ConvertToText(ref sep, ref missing);


}

VBA Code :-

ActiveDocument.TablesOfAuthorities.Format = wdTOAClassic
*
Set myRange = ActiveDocument.Range(Start:=0, End:=0)
ActiveDocument.TablesOfAuthorities.Add Range:=myRange, _
Passim:=True, Category:=0, EntrySeparator:= ", "
*

With ActiveDocument.TablesOfAuthorities(1)
.IncludeCategoryHeader = True
.Update
End With

C# Code :-

public void TablesOfAuth()
{
ThisApplication.ActiveDocument.TablesOfAuthorities.Format = Microsoft.Office.Interop.Word.WdToaFormat.wdTOADistinctive;


object start = 0;
object End = 0;

Word.Range wordRange = ThisApplication.ActiveDocument.Range(ref start, ref End);

object passim = true;
object Category = 0;
object EntrySep = ", ";
ThisApplication.ActiveDocument.TablesOfAuthorities.Add(wordRange, ref Category, ref missing, ref passim, ref missing, ref EntrySep, ref missing, ref missing, ref missing, ref missing, ref missing);

ThisApplication.ActiveDocument.TablesOfAuthorities[1].IncludeCategoryHeader = true;
ThisApplication.ActiveDocument.TablesOfAuthorities[1].Update();

}

VBA Code :-

ActiveDocument.TablesOfContents.MarkEntry Range:=Selection.Range, _
Level:=2, Entry:="Introduction"
*


Set myRange = ActiveDocument.Range(Start:=0, End:=0)
ActiveDocument.TablesOfContents.Add Range:=myRange, _
UseFields:=False, UseHeadingStyles:=True, _
LowerHeadingLevel:=3, _
UpperHeadingLevel:=1

C# Code :-

public void MarkEntry()
{
Word.Range wordRange = ThisApplication.Selection.Range;
object Entery = "Introduction";
object Level = 2;
ThisApplication.ActiveDocument.TablesOfContents.MarkEntry(wordRange, ref Entery, ref missing, ref missing, ref Level);


object UserFiled = false;
object UseHeadingStyles = true;
object LowerHeadingLevel = 3;

object UpperHeadingLevel = 1;

ThisApplication.ActiveDocument.TablesOfContents.Add(wordRange, ref UseHeadingStyles, ref UpperHeadingLevel, ref LowerHeadingLevel, ref UserFiled, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);


}

No comments:

Post a Comment