S
Sunny Kang
Hi all,
I'm trying to handle a footer of Word documents with VS 2005 and MS Wrod 2003.
The code is the following.
oApp = New Microsoft.Office.Interop.Word.Application
oDoc = oApp.Documents.Open(szFileFullPath)
nSecCount = oDoc.Sections.Count
For i = 1 To nSecCount
If oDoc.Sections(i).PageSetup.DifferentFirstPageHeaderFooter = True Then
'Do something
End If
Next
The above code works for most of my Word document.
But a few document makes the following error message.
"This method or property is not available because the object refers to a
framed paragraph."
"If oDoc.Sections(i).PageSetup.DifferentFirstPageHeaderFooter = True Then"
line makes the above error message.
Thanks for any comments.
I'm trying to handle a footer of Word documents with VS 2005 and MS Wrod 2003.
The code is the following.
oApp = New Microsoft.Office.Interop.Word.Application
oDoc = oApp.Documents.Open(szFileFullPath)
nSecCount = oDoc.Sections.Count
For i = 1 To nSecCount
If oDoc.Sections(i).PageSetup.DifferentFirstPageHeaderFooter = True Then
'Do something
End If
Next
The above code works for most of my Word document.
But a few document makes the following error message.
"This method or property is not available because the object refers to a
framed paragraph."
"If oDoc.Sections(i).PageSetup.DifferentFirstPageHeaderFooter = True Then"
line makes the above error message.
Thanks for any comments.