//
// This code is part of Document Solutions for Word demos.
// Copyright (c) MESCIUS inc. All rights reserved.
//
using System;
using System.Drawing;
using System.IO;
using GrapeCity.Documents.Word;
using GrapeCity.Documents.Imaging;
namespace DsWordWeb.Demos
{
// This sample demonstrates how to use theme colors
// to change how a document looks.
public class ThemeColors
{
public GcWordDocument CreateDocx()
{
var doc = new GcWordDocument();
var path = Path.Combine("Resources", "WordDocs", "BuiltInStyles.docx");
doc.Load(path);
doc.Settings.GetThemeColor(ThemeColorId.Text1).RGB = Color.Blue;
doc.Settings.GetThemeColor(ThemeColorId.Accent1).RGB = Color.Red;
doc.Settings.GetThemeColor(ThemeColorId.Accent2).RGB = Color.OrangeRed;
doc.Settings.GetThemeColor(ThemeColorId.Accent3).RGB = Color.Orange;
// Done:
return doc;
}
}
}