HelloWorld.cs
  1. //
  2. // This code is part of Document Solutions for Word demos.
  3. // Copyright (c) MESCIUS inc. All rights reserved.
  4. //
  5. using System;
  6. using System.IO;
  7. using System.Drawing;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using GrapeCity.Documents.Word;
  11.  
  12. namespace DsWordWeb.Demos
  13. {
  14. // One of the simplest ways to create a "Hello, World!" DDCX.
  15. public class HelloWorld
  16. {
  17. public GcWordDocument CreateDocx()
  18. {
  19. // Create a new Word document:
  20. GcWordDocument doc = new GcWordDocument();
  21. // Add a paragraph with the 'Hello, World!' text to the document:
  22. doc.Body.AddParagraph("Hello, World!");
  23. // Done:
  24. return doc;
  25. }
  26. }
  27. }
  28.