You have a document library that contains .docx documents. You need to create a web part that allows users with the ability to convert documents to .aspx pages by using the default document converter. You write the following code segment:
01: Public Sub ConvertFileOpen(ByVal file as SPFile)
02: Dim pubWeb as PublishingWeb =
PublishingWeb.GetPublishingWeb(SPContext.Current.Web)
03: Dim pages as PublishingWebCollection = pubWeb.GetPublishingPages()
04: Dim title[String] = GUID.NewGUID().toString() & “.aspx”
05: Dim converterID as new GUID(“1234………7890”)
06:
07: End Sub
Which code segment should you add at line 6?
A.
pages.Add(title, file, NewGUID(), converterID.toString(), PageConversionPriority.Immediately)
B.
Dim newPage as PublishingPage = pages.Add(title, file, converterID, PageConversionPriority.Immediately)
C.
DirectCast(pubWeb.Web.list(“pages”), SPDocumentLibrary).Items.Add(file.URI + title, SPFileSystemObjectType.File)
D.
Dim newPages as PublishingPage = page.Add(title, New PageLayout(file.Item))