I am trying to add a word document (.doc) to my project as a resource so I could open it with a button.
Asked
Active
Viewed 5,557 times
4
-
1Did you tried _anything_? Show your effort first.. Please read [FAQ] and [ask] – Soner Gönül Apr 10 '13 at 12:29
-
1It is very easy. Even without VS knowledge, (almost) everyone can add a file resource to the project. – Ferdi Duisters Apr 10 '13 at 12:31
-
I had a question like your's but I've found another answer of that(Use Settings instead of Resources). See this [link](http://stackoverflow.com/questions/17379526/c-sharp-how-to-add-string-to-resources). – r.mirzojonov Jul 04 '13 at 13:22
2 Answers
5
You can take the following steps to add a doc file into as resource into your project:
- Right-click your project and select the "Properties" option.
- Then click the "Resources" tab and it will show the dialog for you to add resources in the design time.
- The default page is for add String resources, you can select the combobox in the top-right to select the "file" item.
- Then click the "Add Resource" button to select the doc file and click OK.
- At last, the doc file will show in the blank area. It means that you have added it successfully.

default
- 11,485
- 9
- 66
- 102

Freelancer
- 9,008
- 7
- 42
- 81
4
- Add your document with Add->Existing Item... context menu of your project.
- Right-click on your document item in your Solution Explorer
- Select Properties from the context menu
- Change Build Action from Compile to Embedded Resource
- ...
- PROFIT!!!

W.Schmerz
- 97
- 6