CanAddPara.vb
C# VB
'''' This code is part of Document Solutions for Word demos.'' Copyright (c) MESCIUS inc. All rights reserved.''Imports GrapeCity.Documents.Word
Public Class CanAddPara Function CreateDocx() As GcWordDocument Dim doc = New GcWordDocument() Dim p = doc.Body.Paragraphs.Add() Dim cc = p.AddContentControl(ContentControlType.RichText).Content If cc.CanAdd(GetType(Paragraph)) Then '' returns false since the content control was created on inline level cc.AddParagraph("Paragraph added to Rich Text Content Control.") Else cc.AddRun("Run added to Rich Text Content Control.") End If Return doc End FunctionEnd Class