I'm trying to access a page in Word by it's name or number. I thought I was going in the right direction but there doesn't seem to be a page.name
or page.number
property. The issue is in my if
statement where I'm trying to say if there is a page named Page 4 Content
then select it.
var wordApplication = (word.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Word.Application");
string path = CommonMethods.getFile(fileName);
myDoc = wordApplication.Documents.Open(path);
wordApplication.Visible = true;
wordApplication.WindowState = word.WdWindowState.wdWindowStateMaximize;
word.Pages pages = myDoc.ActiveWindow.ActivePane.Pages;
foreach (word.Page p in pages )
{
if (p.)
{
}
}