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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marcel

    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


  • Marcel

    #2
    Re: Trying to use the Word Application object in Microsoft Visual Basic .NET

    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.kollenaar@ho me.nl> schreef in bericht
    news:32e3pfF3m6 n07U1@individua l.net...[color=blue]
    > 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
    >
    >[/color]


    Comment

    • Marcel

      #3
      Re: Trying to use the Word Application object in Microsoft Visual Basic .NET

      At last I found it. Thanks anyway.

      Marcel

      "Marcel" <m.kollenaar@ho me.nl> schreef in bericht
      news:32e3pfF3m6 n07U1@individua l.net...[color=blue]
      > 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
      >
      >[/color]


      Comment

      Working...