Access object in explorer from type olExplorer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have an HTML page which contains an grid control. In JavaScript I access
the grid control like following:

document.all['componentName']

In Outlook I check on ActiveExplorers class on type "olExplorer". I added a
reference to the mshtml.lib and retrieved the ActiveExplorer content like
following:

Dim htmlDoc As MSHTML.HTMLDocument
Set htmlDoc = Application.ActiveExplorer.HTMLDocument

Now I want to access my component. My idea was to access it like in
JavaScript, but in the document the 'componentName' object was not found.

How can I access my component in the HTMLDocument in the ActiveExplorer?
Christian
 
Hi Christian,

try to use the GetElementByID method.
That should give you the object.

Hope this helps,
Greets, Helmut
 
Hi Helmut,

thanks for you help!

I tried it like following:

Set myComponent = htmlDoc.getElementById("componentName")
and
Set myComponent =
htmlDoc.documentElement.document.getElementById("componentName")

The component is not found. The component is a managed grid. Could this be
the problem? Do you have any other idea?
Thanks
Christian


Helmut Obertanner said:
Hi Christian,

try to use the GetElementByID method.
That should give you the object.

Hope this helps,
Greets, Helmut


Christian Havel said:
Hi,

I have an HTML page which contains an grid control. In JavaScript I access
the grid control like following:

document.all['componentName']

In Outlook I check on ActiveExplorers class on type "olExplorer". I added
a
reference to the mshtml.lib and retrieved the ActiveExplorer content like
following:

Dim htmlDoc As MSHTML.HTMLDocument
Set htmlDoc = Application.ActiveExplorer.HTMLDocument

Now I want to access my component. My idea was to access it like in
JavaScript, but in the document the 'componentName' object was not found.

How can I access my component in the HTMLDocument in the ActiveExplorer?
Christian
 
Hello Christian,

is the Component a Serverside component ?
Normally on the client you would only get HTML, except when you have
registered the
component locally and have embedded the component as <object....> in the
html page.

Greets, Helmut


Christian Havel said:
Hi Helmut,

thanks for you help!

I tried it like following:

Set myComponent = htmlDoc.getElementById("componentName")
and
Set myComponent =
htmlDoc.documentElement.document.getElementById("componentName")

The component is not found. The component is a managed grid. Could this be
the problem? Do you have any other idea?
Thanks
Christian


Helmut Obertanner said:
Hi Christian,

try to use the GetElementByID method.
That should give you the object.

Hope this helps,
Greets, Helmut


Christian Havel said:
Hi,

I have an HTML page which contains an grid control. In JavaScript I
access
the grid control like following:

document.all['componentName']

In Outlook I check on ActiveExplorers class on type "olExplorer". I
added
a
reference to the mshtml.lib and retrieved the ActiveExplorer content
like
following:

Dim htmlDoc As MSHTML.HTMLDocument
Set htmlDoc = Application.ActiveExplorer.HTMLDocument

Now I want to access my component. My idea was to access it like in
JavaScript, but in the document the 'componentName' object was not
found.

How can I access my component in the HTMLDocument in the
ActiveExplorer?
Christian
 
Back
Top