You all out there may be a little sharper than me, but one thing that took me some time to work out is exactly how to create a new Portal listing with HTML content. In the end I worked this out, thought it might be useful to share the code with you:
Sub AddNews(ByVal Title As String, ByVal ListingText As String, ByVal NewsID As String, ByVal PubDate As Date) Dim NewListing As Microsoft.SharePoint.Portal.SiteData.AreaListing Dim Audience() As Guid
If Title.Length > 100 Then Title = Title.Substring(0, 100) End If
NewListing = TargetNewsArea.Listings.AddListing(Title, "", Portal.SiteData.ListingType.News, "", Audience) NewListing.HtmlBlob = ListingText="BR"> NewListing.URL = "/txtlstvw.aspx?LstID=" + NewListing.ID.ToString NewListing.AppearanceDate = PubDate NewListing.Update() End Sub
Now as you know, I'm a few "If clauses" short of a case statement when it comes to development, so any more effiecient routines encouraged.