Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Tue, 5 Apr 2005 07:53:55 -0600,    group: microsoft.public.inetsdk.programming.scripting.vbscript        back       


VBScript on Intranet webpage works on only some PCs.   
Hi!

I've been using the code below to send the results of a form on our intranet
using the users Outlook installation. I've recently learned that it's not
working on all machines. Normally, the user would complete the form, click
SUBMIT, and there would be a security popup warning that another application
was trying to use Outlook. The uesr would click YES and the message would be
sent.

The error is "ActiveX component can't create object: 'Outlook.Application'

I believe that one of two things might be causing this (please correct me if
I'm wrong)...

1) The security settings in IE or an IE security update is preventing the
VBScript to work. I've set the Intranet and Internet settings as low as
possible and still get the error. My development machine may not have all
the updates that the problem machine has.

2) The machine with the error is running Outlook 2003. My development
machine runs Outlook 2002 and has no issues. Do I need to use a different
object to make this 2003 compatible? Is there a setting in Outlook 2003 that
would allow this to work?

3) ... Any other ideas???

All machines are running WinXP Pro with SP1.

Any help is appreciated.


'*************************************************
'*
'* Send an HTML email message using users Outlook
'*
'*  strTo = List of addresses to send to
'*  strFrom = Senders name/address
'*  strSubject = Subject line of message
'*  strMsg = Message content - HTML formatted
'*
'*************************************************
sub OutlookHTMLSend( strTo, strFrom, strSubject, strMsg )
 Set objOlApp = CreateObject("Outlook.Application")
 Set objMsg = objOlApp.CreateItem(olMailItem)
 objMsg.To = strTo
 objMsg.Subject = strSubject
 objMsg.HTMLBody = strMsg
 objMsg.Save
 'Show message and let user edit and send manually.
 ' !! Formatting is messed up if user has Word set as their email editor. !!
 'objMsg.Display

 'Just send message. User may get security warning
 objMsg.Send

 'Destroy object
 set objMsg = Nothing
 set objOlApp = Nothing

 'Send user to index page
 document.location ="default.asp"

end sub
date: Tue, 5 Apr 2005 07:53:55 -0600   author:   Noozer

Re: VBScript on Intranet webpage works on only some PCs.   
No ideas, anyone?

"Noozer"  wrote in message
news:%23olpbZeOFHA.3668@TK2MSFTNGP14.phx.gbl...
> Hi!
>
> I've been using the code below to send the results of a form on our
intranet
> using the users Outlook installation. I've recently learned that it's not
> working on all machines. Normally, the user would complete the form, click
> SUBMIT, and there would be a security popup warning that another
application
> was trying to use Outlook. The uesr would click YES and the message would
be
> sent.
>
> The error is "ActiveX component can't create object: 'Outlook.Application'
>
> I believe that one of two things might be causing this (please correct me
if
> I'm wrong)...
>
> 1) The security settings in IE or an IE security update is preventing the
> VBScript to work. I've set the Intranet and Internet settings as low as
> possible and still get the error. My development machine may not have all
> the updates that the problem machine has.
>
> 2) The machine with the error is running Outlook 2003. My development
> machine runs Outlook 2002 and has no issues. Do I need to use a different
> object to make this 2003 compatible? Is there a setting in Outlook 2003
that
> would allow this to work?
>
> 3) ... Any other ideas???
>
> All machines are running WinXP Pro with SP1.
>
> Any help is appreciated.
>
>
> '*************************************************
> '*
> '* Send an HTML email message using users Outlook
> '*
> '*  strTo = List of addresses to send to
> '*  strFrom = Senders name/address
> '*  strSubject = Subject line of message
> '*  strMsg = Message content - HTML formatted
> '*
> '*************************************************
> sub OutlookHTMLSend( strTo, strFrom, strSubject, strMsg )
>  Set objOlApp = CreateObject("Outlook.Application")
>  Set objMsg = objOlApp.CreateItem(olMailItem)
>  objMsg.To = strTo
>  objMsg.Subject = strSubject
>  objMsg.HTMLBody = strMsg
>  objMsg.Save
>  'Show message and let user edit and send manually.
>  ' !! Formatting is messed up if user has Word set as their email editor.
!!
>  'objMsg.Display
>
>  'Just send message. User may get security warning
>  objMsg.Send
>
>  'Destroy object
>  set objMsg = Nothing
>  set objOlApp = Nothing
>
>  'Send user to index page
>  document.location ="default.asp"
>
> end sub
>
>
date: Thu, 7 Apr 2005 08:35:23 -0600   author:   Noozer

Re: VBScript on Intranet webpage works on only some PCs.   
Noozer wrote:
> No ideas, anyone?
> 
> "Noozer"  wrote in message
> news:%23olpbZeOFHA.3668@TK2MSFTNGP14.phx.gbl...
> 
>>Hi!
>>
>>I've been using the code below to send the results of a form on our
> 
> intranet
> 
>>using the users Outlook installation. I've recently learned that it's not
>>working on all machines. Normally, the user would complete the form, click
>>SUBMIT, and there would be a security popup warning that another
> 
> application
> 
>>was trying to use Outlook. The uesr would click YES and the message would
> 
> be
> 
>>sent.
>>
>>The error is "ActiveX component can't create object: 'Outlook.Application'
>>
>>I believe that one of two things might be causing this (please correct me
> 
> if
> 
>>I'm wrong)...
>>
>>1) The security settings in IE or an IE security update is preventing the
>>VBScript to work. I've set the Intranet and Internet settings as low as
>>possible and still get the error. My development machine may not have all
>>the updates that the problem machine has.
>>
>>2) The machine with the error is running Outlook 2003. My development
>>machine runs Outlook 2002 and has no issues. Do I need to use a different
>>object to make this 2003 compatible? Is there a setting in Outlook 2003
> 
> that
> 
>>would allow this to work?
>>
>>3) ... Any other ideas???
>>
>>All machines are running WinXP Pro with SP1.
>>
>>Any help is appreciated.
>>
>>
>>'*************************************************
>>'*
>>'* Send an HTML email message using users Outlook
>>'*
>>'*  strTo = List of addresses to send to
>>'*  strFrom = Senders name/address
>>'*  strSubject = Subject line of message
>>'*  strMsg = Message content - HTML formatted
>>'*
>>'*************************************************
>>sub OutlookHTMLSend( strTo, strFrom, strSubject, strMsg )
>> Set objOlApp = CreateObject("Outlook.Application")
>> Set objMsg = objOlApp.CreateItem(olMailItem)
>> objMsg.To = strTo
>> objMsg.Subject = strSubject
>> objMsg.HTMLBody = strMsg
>> objMsg.Save
>> 'Show message and let user edit and send manually.
>> ' !! Formatting is messed up if user has Word set as their email editor.
> 
> !!
> 
>> 'objMsg.Display
>>
>> 'Just send message. User may get security warning
>> objMsg.Send
>>
>> 'Destroy object
>> set objMsg = Nothing
>> set objOlApp = Nothing
>>
>> 'Send user to index page
>> document.location ="default.asp"
>>
>>end sub
>>
>>
> 
> 
> 
maybe try using cdo to send the message.
date: Fri, 08 Apr 2005 14:30:55 -0700   author:   ews

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us