CreateObject("Outlook.Application") 
Author Message
 CreateObject("Outlook.Application")

Hi,

I make this little VBScript code in order to create an Outlook Contact from
my PHP page.
The pb is that the script works fine if I use it from my computer (without
any web server, it's only a basic html page) but when I use it from the web
server, I got an error: ActiveX can not create object 'Outlook.Application'
(error number 429).

Any idea ?
Thanks.
Javier.

<html>
<head>
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"
bgcolor="white">
<script language="VBScript" >
sub olContact()
 Set ol = CreateObject("Outlook.Application")
 Set olns = ol.GetNameSpace("MAPI")
 Set MyFolder = olns.GetDefaultFolder(10)
 Set MyItem = MyFolder.Items.Add("IPM.Contact.MyForm")
 MyItem.Display
 MyItem.FirstName = "Prenom"
 MyItem.LastName = "Nom"
 MyItem.FullName = "Nom, Prenom"
 MyItem.CompanyName = "ste"
 MyItem.JobTitle = ""
 MyItem.Department = ""

 MyItem.Email1AddressType = "SMTP"
 MyItem.Display
' MyItem.save
end sub
</script>
<input type="button" onclick="vbscript:olContact()">
</BODY>
</HTML>



Thu, 17 Nov 2005 20:24:56 GMT  
 CreateObject("Outlook.Application")
Your code is executing on the client PC, and Outlook is probably not
installed.

Quote:

> Hi,

> I make this little VBscript code in order to create an Outlook Contact
> from my PHP page.
> The pb is that the script works fine if I use it from my computer
> (without any web server, it's only a basic html page) but when I use it
> from the web server, I got an error: ActiveX can not create object
> 'Outlook.Application' (error number 429).

> Any idea ?
> Thanks.
> Javier.

> <html>
> <head>
> </head>
> <body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"
> bgcolor="white">
> <script language="VBScript" >
> sub olContact()
>  Set ol = CreateObject("Outlook.Application")
>  Set olns = ol.GetNameSpace("MAPI")
>  Set MyFolder = olns.GetDefaultFolder(10)
>  Set MyItem = MyFolder.Items.Add("IPM.Contact.MyForm")
>  MyItem.Display
>  MyItem.FirstName = "Prenom"
>  MyItem.LastName = "Nom"
>  MyItem.FullName = "Nom, Prenom"
>  MyItem.CompanyName = "ste"
>  MyItem.JobTitle = ""
>  MyItem.Department = ""

>  MyItem.Email1AddressType = "SMTP"
>  MyItem.Display
> ' MyItem.save
> end sub
> </script>
> <input type="button" onclick="vbscript:olContact()">
> </BODY>
> </HTML>

--
Please respond in the newsgroup so everyone may benefit.
 http://dev.remotenetworktechnology.com
(email requests for support contract information welcomed)
 ----------
 Microsoft's new UNIFIED Terminal Services Newsgroup:



Thu, 17 Nov 2005 20:56:16 GMT  
 CreateObject("Outlook.Application")
no, I found the problem: security parameters for the activex.
I changed this parameter and now it's OK.

regards



Quote:
> Your code is executing on the client PC, and Outlook is probably not
> installed.


> > Hi,

> > I make this little VBscript code in order to create an Outlook Contact
> > from my PHP page.
> > The pb is that the script works fine if I use it from my computer
> > (without any web server, it's only a basic html page) but when I use it
> > from the web server, I got an error: ActiveX can not create object
> > 'Outlook.Application' (error number 429).

> > Any idea ?
> > Thanks.
> > Javier.

> > <html>
> > <head>
> > </head>
> > <body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"
> > bgcolor="white">
> > <script language="VBScript" >
> > sub olContact()
> >  Set ol = CreateObject("Outlook.Application")
> >  Set olns = ol.GetNameSpace("MAPI")
> >  Set MyFolder = olns.GetDefaultFolder(10)
> >  Set MyItem = MyFolder.Items.Add("IPM.Contact.MyForm")
> >  MyItem.Display
> >  MyItem.FirstName = "Prenom"
> >  MyItem.LastName = "Nom"
> >  MyItem.FullName = "Nom, Prenom"
> >  MyItem.CompanyName = "ste"
> >  MyItem.JobTitle = ""
> >  MyItem.Department = ""

> >  MyItem.Email1AddressType = "SMTP"
> >  MyItem.Display
> > ' MyItem.save
> > end sub
> > </script>
> > <input type="button" onclick="vbscript:olContact()">
> > </BODY>
> > </HTML>

> --
> Please respond in the newsgroup so everyone may benefit.
>  http://dev.remotenetworktechnology.com
> (email requests for support contract information welcomed)
>  ----------
>  Microsoft's new UNIFIED Terminal Services Newsgroup:




Thu, 17 Nov 2005 23:48:51 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. CreateObject("Outlook.Application")...

2. CreateObject("Outlook.Application") does not work

3. CreateObject("Outlook.Application")

4. CreateObject("Outlook.Application") problem

5. Problems with Createobject("Outlook.Application")

6. Bypassing Outlook's Security - using CreateObject("Outlook.application")

7. HELP: CreateObject("Outlook.Application") act like GetObject

8. OL2000 crash on CreateObject("Outlook.Application") - previously working macros

9. why we can not use createobject ("Outlook.Application") inside HTMLBody

10. var OOutlook=WScript.CreateObject("Outlook.Application"); FAILED

11. vbscript / CreateObject("Outlook.Application") does not function

12. CreateObject("Outlook.Application ") does'nt fonction !

 

 
Powered by phpBB® Forum Software