473,786 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trying to use the Word Application object in Microsoft Visual Basic .NET

Hi,

I'm using Microsoft Visual Basic .NET and want to reference the
ThisApplication variable but cannot get to it or find the OfficeCodeBehin d
class. Is this a shortcomming of the fact that I have Microsoft Visual Basic
and not Visual Studio .NET?

On page:
http://msdn.microsoft.com/library/de...tionobject.asp I
read:
If you are working in Word, the Application object is automatically created
for you, and you can use the Application property to return a reference to
the Word Application object. When you are creating your solution in Visual
Studio .NET, you can use the ThisApplication variable defined for you within
the OfficeCodeBehin d class. IntelliSense displays the list of collections,
methods, and properties for the Application object.

When you are referring to objects and collections beneath the Application
object, you do not need to explicitly refer to the Application object. For
example, you can refer to the active document without the Application object
by using the built-in ThisDocument property. ThisDocument refers to the
active document, and allows you to work with members of the Document object.

Regards,

Marcel
Jul 21 '05 #1
2 5603
I can't find the Microsoft Word 9.0 or 10.0 object library also, it is not
present in the COM Components tab.

"Marcel" <m.*********@ho me.nl> schreef in bericht
news:32******** *****@individua l.net...
Hi,

I'm using Microsoft Visual Basic .NET and want to reference the
ThisApplication variable but cannot get to it or find the OfficeCodeBehin d
class. Is this a shortcomming of the fact that I have Microsoft Visual
Basic and not Visual Studio .NET?

On page:
http://msdn.microsoft.com/library/de...tionobject.asp I
read:
If you are working in Word, the Application object is automatically
created for you, and you can use the Application property to return a
reference to the Word Application object. When you are creating your
solution in Visual Studio .NET, you can use the ThisApplication variable
defined for you within the OfficeCodeBehin d class. IntelliSense displays
the list of collections, methods, and properties for the Application
object.

When you are referring to objects and collections beneath the Application
object, you do not need to explicitly refer to the Application object. For
example, you can refer to the active document without the Application
object by using the built-in ThisDocument property. ThisDocument refers to
the active document, and allows you to work with members of the Document
object.

Regards,

Marcel

Jul 21 '05 #2
At last I found it. Thanks anyway.

Marcel

"Marcel" <m.*********@ho me.nl> schreef in bericht
news:32******** *****@individua l.net...
Hi,

I'm using Microsoft Visual Basic .NET and want to reference the
ThisApplication variable but cannot get to it or find the OfficeCodeBehin d
class. Is this a shortcomming of the fact that I have Microsoft Visual
Basic and not Visual Studio .NET?

On page:
http://msdn.microsoft.com/library/de...tionobject.asp I
read:
If you are working in Word, the Application object is automatically
created for you, and you can use the Application property to return a
reference to the Word Application object. When you are creating your
solution in Visual Studio .NET, you can use the ThisApplication variable
defined for you within the OfficeCodeBehin d class. IntelliSense displays
the list of collections, methods, and properties for the Application
object.

When you are referring to objects and collections beneath the Application
object, you do not need to explicitly refer to the Application object. For
example, you can refer to the active document without the Application
object by using the built-in ThisDocument property. ThisDocument refers to
the active document, and allows you to work with members of the Document
object.

Regards,

Marcel

Jul 21 '05 #3

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

Similar topics

4
2060
by: Christian Blackburn | last post by:
Hi Gang, I saw this for sale online: Microsoft Visual Basic.NET Deluxe Learning Edition Version 2003. I'm wondering is the CD that's bundled with the learning edition just a digitized version of the book or is it an interactive tutorial? Thanks, Christian Blackburn
2
1577
by: Sandra | last post by:
Hi there! Hope I have the right chat forum for this. Anyway, if someone could help me, I would really appreciate it. I have a few Microsoft Word XP files and here is what's happening... These files were sent to me from some other user, and when I go to open the files, here is what happens... A Microsoft Visual Basic dialog box opens up with the
2
358
by: Marcel | last post by:
Hi, I'm using Microsoft Visual Basic .NET and want to reference the ThisApplication variable but cannot get to it or find the OfficeCodeBehind class. Is this a shortcomming of the fact that I have Microsoft Visual Basic and not Visual Studio .NET? On page: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrgrfapplicationobject.asp I read:
1
1915
by: nuoo | last post by:
Programming Microsoft SQL Server 2000 with Microsoft Visual Basic .NET Learn how to turn data into solutions with SQL Server 2000, Visual Basic .NET, and XML. Get a fundamental grasp of SQL Server 2000 data access, data manipulation, and data definition T-SQL programming techniques, Visual Basic .NET language enhancements, Microsoft Visual Studio .NET integrated development environment advances, and the state-of-the-art technologies of...
3
1696
by: Pitaridis Aristotelis | last post by:
Is there any way to create setup for a project made in Microsoft Visual Basic 2005 Express Edition
1
1894
by: theTone | last post by:
Hi all, We have noticed that using the Word OLE is much slower on dual processor machines. Limiting the processor affinity to one processor helps. So, I want to set the affinity in my C# code. I succeeded with the following code: oWord = new Word.Application(); Process wordProcesses = Process.GetProcessesByName("WINWORD");
1
2905
by: =?Utf-8?B?c3VydHVyeg==?= | last post by:
Hi, I'm using VB2005 + Office XP Enterprise. If you create a Word.Application object, you risk a memory leak if your application crashes because Word.Application is an unmanaged COM Interop object. I want to encapsulate the Word.Application in a Class that implements IDisposable to avoid this potential memory leak. Here is the code I have:
0
1359
by: =?Utf-8?B?Rk5BSUdJUw==?= | last post by:
Does anybody know of a good tutorial, or somewhere where I can learn about editing with Microsoft Visual Basic? I'm trying to edit fillable forms, and macros in Microsoft Excel 2007. Thank you.
1
4122
by: zufie | last post by:
I am trying to run a report, but I get the Microsoft Visual Basic Run- Time Error '2471': Unknown I googled the error and found that the Run-Time Error 2471 points to an "Item in query". Here is the code for my query for this report: SELECT .*, .QualityAssuarnce, .CallDate FROM INNER JOIN ON . = .
0
9655
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
10363
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...
0
10169
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6749
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
5398
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...
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
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.