Top Banner
Creating a Word file
20
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Creating a word file

Creating a Word file

Page 2: Creating a word file

Create a new project

Page 3: Creating a word file

Сonsole application

Page 4: Creating a word file

Add a reference to the project

Page 5: Creating a word file

Select the Microsoft Word

14.0 Object Library

Page 6: Creating a word file

Make sure that selected libraries are added to

the section “References”

Page 7: Creating a word file

Add the namespace

Microsoft.Office.Interop.Word

Page 8: Creating a word file

Create a file word.doc

on the disk C

Input text in the created file

Page 9: Creating a word file

Add the following source code in

the function Main

Page 10: Creating a word file

The result of the program work

Page 11: Creating a word file

Change the source code to the following in

the function Main

Page 12: Creating a word file

The result of the program work

Page 13: Creating a word file

Add the following source code in the

function Main

Page 14: Creating a word file

The result of the program work

Page 15: Creating a word file

Add the following source

code in the function Main

Page 16: Creating a word file

The result of the program work

Page 17: Creating a word file

Add the following source code in the function Main

Page 18: Creating a word file

The result of the program work

Page 19: Creating a word file

Add the following source

code in the function Main

Page 20: Creating a word file

The result of the program work