473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Msword

Hi,
I have a doubt.
I have to open a predefined templet using VB.NET whenever
i apply a button click and at the same time i have to add
some data to the predefined templet using VB.NET i.e
handling the The word document through VB.NET code.
plz help me.
Regards,
krishna.
Nov 21 '05 #1
3 1277
Krishna,

Please keep in the original thread, in this way answering you give the ones
who answer more work, because they don't know what was already answered.

Cor

"krishna murthy" <ve*************@gmail.com>
Hi,
I have a doubt.
I have to open a predefined templet using VB.NET whenever
i apply a button click and at the same time i have to add
some data to the predefined templet using VB.NET i.e
handling the The word document through VB.NET code.
plz help me.
Regards,
krishna.

Nov 21 '05 #2
Hi Krishna,

You can go through the following code snippet to see if it helps you

Public Function StartWord() As Word.Application
Dim wrdTmp As Word.Application
On Error Resume Next

Set wrdTmp = GetObject(, "Word.Application")
If Err.Number <> 0 Then
'Using New here would work just the
'same as using CreateObject, but I wanted
'it to be parallel for the other function.
Set wrdTmp = CreateObject("Word.Application")
End If
Set StartWord = wrdTmp
End Function

To use the function, write code like this (after you've set a reference to
Word in your application) in your button click event:

Dim wrdApp As Word.Application
Set wrdApp = StartWord()

HTH

Mona

"krishna murthy" <ve*************@gmail.com> wrote in message
news:22****************************@phx.gbl...
Hi,
I have a doubt.
I have to open a predefined templet using VB.NET whenever
i apply a button click and at the same time i have to add
some data to the predefined templet using VB.NET i.e
handling the The word document through VB.NET code.
plz help me.
Regards,
krishna.

Nov 21 '05 #3
"krishna murthy" <ve*************@gmail.com> schrieb:
I have to open a predefined templet using VB.NET whenever
i apply a button click and at the same time i have to add
some data to the predefined templet using VB.NET i.e
handling the The word document through VB.NET code.


For samples on automating Word using .NET programming languages, take a look
here:

<URL:http://support.microsoft.com/search/?qu=word+.NET>

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

Nov 21 '05 #4

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

Similar topics

0
by: Tom Gao | last post by:
hi guys I'm trying to export an aspx page to msword. ############# I know you can do Response.Clear(); Response.ContentType="application/msword";
1
by: Eilsa | last post by:
I want to perform a full-text search for a lot of MSWord documents. So that I have to read the MSWord content and store it to the database. However, I cannot find any solution on it. What should I...
0
by: staleb | last post by:
Hi I want to open a MSWord document on the clients PC/MSWord, the solution I use now is this: <script language=vbscript runat=Server> <!-- sub OpenDoc(strLocation) set objWord =...
2
by: Guillaume Durand | last post by:
Hi, I transform XML data in an OutputStream which is open as a word document. All works fine excepted the images defined in the xsl file which are html links (src="images/image1.jpg"). So, when...
7
by: lkr | last post by:
hi is there is anyway to capture the document events of a MSWord?eg:I have to handle the event awhen WM_KEYUP or anyother events will occur. give me a solution............ thanks in advance lkr
1
by: Jason Huang | last post by:
Hi, I have no problem in creating or modifying a word document in ASP.Net, using C#. However, I don't know how to export database in SQL 2000 or MSAccess to MSWord, given in the ASP.Net and C#...
6
by: Peter | last post by:
I have to write a ASP.NET application that creates MSWord document from a template and populated with data from the webpage. (Templates can reside on the server or client's hard drive.) What is...
7
by: rinku123 | last post by:
suppose in vb form are more then one textbox which is contain data and i want i click command button it save in msword file and it can replace many times suppose just like we make report). i have...
0
by: arkark | last post by:
Hi I Need Very Urgent In My Project I access the msword, in Msword header section just i insert the text only. I unable to insert the images.how can i insert the image in msword header using asp...
1
by: Matt Curreri | last post by:
I'm trying to automate the creation of a MSWord document with C#; however, when I start creating the MSWord document, I occassionly have a MSWord dialog box displaying a warning of low memory and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.