How do you create an Outlook application object in my web page using
VBscript? When I do the following code, I received an error "ActiveX
component can't create object: 'Outlook.Application' ". The same code runs
fine in VB 6. Thank you.

<script language="VBScript">
set objOLApp = CreateObject("Outlook.Application")
</script>

Re: How do you create an Outlook application object in my web page using VBscript? by Ray

Ray
Wed Jul 21 11:11:53 CDT 2004

You'd need some pretty low security settings in your zone in your browser
for that to be allowed. Is this for a public site? An intranet? Just for
yourself?

Ray at work

"Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
news:eq$HpvzbEHA.2972@TK2MSFTNGP12.phx.gbl...
> How do you create an Outlook application object in my web page using
> VBscript? When I do the following code, I received an error "ActiveX
> component can't create object: 'Outlook.Application' ". The same code runs
> fine in VB 6. Thank you.
>
> <script language="VBScript">
> set objOLApp = CreateObject("Outlook.Application")
> </script>
>
>



Re: How do you create an Outlook application object in my web page using VBscript? by Fie

Fie
Wed Jul 21 11:40:08 CDT 2004

Thank you for your quick reply.
It is for our clients' intranet site.
You are correct, when I set the security settings to be the following, I am
able to get in to the page with no error.
"Download unsigned ActiveX controls" to Disable
"Initialize and script ActiveX controls not marked as safe" to Prompt.

But, I do not think this setup will be acceptable at our clients' intranet
site.
We need to create a task and appointment (calendar) on the client's machine
through a website. My colleague says there is a website that can download
your flight itenarary to your Outlook.
I would greatly appreciate your suggestion on how to do this using either
Outlook application object or other objects.

Thank you very much.

"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:ez9ri1zbEHA.796@TK2MSFTNGP09.phx.gbl...
> You'd need some pretty low security settings in your zone in your browser
> for that to be allowed. Is this for a public site? An intranet? Just
for
> yourself?
>
> Ray at work
>
> "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> news:eq$HpvzbEHA.2972@TK2MSFTNGP12.phx.gbl...
> > How do you create an Outlook application object in my web page using
> > VBscript? When I do the following code, I received an error "ActiveX
> > component can't create object: 'Outlook.Application' ". The same code
runs
> > fine in VB 6. Thank you.
> >
> > <script language="VBScript">
> > set objOLApp = CreateObject("Outlook.Application")
> > </script>
> >
> >
>
>



Re: How do you create an Outlook application object in my web page using VBscript? by MikeB

MikeB
Wed Jul 21 11:56:00 CDT 2004


"Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
news:%2323NbF0bEHA.1656@TK2MSFTNGP09.phx.gbl...
> Thank you for your quick reply.
> It is for our clients' intranet site.

Do a search in this NG for some stuff Michael Harris posted that might be
helpful. It has been awhile, but I seem to recall using HTA either in place of
or in concert with ASP on an Intranet.

The underlying reason for my suggestion is that with HTA, you don't have to deal
with the security settings, allowing the users to use their browsers "Inter" and
"Intra" net without concern of the security settings.

> You are correct, when I set the security settings to be the following, I am
> able to get in to the page with no error.
> "Download unsigned ActiveX controls" to Disable
> "Initialize and script ActiveX controls not marked as safe" to Prompt.
>
> But, I do not think this setup will be acceptable at our clients' intranet
> site.
> We need to create a task and appointment (calendar) on the client's machine
> through a website. My colleague says there is a website that can download
> your flight itenarary to your Outlook.
> I would greatly appreciate your suggestion on how to do this using either
> Outlook application object or other objects.
>
> Thank you very much.
>
> "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
> message news:ez9ri1zbEHA.796@TK2MSFTNGP09.phx.gbl...
> > You'd need some pretty low security settings in your zone in your browser
> > for that to be allowed. Is this for a public site? An intranet? Just
> for
> > yourself?
> >
> > Ray at work
> >
> > "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> > news:eq$HpvzbEHA.2972@TK2MSFTNGP12.phx.gbl...
> > > How do you create an Outlook application object in my web page using
> > > VBscript? When I do the following code, I received an error "ActiveX
> > > component can't create object: 'Outlook.Application' ". The same code
> runs
> > > fine in VB 6. Thank you.
> > >
> > > <script language="VBScript">
> > > set objOLApp = CreateObject("Outlook.Application")
> > > </script>
> > >
> > >
> >
> >
>
>



Re: How do you create an Outlook application object in my web page using VBscript? by Fie

Fie
Wed Jul 21 12:04:14 CDT 2004

Thank you.
I will look for Micheal Harris postings.
What is HTA ?

Thanks.

"MikeB" <m.byerleyATVerizontDOTnet> wrote in message
news:e%237I4N0bEHA.2292@TK2MSFTNGP09.phx.gbl...
>
> "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> news:%2323NbF0bEHA.1656@TK2MSFTNGP09.phx.gbl...
> > Thank you for your quick reply.
> > It is for our clients' intranet site.
>
> Do a search in this NG for some stuff Michael Harris posted that might be
> helpful. It has been awhile, but I seem to recall using HTA either in
place of
> or in concert with ASP on an Intranet.
>
> The underlying reason for my suggestion is that with HTA, you don't have
to deal
> with the security settings, allowing the users to use their browsers
"Inter" and
> "Intra" net without concern of the security settings.
>
> > You are correct, when I set the security settings to be the following, I
am
> > able to get in to the page with no error.
> > "Download unsigned ActiveX controls" to Disable
> > "Initialize and script ActiveX controls not marked as safe" to Prompt.
> >
> > But, I do not think this setup will be acceptable at our clients'
intranet
> > site.
> > We need to create a task and appointment (calendar) on the client's
machine
> > through a website. My colleague says there is a website that can
download
> > your flight itenarary to your Outlook.
> > I would greatly appreciate your suggestion on how to do this using
either
> > Outlook application object or other objects.
> >
> > Thank you very much.
> >
> > "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
> > message news:ez9ri1zbEHA.796@TK2MSFTNGP09.phx.gbl...
> > > You'd need some pretty low security settings in your zone in your
browser
> > > for that to be allowed. Is this for a public site? An intranet?
Just
> > for
> > > yourself?
> > >
> > > Ray at work
> > >
> > > "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> > > news:eq$HpvzbEHA.2972@TK2MSFTNGP12.phx.gbl...
> > > > How do you create an Outlook application object in my web page using
> > > > VBscript? When I do the following code, I received an error "ActiveX
> > > > component can't create object: 'Outlook.Application' ". The same
code
> > runs
> > > > fine in VB 6. Thank you.
> > > >
> > > > <script language="VBScript">
> > > > set objOLApp = CreateObject("Outlook.Application")
> > > > </script>
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: How do you create an Outlook application object in my web page using VBscript? by MikeB

MikeB
Wed Jul 21 12:12:37 CDT 2004


"Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
news:u%23Rq4S0bEHA.3476@tk2msftngp13.phx.gbl...
> Thank you.
> I will look for Micheal Harris postings.
> What is HTA ?

HyperTextApplication:

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/hta/overview/htaoverview.asp

> Thanks.
>
> "MikeB" <m.byerleyATVerizontDOTnet> wrote in message
> news:e%237I4N0bEHA.2292@TK2MSFTNGP09.phx.gbl...
> >
> > "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> > news:%2323NbF0bEHA.1656@TK2MSFTNGP09.phx.gbl...
> > > Thank you for your quick reply.
> > > It is for our clients' intranet site.
> >
> > Do a search in this NG for some stuff Michael Harris posted that might be
> > helpful. It has been awhile, but I seem to recall using HTA either in
> place of
> > or in concert with ASP on an Intranet.
> >
> > The underlying reason for my suggestion is that with HTA, you don't have
> to deal
> > with the security settings, allowing the users to use their browsers
> "Inter" and
> > "Intra" net without concern of the security settings.
> >
> > > You are correct, when I set the security settings to be the following, I
> am
> > > able to get in to the page with no error.
> > > "Download unsigned ActiveX controls" to Disable
> > > "Initialize and script ActiveX controls not marked as safe" to Prompt.
> > >
> > > But, I do not think this setup will be acceptable at our clients'
> intranet
> > > site.
> > > We need to create a task and appointment (calendar) on the client's
> machine
> > > through a website. My colleague says there is a website that can
> download
> > > your flight itenarary to your Outlook.
> > > I would greatly appreciate your suggestion on how to do this using
> either
> > > Outlook application object or other objects.
> > >
> > > Thank you very much.
> > >
> > > "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
> > > message news:ez9ri1zbEHA.796@TK2MSFTNGP09.phx.gbl...
> > > > You'd need some pretty low security settings in your zone in your
> browser
> > > > for that to be allowed. Is this for a public site? An intranet?
> Just
> > > for
> > > > yourself?
> > > >
> > > > Ray at work
> > > >
> > > > "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> > > > news:eq$HpvzbEHA.2972@TK2MSFTNGP12.phx.gbl...
> > > > > How do you create an Outlook application object in my web page using
> > > > > VBscript? When I do the following code, I received an error "ActiveX
> > > > > component can't create object: 'Outlook.Application' ". The same
> code
> > > runs
> > > > > fine in VB 6. Thank you.
> > > > >
> > > > > <script language="VBScript">
> > > > > set objOLApp = CreateObject("Outlook.Application")
> > > > > </script>
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: How do you create an Outlook application object in my web page using VBscript? by Fie

Fie
Wed Jul 21 14:09:21 CDT 2004

Thank you very much.
I have a problem where I need to pass some variables/values to the HTA.
In ASP pages, I could either do
sValue = Request.Form("txtBox1")
or
sValue = session("txtBox1")

Can I pass a value to the HTA ?

Thank you.

"MikeB" <m.byerleyATVerizontDOTnet> wrote in message
news:uGkuKX0bEHA.3476@tk2msftngp13.phx.gbl...
>
> "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> news:u%23Rq4S0bEHA.3476@tk2msftngp13.phx.gbl...
> > Thank you.
> > I will look for Micheal Harris postings.
> > What is HTA ?
>
> HyperTextApplication:
>
>
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/hta/overview/htaoverview.asp
>
> > Thanks.
> >
> > "MikeB" <m.byerleyATVerizontDOTnet> wrote in message
> > news:e%237I4N0bEHA.2292@TK2MSFTNGP09.phx.gbl...
> > >
> > > "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> > > news:%2323NbF0bEHA.1656@TK2MSFTNGP09.phx.gbl...
> > > > Thank you for your quick reply.
> > > > It is for our clients' intranet site.
> > >
> > > Do a search in this NG for some stuff Michael Harris posted that might
be
> > > helpful. It has been awhile, but I seem to recall using HTA either in
> > place of
> > > or in concert with ASP on an Intranet.
> > >
> > > The underlying reason for my suggestion is that with HTA, you don't
have
> > to deal
> > > with the security settings, allowing the users to use their browsers
> > "Inter" and
> > > "Intra" net without concern of the security settings.
> > >
> > > > You are correct, when I set the security settings to be the
following, I
> > am
> > > > able to get in to the page with no error.
> > > > "Download unsigned ActiveX controls" to Disable
> > > > "Initialize and script ActiveX controls not marked as safe" to
Prompt.
> > > >
> > > > But, I do not think this setup will be acceptable at our clients'
> > intranet
> > > > site.
> > > > We need to create a task and appointment (calendar) on the client's
> > machine
> > > > through a website. My colleague says there is a website that can
> > download
> > > > your flight itenarary to your Outlook.
> > > > I would greatly appreciate your suggestion on how to do this using
> > either
> > > > Outlook application object or other objects.
> > > >
> > > > Thank you very much.
> > > >
> > > > "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote
in
> > > > message news:ez9ri1zbEHA.796@TK2MSFTNGP09.phx.gbl...
> > > > > You'd need some pretty low security settings in your zone in your
> > browser
> > > > > for that to be allowed. Is this for a public site? An intranet?
> > Just
> > > > for
> > > > > yourself?
> > > > >
> > > > > Ray at work
> > > > >
> > > > > "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> > > > > news:eq$HpvzbEHA.2972@TK2MSFTNGP12.phx.gbl...
> > > > > > How do you create an Outlook application object in my web page
using
> > > > > > VBscript? When I do the following code, I received an error
"ActiveX
> > > > > > component can't create object: 'Outlook.Application' ". The same
> > code
> > > > runs
> > > > > > fine in VB 6. Thank you.
> > > > > >
> > > > > > <script language="VBScript">
> > > > > > set objOLApp = CreateObject("Outlook.Application")
> > > > > > </script>
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: How do you create an Outlook application object in my web page using VBscript? by Michael

Michael
Wed Jul 21 18:49:13 CDT 2004

Fie Fie Niles wrote:
> Thank you.
> I will look for Micheal Harris postings.
> What is HTA ?

...re-posted here for you convenience...

You can use any COM object inside IE hosted script provided you want to deal
with the IE enforced security model regarding "unsafe ActiveX...". Whether
the user allows this is strictly up to them. There is no way to do this
silently without some prior acknowledgement and permission from the end
user...

Whether you use JScript's new ActiveXObject() or VBScript's CreateObject()
or whether you get the prompt or the failure, the issues are still the
same...

Q195826 - PRB: CreateObject Fails from Client-Side Scripts
http://support.microsoft.com/default.aspx?kbid=195826

For an Intranet, network share, or local hard drive scenario, you can simply
use HTAs instead.

Note that an HTA solution is appropriate ***only*** for non-intERnet
scenarios. End users should never be expected to execute an HTA delivered
from an intERnet source any more than expecting them to execute an EXE,
unless they have an extremely high level of trust for the originating site.

That's why accessing an HTA via IE is treated exactly like accessing an EXE.
The end user is prompted to save or open (execute) the HTA, the exact same
prompt as for as any other file type that will execute on the client.

Converting to an HTA can be as simple as saving the file with .hta instead
of .htm as the extension. .hta files are hosted by mshta.exe rather than
iexplore.exe, and have a security model comparable to a conventional Windows
desktop application. Of course accepting and executing an HTA is also up to
the end user...

If I need that kind of access to client resources, I develop/deploy an HTA
with the actual content hosted as ASP on an IIS server or straight from an
ordinary network file share...

Introduction to HTML Applications (HTAs)
http://msdn.microsoft.com/workshop/author/hta/overview/htaoverview.asp
HTA Reference
http://msdn.microsoft.com/workshop/author/hta/reference/hta_ref_entry.asp

The HTAs I deploy follow a hybrid deployment model. The HTA itself is simply
a wrapper for a trusted iframe hosting an ASP page. The iframe page doesn't
have to be asp. It could be ordinary htm, php, etc., whatever the server
supports.

With this model, it doesn't matter if the user saves/runs a local copy of
the HTA - the real content is delivered via http from a web server. To test
changes to the ASP content, I keep a local copy of the HTA with the base
href URL pointing to a development web server instead of the production
server.

You can use the same model for a network file server deployment as well.
Just change the base href to "\\YourFileServer" and iframe src to
"\YourShare\YourPath\YourPage.htm".

<html>
<head><title>YourTitle</title>
<base href="http://YourProductionServer">
<hta:application id="YourAppId"
applicationName="YourAppName"
singleInstance="yes"
showInTaskbar="yes"
borderStyle="fixed"
/>
</head>
<body scroll="no" style="margin:0px">
<iframe width="100%" height="100%"
frameborder="no" border="0"
marginheight="0" marginwidth="0"
application="yes"
src="/YourSite/YourPath/YourPage.asp"
></iframe>
</body>
</html>




--
Michael Harris
Microsoft.MVP.Scripting
Sammamish WA US


Re: How do you create an Outlook application object in my web page using VBscript? by MikeB

MikeB
Wed Jul 21 19:15:54 CDT 2004


"Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
news:e5nY0Y1bEHA.904@TK2MSFTNGP09.phx.gbl...
> Thank you very much.
> I have a problem where I need to pass some variables/values to the HTA.
> In ASP pages, I could either do
> sValue = Request.Form("txtBox1")
> or
> sValue = session("txtBox1")
>
> Can I pass a value to the HTA ?

In the HtaApplication Parameters:
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="AltDialog"
CAPTION="yes"
SYSMENU="yes"
MAXIMIZEBUTTON="no"
MINIMIZEBUTTON="no"
SHOWINTASKBAR="no"
SINGLEINSTANCE="yes"
SCROLL="NO"
BORDER="thin"
BORDERSTYLE="dialog"
VERSION="1.0"
WINDOWSTATE="normal"
ICON="time.ico">

the oHTA is the HTA Application Object, and one of its' properties is
"commandLine", so you can pass in arguments in to the HTA via the command line.
With multiple arguments, separate them with a character that appropriatlly will
not be a part of the arguments and then parse it accordingly.



>
> Thank you.
>
> "MikeB" <m.byerleyATVerizontDOTnet> wrote in message
> news:uGkuKX0bEHA.3476@tk2msftngp13.phx.gbl...
> >
> > "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> > news:u%23Rq4S0bEHA.3476@tk2msftngp13.phx.gbl...
> > > Thank you.
> > > I will look for Micheal Harris postings.
> > > What is HTA ?
> >
> > HyperTextApplication:
> >
> >
>
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/hta/overview/htaoverview.asp
> >
> > > Thanks.
> > >
> > > "MikeB" <m.byerleyATVerizontDOTnet> wrote in message
> > > news:e%237I4N0bEHA.2292@TK2MSFTNGP09.phx.gbl...
> > > >
> > > > "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> > > > news:%2323NbF0bEHA.1656@TK2MSFTNGP09.phx.gbl...
> > > > > Thank you for your quick reply.
> > > > > It is for our clients' intranet site.
> > > >
> > > > Do a search in this NG for some stuff Michael Harris posted that might
> be
> > > > helpful. It has been awhile, but I seem to recall using HTA either in
> > > place of
> > > > or in concert with ASP on an Intranet.
> > > >
> > > > The underlying reason for my suggestion is that with HTA, you don't
> have
> > > to deal
> > > > with the security settings, allowing the users to use their browsers
> > > "Inter" and
> > > > "Intra" net without concern of the security settings.
> > > >
> > > > > You are correct, when I set the security settings to be the
> following, I
> > > am
> > > > > able to get in to the page with no error.
> > > > > "Download unsigned ActiveX controls" to Disable
> > > > > "Initialize and script ActiveX controls not marked as safe" to
> Prompt.
> > > > >
> > > > > But, I do not think this setup will be acceptable at our clients'
> > > intranet
> > > > > site.
> > > > > We need to create a task and appointment (calendar) on the client's
> > > machine
> > > > > through a website. My colleague says there is a website that can
> > > download
> > > > > your flight itenarary to your Outlook.
> > > > > I would greatly appreciate your suggestion on how to do this using
> > > either
> > > > > Outlook application object or other objects.
> > > > >
> > > > > Thank you very much.
> > > > >
> > > > > "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote
> in
> > > > > message news:ez9ri1zbEHA.796@TK2MSFTNGP09.phx.gbl...
> > > > > > You'd need some pretty low security settings in your zone in your
> > > browser
> > > > > > for that to be allowed. Is this for a public site? An intranet?
> > > Just
> > > > > for
> > > > > > yourself?
> > > > > >
> > > > > > Ray at work
> > > > > >
> > > > > > "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> > > > > > news:eq$HpvzbEHA.2972@TK2MSFTNGP12.phx.gbl...
> > > > > > > How do you create an Outlook application object in my web page
> using
> > > > > > > VBscript? When I do the following code, I received an error
> "ActiveX
> > > > > > > component can't create object: 'Outlook.Application' ". The same
> > > code
> > > > > runs
> > > > > > > fine in VB 6. Thank you.
> > > > > > >
> > > > > > > <script language="VBScript">
> > > > > > > set objOLApp = CreateObject("Outlook.Application")
> > > > > > > </script>
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: How do you create an Outlook application object in my web page using VBscript? by gg

gg
Wed Jul 21 20:42:45 CDT 2004

what if one 'Sign" the activex and change setting of IE to allow Signed
Activex in the intranet zone?

I guess there are problems. esp. if selfcert is used. Using selfcert to
get the certificate, someone will have to install the certificate or let the
user accept that from a prompt.

"Michael Harris (MVP)" <mikhar at mvps dot org> wrote in message
news:eC1dU13bEHA.3944@tk2msftngp13.phx.gbl...
> Fie Fie Niles wrote:
> > Thank you.
> > I will look for Micheal Harris postings.
> > What is HTA ?
>
> ...re-posted here for you convenience...
>
> You can use any COM object inside IE hosted script provided you want to
deal
> with the IE enforced security model regarding "unsafe ActiveX...". Whether
> the user allows this is strictly up to them. There is no way to do this
> silently without some prior acknowledgement and permission from the end
> user...
>
> Whether you use JScript's new ActiveXObject() or VBScript's CreateObject()
> or whether you get the prompt or the failure, the issues are still the
> same...
>
> Q195826 - PRB: CreateObject Fails from Client-Side Scripts
> http://support.microsoft.com/default.aspx?kbid=195826
>
> For an Intranet, network share, or local hard drive scenario, you can
simply
> use HTAs instead.
>
> Note that an HTA solution is appropriate ***only*** for non-intERnet
> scenarios. End users should never be expected to execute an HTA delivered
> from an intERnet source any more than expecting them to execute an EXE,
> unless they have an extremely high level of trust for the originating
site.
>
> That's why accessing an HTA via IE is treated exactly like accessing an
EXE.
> The end user is prompted to save or open (execute) the HTA, the exact same
> prompt as for as any other file type that will execute on the client.
>
> Converting to an HTA can be as simple as saving the file with .hta instead
> of .htm as the extension. .hta files are hosted by mshta.exe rather than
> iexplore.exe, and have a security model comparable to a conventional
Windows
> desktop application. Of course accepting and executing an HTA is also up
to
> the end user...
>
> If I need that kind of access to client resources, I develop/deploy an HTA
> with the actual content hosted as ASP on an IIS server or straight from an
> ordinary network file share...
>
> Introduction to HTML Applications (HTAs)
> http://msdn.microsoft.com/workshop/author/hta/overview/htaoverview.asp
> HTA Reference
> http://msdn.microsoft.com/workshop/author/hta/reference/hta_ref_entry.asp
>
> The HTAs I deploy follow a hybrid deployment model. The HTA itself is
simply
> a wrapper for a trusted iframe hosting an ASP page. The iframe page
doesn't
> have to be asp. It could be ordinary htm, php, etc., whatever the server
> supports.
>
> With this model, it doesn't matter if the user saves/runs a local copy of
> the HTA - the real content is delivered via http from a web server. To
test
> changes to the ASP content, I keep a local copy of the HTA with the base
> href URL pointing to a development web server instead of the production
> server.
>
> You can use the same model for a network file server deployment as well.
> Just change the base href to "\\YourFileServer" and iframe src to
> "\YourShare\YourPath\YourPage.htm".
>
> <html>
> <head><title>YourTitle</title>
> <base href="http://YourProductionServer">
> <hta:application id="YourAppId"
> applicationName="YourAppName"
> singleInstance="yes"
> showInTaskbar="yes"
> borderStyle="fixed"
> />
> </head>
> <body scroll="no" style="margin:0px">
> <iframe width="100%" height="100%"
> frameborder="no" border="0"
> marginheight="0" marginwidth="0"
> application="yes"
> src="/YourSite/YourPath/YourPage.asp"
> ></iframe>
> </body>
> </html>
>
>
>
>
> --
> Michael Harris
> Microsoft.MVP.Scripting
> Sammamish WA US
>



Re: How do you create an Outlook application object in my web page using VBscript? by Michael

Michael
Wed Jul 21 23:02:17 CDT 2004

gg wrote:
> what if one 'Sign" the activex and change setting of IE to allow
> Signed Activex in the intranet zone?
>
> I guess there are problems. esp. if selfcert is used. Using
> selfcert to get the certificate, someone will have to install the
> certificate or let the user accept that from a prompt.


You certainly could be sign something you wrote yourself, but it's hardly
appropriate to sign executables that aren't yours (assuming it's even
possible)...


--
Michael Harris
Microsoft.MVP.Scripting
Sammamish WA US


Re: How do you create an Outlook application object in my web page using VBscript? by Fie

Fie
Thu Jul 22 12:24:35 CDT 2004

Thank you very much for your posting.


"Michael Harris (MVP)" <mikhar at mvps dot org> wrote in message
news:eC1dU13bEHA.3944@tk2msftngp13.phx.gbl...
> Fie Fie Niles wrote:
> > Thank you.
> > I will look for Micheal Harris postings.
> > What is HTA ?
>
> ...re-posted here for you convenience...
>
> You can use any COM object inside IE hosted script provided you want to
deal
> with the IE enforced security model regarding "unsafe ActiveX...". Whether
> the user allows this is strictly up to them. There is no way to do this
> silently without some prior acknowledgement and permission from the end
> user...
>
> Whether you use JScript's new ActiveXObject() or VBScript's CreateObject()
> or whether you get the prompt or the failure, the issues are still the
> same...
>
> Q195826 - PRB: CreateObject Fails from Client-Side Scripts
> http://support.microsoft.com/default.aspx?kbid=195826
>
> For an Intranet, network share, or local hard drive scenario, you can
simply
> use HTAs instead.
>
> Note that an HTA solution is appropriate ***only*** for non-intERnet
> scenarios. End users should never be expected to execute an HTA delivered
> from an intERnet source any more than expecting them to execute an EXE,
> unless they have an extremely high level of trust for the originating
site.
>
> That's why accessing an HTA via IE is treated exactly like accessing an
EXE.
> The end user is prompted to save or open (execute) the HTA, the exact same
> prompt as for as any other file type that will execute on the client.
>
> Converting to an HTA can be as simple as saving the file with .hta instead
> of .htm as the extension. .hta files are hosted by mshta.exe rather than
> iexplore.exe, and have a security model comparable to a conventional
Windows
> desktop application. Of course accepting and executing an HTA is also up
to
> the end user...
>
> If I need that kind of access to client resources, I develop/deploy an HTA
> with the actual content hosted as ASP on an IIS server or straight from an
> ordinary network file share...
>
> Introduction to HTML Applications (HTAs)
> http://msdn.microsoft.com/workshop/author/hta/overview/htaoverview.asp
> HTA Reference
> http://msdn.microsoft.com/workshop/author/hta/reference/hta_ref_entry.asp
>
> The HTAs I deploy follow a hybrid deployment model. The HTA itself is
simply
> a wrapper for a trusted iframe hosting an ASP page. The iframe page
doesn't
> have to be asp. It could be ordinary htm, php, etc., whatever the server
> supports.
>
> With this model, it doesn't matter if the user saves/runs a local copy of
> the HTA - the real content is delivered via http from a web server. To
test
> changes to the ASP content, I keep a local copy of the HTA with the base
> href URL pointing to a development web server instead of the production
> server.
>
> You can use the same model for a network file server deployment as well.
> Just change the base href to "\\YourFileServer" and iframe src to
> "\YourShare\YourPath\YourPage.htm".
>
> <html>
> <head><title>YourTitle</title>
> <base href="http://YourProductionServer">
> <hta:application id="YourAppId"
> applicationName="YourAppName"
> singleInstance="yes"
> showInTaskbar="yes"
> borderStyle="fixed"
> />
> </head>
> <body scroll="no" style="margin:0px">
> <iframe width="100%" height="100%"
> frameborder="no" border="0"
> marginheight="0" marginwidth="0"
> application="yes"
> src="/YourSite/YourPath/YourPage.asp"
> ></iframe>
> </body>
> </html>
>
>
>
>
> --
> Michael Harris
> Microsoft.MVP.Scripting
> Sammamish WA US
>



Re: How do you create an Outlook application object in my web page using VBscript? by Fie

Fie
Thu Jul 22 12:41:27 CDT 2004

Thank you.
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/hta/overview/htaoverview.asp
says that "The commandLine property returns an empty string when the HTA is
launched over the HTTP protocol."
I need to open the HTA through a URL, and pass the variables values from
either an HTML file or ASP file.
On IE browser I type in myserver/mydir/testoutlook.hta?ss=123.
alert(oHTA.commandLine) returns an empty string.

I then run it from the Start menu and type in J:\mydir\TestOutlook.HTA
s=123.
alert(oHTA.commandLine) returns J:\mydir\TestOutlook.HTA s=123.

So, unfortunately, this wont work when calling it on my IE browser.

Thank you.

"MikeB" <m.byerleyATVerizontDOTnet> wrote in message
news:uSwisD4bEHA.2812@tk2msftngp13.phx.gbl...
>
> "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> news:e5nY0Y1bEHA.904@TK2MSFTNGP09.phx.gbl...
> > Thank you very much.
> > I have a problem where I need to pass some variables/values to the HTA.
> > In ASP pages, I could either do
> > sValue = Request.Form("txtBox1")
> > or
> > sValue = session("txtBox1")
> >
> > Can I pass a value to the HTA ?
>
> In the HtaApplication Parameters:
> <HTA:APPLICATION ID="oHTA"
> APPLICATIONNAME="AltDialog"
> CAPTION="yes"
> SYSMENU="yes"
> MAXIMIZEBUTTON="no"
> MINIMIZEBUTTON="no"
> SHOWINTASKBAR="no"
> SINGLEINSTANCE="yes"
> SCROLL="NO"
> BORDER="thin"
> BORDERSTYLE="dialog"
> VERSION="1.0"
> WINDOWSTATE="normal"
> ICON="time.ico">
>
> the oHTA is the HTA Application Object, and one of its' properties is
> "commandLine", so you can pass in arguments in to the HTA via the command
line.
> With multiple arguments, separate them with a character that appropriatlly
will
> not be a part of the arguments and then parse it accordingly.
>
>
>
> >
> > Thank you.
> >
> > "MikeB" <m.byerleyATVerizontDOTnet> wrote in message
> > news:uGkuKX0bEHA.3476@tk2msftngp13.phx.gbl...
> > >
> > > "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> > > news:u%23Rq4S0bEHA.3476@tk2msftngp13.phx.gbl...
> > > > Thank you.
> > > > I will look for Micheal Harris postings.
> > > > What is HTA ?
> > >
> > > HyperTextApplication:
> > >
> > >
> >
>
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/hta/overview/htaoverview.asp
> > >
> > > > Thanks.
> > > >
> > > > "MikeB" <m.byerleyATVerizontDOTnet> wrote in message
> > > > news:e%237I4N0bEHA.2292@TK2MSFTNGP09.phx.gbl...
> > > > >
> > > > > "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> > > > > news:%2323NbF0bEHA.1656@TK2MSFTNGP09.phx.gbl...
> > > > > > Thank you for your quick reply.
> > > > > > It is for our clients' intranet site.
> > > > >
> > > > > Do a search in this NG for some stuff Michael Harris posted that
might
> > be
> > > > > helpful. It has been awhile, but I seem to recall using HTA
either in
> > > > place of
> > > > > or in concert with ASP on an Intranet.
> > > > >
> > > > > The underlying reason for my suggestion is that with HTA, you
don't
> > have
> > > > to deal
> > > > > with the security settings, allowing the users to use their
browsers
> > > > "Inter" and
> > > > > "Intra" net without concern of the security settings.
> > > > >
> > > > > > You are correct, when I set the security settings to be the
> > following, I
> > > > am
> > > > > > able to get in to the page with no error.
> > > > > > "Download unsigned ActiveX controls" to Disable
> > > > > > "Initialize and script ActiveX controls not marked as safe" to
> > Prompt.
> > > > > >
> > > > > > But, I do not think this setup will be acceptable at our
clients'
> > > > intranet
> > > > > > site.
> > > > > > We need to create a task and appointment (calendar) on the
client's
> > > > machine
> > > > > > through a website. My colleague says there is a website that can
> > > > download
> > > > > > your flight itenarary to your Outlook.
> > > > > > I would greatly appreciate your suggestion on how to do this
using
> > > > either
> > > > > > Outlook application object or other objects.
> > > > > >
> > > > > > Thank you very much.
> > > > > >
> > > > > > "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com>
wrote
> > in
> > > > > > message news:ez9ri1zbEHA.796@TK2MSFTNGP09.phx.gbl...
> > > > > > > You'd need some pretty low security settings in your zone in
your
> > > > browser
> > > > > > > for that to be allowed. Is this for a public site? An
intranet?
> > > > Just
> > > > > > for
> > > > > > > yourself?
> > > > > > >
> > > > > > > Ray at work
> > > > > > >
> > > > > > > "Fie Fie Niles" <fniles@wincitesystems.com> wrote in message
> > > > > > > news:eq$HpvzbEHA.2972@TK2MSFTNGP12.phx.gbl...
> > > > > > > > How do you create an Outlook application object in my web
page
> > using
> > > > > > > > VBscript? When I do the following code, I received an error
> > "ActiveX
> > > > > > > > component can't create object: 'Outlook.Application' ". The
same
> > > > code
> > > > > > runs
> > > > > > > > fine in VB 6. Thank you.
> > > > > > > >
> > > > > > > > <script language="VBScript">
> > > > > > > > set objOLApp = CreateObject("Outlook.Application")
> > > > > > > > </script>
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>