Text3DEffect.vb
''
'' This code is part of Document Solutions for Word demos.
'' Copyright (c) MESCIUS inc. All rights reserved.
''
Imports System.Drawing
Imports GrapeCity.Documents.Word

'' This example shows how to add a 3D effect to a text.
Public Class Text3DEffect
    Function CreateDocx() As GcWordDocument
        Dim doc = New GcWordDocument()

        Dim paragraph As Paragraph = doc.Body.Paragraphs.Add()
        Dim run As Run = paragraph.GetRange().Runs.Add("3D effects")

        Dim font As GrapeCity.Documents.Word.Font = run.Font
        font.Size = 72F
        font.Bold = True
        font.Color.ThemeColor = ThemeColorId.Accent3
        font.Line.Fill.Type = FillType.NoFill

        '' apply 3D effect
        Dim threeD As ThreeDFormat = font.Effects.ThreeDFormat
        threeD.Material = MaterialType.Matte
        threeD.Depth.Width = 4.5F
        threeD.TopBevel.Type = BevelType.Angle
        threeD.TopBevel.Width = 5F
        threeD.TopBevel.Height = 1F

        '' Done:
        Return doc
    End Function
End Class