Solved

Problem with CustomAction in VBScript

Posted on 2002-04-24
9
140 Views
Last Modified: 2011-04-14
In general, I can't interact with NewItem (the new mail item created after the user click on the action button from the current item).For example this simple code that should add a small message to the body of NewItem doesn't work :

Function Item_CustomAction(ByVal Action, ByVal NewItem)

     Select Case Action.Name
          Case "Approve"
               set NewItem =Application.ActiveInspector.CurrentItem (same result if I remove this line)
               NewItem.Body = "test"
          end with
     End Select

End Function

I would be very grateful if anyone could help me this this issue. Thank you very much.
0
Comment
Question by:NICO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6967098
i suposse you are talking about outlook, right?
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6967406
yup looks like it and i'm curious if someone is going to solve this one

:O)Bruintje
0
 

Author Comment

by:NICO
ID: 6967850
Yes, this problem is happening on a custom form I am trying to develop in  VBScript in Outlook 2002 (XP).
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:NICO
ID: 6967852
Yes, this problem is happening on a custom form I am trying to develop in  VBScript in Outlook 2002 (XP).
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6967859
we got a same sort of trigger problem in Office at the moment no solution thus far although there is some heavy weight Outlook expert involved, the documentation of MS is clear only in practice it's a different story or we miss something really obvious here

i'll be on the lookout
0
 

Author Comment

by:NICO
ID: 6968742
I've found the reason why it didn't work but I don't know how to fix it.
Microsoft says that the Email Security features of Outlook XP "one-off" forms  when using
methods  related to the Action object (and so the VBscript code is prevented from running). The small easy code in my original question that adds a line in the body of the new mail item generated by a custom action  works perfectly in outlook 2000 (without the security patch).

I tried with no success these different solutions to remove the one-off state of the form :
- uncheck the option "send form definition with item" and/or publish the form in the Organisational Library
- resetting the message class field with code and saving the item in code.

Microsoft speaks about administrator features to enable Vbscript in one-off forms but I have no idea of what it can be.

So my question now is does anyone know how to successfully enable VBscript in one-off form except the solutions I tried above?

Thanks a lot
0
 

Author Comment

by:NICO
ID: 6993964
Hi,

Finally, the solution was found :

It is just a matter of publishing the form in a form library in exchange and unselecting the option "send form definition with item " (I don't know why it didn't work previously )
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7670194
NICO, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 8092518
Question placed in PAQ

Computer101
E-E Admin
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question