473,698 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Generate Microsoft Office Document?

Hi All,

I need my application to be able to generate a Microsoft Word document
(Using Visual Basic 2005). So a user clicks a button (create document) and
the Word document is created and populated with variable data.

Is there any way to do this?

Thanks.
Jun 5 '06 #1
3 1226
Look here:
http://msdn.microsoft.com/office/download/codesample/
Ryan wrote:
Hi All,

I need my application to be able to generate a Microsoft Word document
(Using Visual Basic 2005). So a user clicks a button (create document) and
the Word document is created and populated with variable data.

Is there any way to do this?

Thanks.


Jun 5 '06 #2
"Ryan" <Ty****@newsgro ups.nospam> schrieb:
I need my application to be able to generate a Microsoft Word document
(Using Visual Basic 2005). So a user clicks a button (create document)
and the Word document is created and populated with variable data.


How to automate Word from Visual Basic .NET to create a new document
<URL:http://support.microso ft.com/?scid=kb;EN-US;316383>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jun 5 '06 #3
I would rather look for XML
Brian Jones (very good site) has examples for both Excel and Word.

http://blogs.msdn.com/brian_jones/ar...27/433152.aspx

Word's xml is harder that Excel's but the effort is really worth, Ole
Automation takes ages to do anything...

-tom

Ryan ha scritto:
Hi All,

I need my application to be able to generate a Microsoft Word document
(Using Visual Basic 2005). So a user clicks a button (create document) and
the Word document is created and populated with variable data.

Is there any way to do this?

Thanks.


Jun 5 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
11292
by: Brian Kwan | last post by:
Project Description: Develop a web application to help manage sale operations. There is a function that to generate a report using data in database, which is a Word document on server and let user to download and print it out. Problem: Found that it's risky to do Word automation on server side using ASP. The layout of report is a bit complicated. I've a idea of ASP call VB to automate a Word document, but don't know whether it's work or...
3
9334
by: jijo kuruvila | last post by:
How we can Dynamically generate a MS Word document using ASP.Net? -- Jijo kuruvila trivandrum,Kerala,India
4
2429
by: Jon Westmore | last post by:
I'm using an ASP page to dynamically generate an XML document using a data source. I was thinking the concept would be similar to dynamically creating HTML but I'm running into an issue. Here is my source code: <%Response.ContentType = "text/xml" Response.CharSet="" Dim Connect ,RS, Query, Details Details = Trim(Request("Details"))
2
11465
by: William LaMartin | last post by:
I have created a program that allows for the automation of things in Word documents, like changing the values of DocVariables and the links to Excel Sheets. I did it using interoperoperatability, where, after adding a reference to Microsoft.Office.Core and a reference to Microsoft Word I declare objects as follows: Dim oWordApp As New Microsoft.Office.Interop.Word.Application, . Everything works fine on the development computer...
0
2175
by: Nitin | last post by:
How can I create and use Tables in Microsoft word document through VB .net? I've been using the following code for printing an envelope using paragraphs. Tables have to be used for better formatting. ---------------------------------------------------------------------- Dim w As New Microsoft.Office.Interop.Word.Application Dim d As Microsoft.Office.Interop.Word.Document = w.Documents.Add
4
17406
by: Mike Logan | last post by:
I would like to dynamically create a Visio diagram from .Net. I tried looking at the Visio SDK, but the samples are extremely convoluted for me to understand. Does someone have an example of creating a basic drawing with two shapes connected? I can then expand that example to include other elements. Also, my plan is for this project to be an ASP.Net website. Is Visio required to be on the web server in order to generate the Visio...
3
5519
by: Maxwell2006 | last post by:
Hi, We have Excel 2003 templates and we need to automatically generate excel 2003 xls files based on our SQL server database tables' data. Since we need to generate the xls files at out asp.net server side, I assume we cannot use excel automation based on the license agreement. What would b the best way to do that? Any help would be appreciated,
18
25720
by: John Bailo | last post by:
I want to write an Excel file (.xls format) from some database data. I don't want to use Excel.exe because of all the automation and security issues. Does Microsoft document the .xls file format anywhere? Is there any c# class that will let me do this?
4
1989
by: =?Utf-8?B?QXJ0?= | last post by:
Hello, I saw this posting and it is the closest place to ask this question. I am simply trying to create a Word document from a VB application I am wrting with Visual Studio 2005. I cut a pasted a simple routine within the 'click' sub-routine and I'm simple having a problem with resolving the statement 'Dim objWord As New Word.Application' where it is complaining about 'Word.Application' is not defined.
0
8672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9155
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8858
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5859
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2322
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.