Access object in explorer from type olExplorer

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
 
H

Helmut Obertanner

Hi Christian,

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

Hope this helps,
Greets, Helmut
 
G

Guest

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
 
H

Helmut Obertanner

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top