G
Gary Hillerson
I've gotten myself a bit confused about object vars.
In the following function, do I need these statements at the end to
deallocate memory that was allocated by the Set statements?
Set pgf = Nothing
Set rng = Nohting
Public Function IsFrontMatterSection(sect As Section) As Boolean
Dim pgf As Paragraph
Dim rng As Range
Set pgf = sect.Range.Paragraphs.First
Set rng = pgf.Range
IsFrontMatterSection = (rng.Style = "FrontMatter Title") _
Or (rng.Style = "Section Header")
Set pgf = Nothing
Set rng = Nohting
End Function
In the following function, do I need these statements at the end to
deallocate memory that was allocated by the Set statements?
Set pgf = Nothing
Set rng = Nohting
Public Function IsFrontMatterSection(sect As Section) As Boolean
Dim pgf As Paragraph
Dim rng As Range
Set pgf = sect.Range.Paragraphs.First
Set rng = pgf.Range
IsFrontMatterSection = (rng.Style = "FrontMatter Title") _
Or (rng.Style = "Section Header")
Set pgf = Nothing
Set rng = Nohting
End Function