Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,092 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,805 people online right now. Registration is fast and FREE... Join Now!




VB.Net Publishing and Application

 
Reply to this topicStart new topic

VB.Net Publishing and Application

gram999
20 Jun, 2008 - 10:47 AM
Post #1

D.I.C Head
**

Joined: 21 Jan, 2008
Posts: 81



Thanked: 2 times
My Contributions
Quick question: is it possible to have a MS Word Document included as part of a VB.Net project when you publish it? I have a form and when I click a command button I want a preformatted MS-Word document to open. Instead of trying to write code in VB.Net to format a blank Word document I was wondering if is possible to bundle it into the application when you publish it to CD.

If this would work is it best to put the Word template in the obj file of the project or should I set up a new project file?

This post has been edited by gram999: 20 Jun, 2008 - 10:48 AM
User is offlineProfile CardPM
+Quote Post

narmer93
RE: VB.Net Publishing And Application
20 Jun, 2008 - 12:58 PM
Post #2

D.I.C Regular
***

Joined: 13 Mar, 2008
Posts: 253



Thanked: 2 times
My Contributions
if u want to open ms word ,it will work if installed on computer
u will hava to use
vb
system.diagonestic.process.start("'u will type here the exact location of programme as c/........... msword.exe <that was an example'")

i hope this helps
User is offlineProfile CardPM
+Quote Post

Jayman
RE: VB.Net Publishing And Application
20 Jun, 2008 - 01:33 PM
Post #3

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,319



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
QUOTE(gram999 @ 20 Jun, 2008 - 11:47 AM) *

Quick question: is it possible to have a MS Word Document included as part of a VB.Net project when you publish it? I have a form and when I click a command button I want a preformatted MS-Word document to open. Instead of trying to write code in VB.Net to format a blank Word document I was wondering if is possible to bundle it into the application when you publish it to CD.

If this would work is it best to put the Word template in the obj file of the project or should I set up a new project file?


Yes it is more than possible. How are you deploying your application (ie, OneClick, Setup and Deployment project)?

All you need to do is add the template file to your project. Just right-click on solution and Add Existing Item.

Depending on how you are deploying the application will determine what happens next.
User is offlineProfile CardPM
+Quote Post

gram999
RE: VB.Net Publishing And Application
20 Jun, 2008 - 06:41 PM
Post #4

D.I.C Head
**

Joined: 21 Jan, 2008
Posts: 81



Thanked: 2 times
My Contributions
Thanks Jayman. Since it is my first try at publishing an application in VB.Net I had planned to try to take advantage of the one click feature. From reading about it that seems to be pretty straight forward. I am assuming that I would add the template to my project per your guidance above and then when I used the one click method I would just make sure that the build application property is set correctly. I am assuming that the property should be set to "content" to include the template but I am not positive.
User is offlineProfile CardPM
+Quote Post

Jayman
RE: VB.Net Publishing And Application
21 Jun, 2008 - 09:58 AM
Post #5

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,319



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
From MSDN:
QUOTE
When publishing a ClickOnce application, all non-code files in the project are deployed along with the application.


Just in case you run into trouble.
Specify Which Files Are Published via ClickOnce
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 12:06AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month