How do you create an Outlook application object in my web page using VBscript?

F

Fie Fie Niles

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>
 
S

Sue Mosher [MVP-Outlook]

The error means that the user may have IE set not to allow scripting of
items not marked safe for scripting. If your code is running on a page on a
site in the Trusted Sites zone, it should work OK (but check the security
settings for sure).

FYI, there is a newsgroup specifically for general Outlook programming
issues "down the hall" at microsoft.public.outlook.program_vba or, via web
interface, at
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba
 
F

Fie Fie Niles

Thank you for your quick reply.
We would like to do this for our clients' intranet site. You can not put the
intranet site in the Trusted Sites zone, can you ?

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.
I will also post the question on the newsgroup
microsoft.public.outlook.program_vba.

Thank you very much.
 
S

Sue Mosher [MVP-Outlook]

The "Local intranet" zone should also have the same lowered security
settings -- but check with your client to be sure.

The better solution probably would be to use iCalendar items, either stored
files or created on the fly.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
F

Fie Fie Niles

Thank you, Sue.
Is iCalendar items the same with Microsoft Calendar Control ?
Can I use iCalendar items on HTML or ASP file ?
Can I use it with security settings NOT set to Low ?
Where can I get sample codes for iCalendar items ?

Thank you.
 
S

Sue Mosher [MVP-Outlook]

iCalendar is an Internet standard for calendar interoperability. You can
Google for "iCalendar code" to get plenty of samples.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
F

Fie Fie Niles

Thank you.
I now create a .VCS file on the fly and bring up the .VCS file on IE browser
(which will bring up Outlook Calendar item).
Do you know if I can create an Outlook Task on the fly also ? When I do
file - save as on an Outlook Task, the file types that it can be saved to
are: .RTF, .OFT (Outlook Template), or .MSG (Message format). .OFT and .MSG
can not be editted using a text editor like .VCS file, and I could not find
codes to create those files on the fly. If you know how to create .OFT or
..MSG on the fly, please let me know
Thank you very much.
 

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