Question: I am currently in the process of fixing errors that showed up in C# code after it has been converted from Visual Basic. In my C# code I have the following:

```
Pos = oWord.InchesToPoints(7);
oDoc.Bookmarks["\\endofdoc"].Range.InsertParagraphAfter();
do
{
    oRng = oDoc.Bookmarks["\\endofdoc"].Range;
    oRng.ParagraphFormat.SpaceAfter = 6;
    oRng.InsertAfter("");
    oRng.InsertParagraphAfter();
} while (Pos >= oRng.Information(WdInformation.wdVerticalPositionRelativeToPage));

```

The problem I am having is with this section:

```
oRng.Information(WdInformation.wdVerticalPositionRelativeToPage)

```

I have the error "Indexed property 'Microsoft.Office.Interop.Word.Range.Information' has non-optional arguments which must be provided." 

The type the arguments must be is WdInformation, according to msdn. I double checked and wdVerticalPositionRelativeToPage is that type. What am I doing wrong? Any help will greatly be appreciated.

If it helps, here is the same code in VB before the conversion:

```
Pos = oWord.InchesToPoints(7)
oDoc.Bookmarks.Item("\endofdoc").Range.InsertParagraphAfter()
    Do
        oRng = oDoc.Bookmarks.Item("\endofdoc").Range
        oRng.ParagraphFormat.SpaceAfter = 6
        oRng.InsertAfter("")
        oRng.InsertParagraphAfter()
    Loop While Pos >= oRng.Information(Word.WdInformation.wdVerticalPositionRelativeToPage)

```

Answer: 
The error message is clearly states that the `Range.Information` is indexer.

Use this syntax:

```
oRng.Information[WdInformation.wdVerticalPositionRelativeToPage];

```
I had the same issue today with a VBA to C# conversion.

This code would not compile:

```
using Word = Microsoft.Office.Interop.Word;

Word.Application oWord = new Word.Application();
Word.Document oTgtDoc = new Word.Document();

float heightOfPage = oWord.Selection.PageSetup.PageHeight - oWord.Selection.PageSetup.BottomMargin;
foreach (Word.Paragraph p in oTgtDoc.Paragraphs)
{
    if (p.Range.End < p.Range.StoryLength)
    {
        int i;
        if (p.Range.Information[Word.WdInformation.wdWithInTable])
        {
            i = oTgtDoc.Range(p.Range.End - 1, p.Range.End - 1).Information[Word.WdInformation.wdVerticalPositionRelativeToPage];
        }
        else
        {
            i = oTgtDoc.Range(p.Range.End, p.Range.End).Information[Word.WdInformation.wdVerticalPositionRelativeToPage];
        }
        if (heightOfPage - i < 0)
        {
            p.Range.Rows[1].AllowBreakAcrossPages = true;
        }
    }
}

```

Besides the answer above, that the correct syntax for an `enumerable` (which `WdInformation` is) is `[]` not `()` I also had to *add the following reference* to my project: **Miscrosoft.CSharp** dll from the .NET Framework reference assemblies.

I have to note that every single other `Office.Interop` conversions from VBA to C# worked so far in my conversion, and some of them included rather complex automation of Word. Except for this one.