Using Visual Studio to gather data from user and place on a Word Doc.  
Author Message
QueTek





PostPosted: Visual Studio Tools for Office, Using Visual Studio to gather data from user and place on a Word Doc. Top

Hi,

I am new to Visual Studio. I need to create and exe that will open and accept information from my users. Such as, name, client number and date of admission. I would then need to open a Word document and place this data in specific location(bookmarks) and save the document in an predefined location with a predefined name.

Any and all help would be appreciated.




Visual Studio Tools for Office23  
 
 
Kathleen McGrath - MSFT





PostPosted: Visual Studio Tools for Office, Using Visual Studio to gather data from user and place on a Word Doc. Top

Hi Terence,

You can accomplish this with Visual Studio Tools for Office (VSTO). Here's a link to some documenation that will get you started with Word tasks:

http://msdn2.microsoft.com/en-us/library/78whx7s6.aspx

And if you're unfamiliar with VSTO, you can learn more here:

http://msdn.microsoft.com/office/tool/vsto/2005/getstarted/

Kathleen McGrath
http://blogs.msdn.com/kathleen/



 
 
QueTek





PostPosted: Visual Studio Tools for Office, Using Visual Studio to gather data from user and place on a Word Doc. Top

I am running Visual Studio 2005 which includes Visual Basic 2005, Visual C# 2005, Microsoft Visual Tools for Office and Microsoft VisualWeb Developer 2005. I attempted to follow the instructions provided in the links above, however, I am unable to open a word.doc. These are the steps I took.

I Created a new Project in Visual Studio, I selected Visual Basic Windows application. I created a from "Form1" and placed a button on it

for the button code I state Me.Applications.Document.Open("C:\test.doc") when I run this I get the error that "Applicaiton is not a member of the Windowapplicaiton1.form1 . Can you give me some help, should be creating this using the word templates



 
 
Cindy Meister





PostPosted: Visual Studio Tools for Office, Using Visual Studio to gather data from user and place on a Word Doc. Top

Hi QueTek

Note that what you're trying to do is to automate Word from within a managed code solution. You can do this, but it's actually outside the official scope of this forum :-) The more appropriate place for this discussion would be

http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.officedev&lang=en&cr=US

HOWEVER, the links Kathleen gave you are for VSTO. If you're following them, I think you missed a step in the instructions. Don't they say you should look for an OFFICE folder and in that choose a Word Document project