473,320 Members | 1,848 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,320 software developers and data experts.

Word Interop and VB Express

Hi,

I searched high and low for an example on how to establish a link with Word
using VB Express and the .Net Framework 2.0 in it. The code should link with
the running instance if one's there or by creating a new instance if not.
And some robustness as to when the user closes Word midstream for some
reason.

The idea is to use Word with a set of templates to create a more
sophisticated billing/quoting paper output engine while allowing pre-print
manual editing.

Some sample code :
Dim w As Microsoft.Office.Interop.Word.Application
w = New Microsoft.Office.Interop.Word.Application
w.Documents.Add(WORDTEMPLATEROOT & "\" & WORDTEMPLATEQUOTE)
....

The above (1) creates a new instance even when an instance already runs and
(2) crashes if Word is manually closed and the .Add method is called again
later in the software.

I struggle a bit from my VB6/COM to VB .Net migration.
Thanks for any suggestions.

Philip

Nov 21 '05 #1
0 785

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

Similar topics

1
by: Bob N5 | last post by:
I am working on an application that uses interop to do some simple operations with both Excel and Word. I have most of functionality working, but ran into issues on making things work with both...
0
by: Mico | last post by:
Does anyone know of any way to indent a table using the C# Word interop assembly? Cheers, Mark.
3
by: Dustin van de Sande | last post by:
I'm developing a ASP.NET 2.0 web application which exports and imports Word documents. The functionality is implemented in a DLL project which is referenced by the web application. In the DLL...
7
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed...
0
by: R Reyes | last post by:
ISSUE (reposted) =========================== Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? For many people, they say they add the...
2
by: DougS | last post by:
I have an ASP.Net 1.1 app running on my intranet. I want to be able to output a report in Word. I have a .Net dll written for a similar WinForms application. Can I install the Word Interop...
2
by: Derek Hart | last post by:
I am using late bound Microsoft Word integration with a vb.net winforms application. If I run code such as the following: Dim objWord As Object Dim objWrdDoc As Object Dim count As Integer...
0
shahjapan
by: shahjapan | last post by:
Can anyone tell me using C# or VB.NET Word Interop how to insert sub Rows in a Cell. Regards, Japan Shah
1
by: =?ISO-8859-1?Q?S=F8ren?= | last post by:
Hi guys I got the following code: ------------------------------------------------------- Dim Word As New Microsoft.Office.Interop.Word.Application Dim Document As...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.