ClearFormat.vb
- ''
- '' This code is part of Document Solutions for Word demos.
- '' Copyright (c) MESCIUS inc. All rights reserved.
- ''
- Imports System.IO
- Imports System.Drawing
- Imports System.Linq
- Imports GrapeCity.Documents.Word
-
- '' This sample shows how to clear all formatting in a DOCX.
- '' To see see the sample document with original formatting,
- '' run the SampleParagraphs sample.
- Public Class ClearFormat
- Public Function CreateDocx() As GcWordDocument
- Dim doc = New GcWordDocument()
- doc.Load(Path.Combine("Resources", "WordDocs", "SampleParagraphs.docx"))
-
- '' ClearFormatting() Is defined on the RangeBase class.
- '' It can be applied to any range as well as to the whole
- '' document body (which Is derived from RangeBase too):
- doc.Body.ClearFormatting()
- Return doc
- End Function
- End Class
-