S
Sajid
Hi:
I want to create the following field in the header of my document in C#
and not VBA. I have the VBA code but it doesnt convert corectly to C#;
{ IF {PAGE}<="5""BASIC"{ IF {PAGE}>="10""BASIC2"}}
VBA Code:
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.TypeText Text:="IF"
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.TypeText Text:="PAGE"
Selection.MoveRight Unit:=wdCharacter, Count:=2
Selection.TypeText Text:="<=""6""""BASIC """
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.TypeText Text:="IF"
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.TypeText Text:="PAGE"
Selection.MoveRight Unit:=wdCharacter, Count:=2
Selection.TypeText Text:=">=""8""""BASIC """
Can someone please help me convert this to C#.
Thanks
I want to create the following field in the header of my document in C#
and not VBA. I have the VBA code but it doesnt convert corectly to C#;
{ IF {PAGE}<="5""BASIC"{ IF {PAGE}>="10""BASIC2"}}
VBA Code:
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.TypeText Text:="IF"
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.TypeText Text:="PAGE"
Selection.MoveRight Unit:=wdCharacter, Count:=2
Selection.TypeText Text:="<=""6""""BASIC """
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.TypeText Text:="IF"
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.TypeText Text:="PAGE"
Selection.MoveRight Unit:=wdCharacter, Count:=2
Selection.TypeText Text:=">=""8""""BASIC """
Can someone please help me convert this to C#.
Thanks