Missing end sub, but where ?

Hi,
I'm creating a script that will, when a technician send a mail to a client, the affiliated commercial will be put in copy.
My code looks like this : 
ThisOutlookSession
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'By Oliv' 29/06/2007 pour Outlook 2003
'Modifié par D. Schneider le 30/03/2015
If Not Item.Class = olMail Then GoTo fin
Dim prompt As String
'########################correspondance CC selon destinataire##############################
Dim recip As Outlook.Recipient
Dim sDomain As String
Dim arTemp As Variant
Set recip = Item.Recipients(1)
arTemp = Split(recip.Address, "@", , vbTextCompare)
sDomain = arTemp(1)
cci = Get_Cial(sDomain)
'########################Option CC##############################
prompt = "Ajouter le cc " & cci & " à " & Item.Subject & "?"
If MsgBox(prompt, vbYesNo + vbQuestion, "Sample") = vbYes Then
Set myRecipient = Item.Recipients.Add(cci)
myRecipient.Type = olCC
myRecipient.Resolve
If myRecipient.Resolved = False Then
MsgBox "L'adresse Email n'est pas correcte !", vbCritical, "Erreur"
Cancel = True
End If
End If
'#######################FIN#####################################
fin:
End Function
Module1
Public MyArray()
Sub Test_Get_Cial()
Call Alimente_Liste
MsgBox Get_Cial("exemple1.fr")
End Sub
Sub Alimente_Liste()
Dim intFic As Integer
Dim strLigne As String
intFic = FreeFile
Open "C:\Users\*****\Domaine-Cial.txt" For Input As intFic
i = 0
While Not EOF(intFic)
Line Input #intFic, strLigne
ReDim Preserve MyArray(i)
MyArray(i) = strLigne
i = i + 1
Wend
Close intFic
End Sub
Function Get_Cial(Email) As String
Get_Cial = ""
For i = 0 To UBound(MyArray)
If Split(MyArray(i), ";", , vbTextCompare)(0) = Email Then
Get_Cial = Split(MyArray(i), ";", , vbTextCompare)(1)
Exit For
End If
Next i
End Function
But when I try to test it, I get and error saying there's a missing 'end sub' but I can't find where 

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'''  End Function  <<<
End Sub
Voila!

Similar Messages

  • How do i download podcast on my PC? Its asking me to type in the podcast name ending in xml but where do i find the rest ???

    How do I download podcast onto my pc? I already do have iTunes. It ask me to type in podcast name ending in xml then click on install but where is the rest of the name?? where do I find this? Might be something simple I just seem to miss. Help!!! lol

    The easiest way to subscribe to a podcast is locate it in a directory. There will normally be a link with the URL of the feed. This is like any other link but your podcatcher, iTunes in this case, knows how to read the text file stored there to access the individual episodes and download or stream them for you. If you know the name of the podcast, and it is registered with iTunes you can go into the podcasts section of your iTunes library, click iTunes Store, then use the search box at the top right. If you have the full URL for the podcast you can use File > Subscribe to Podcast..., or you can use a link on the providers web site.
    Using the iTunes directory is usually the easiest way.
    Click on the link for the podcast (4) to open the next screen,
    and either subscribe (5) or download individual episodes without subscribing (6).
    tt2

  • Acrobat Reaader will not work before I accept End User License Agreement. But where and how?

    Acrobat Reaader will not work before I accept End User License Agreement. But where and how?
    Have installed version 9.5 on my Windows 7 desk-top computer.

    I don't know what you mean by "where and how"; Adobe Reader will automatically present the license agreement to accept the first time you use it.

  • Song and Artist Info missing under itunes but not in the original file, and putting track number next to certian songs. Help

    i recently updated my itunes...today i opened it up and moticed abuout 100 songs missing...they are now at the bottom of itunes song list with a number next to them with information mission such as this the example below
    01 human                                                                 (this song should have the killers name as artist and cd title, etc)
    01 hosanna     hillsong united                                 (this song should have the cd title to it)
    02 lay me down                                          burning light
    02 leave out all the rest
    02 let it be                       the beatles
    03 papercut
    when i go under the original folders and files in the itunes folder everything is normal no missing info, etc. but under itunes orgnising its picking and choosing the same songs and putting the track number next to it and others songs in the same cd not. plus info missing. under the infor when i click right button all info missing there...but not under original file.
    please help

    A response on this subject from another post:
    It could be that you have inadvertently imported these CDs into iTunes as part of a compilation. If so, the artists won't show in the artists menu on the iPod.
    To check, highlight the tracks on one of the offending artists CDs in iTunes, right click and select "get info". This brings up a multiple song info window, and from there you can check if you have 'yes' in the box marked "part of a compilation".
    If you have, select 'no' instead and click 'ok'. Do this with any CD that has this issue. This will alter the info in iTunes, and you should then connect your iPod and synchronize the changes.
    The problem arises because the information contained on the Gracenote CD Data Base (where iTunes gets all it's album/artist/track info from), is sometimes incorrect. It can show CDs as compilations when in fact they are not.
    ramstigo wrote:
    I had an earlier post on this subject with a similar problem. I tried what you suggested and it worked indeed. You can select the artists from your Ipod on Itunes and after highlighting the artists/albums affected, click NO on the compilation box and the issue is resolved: the artists appear on the list.
    Thank you so much!!!!.

  • WS - "java.rmi.MarshalException: (1)Missing end tag for Body or Envelope"

    HI All,
    I'm new of this forum but I really hope you could help me solving the problem I have to connect Web Services and midlets.
    Somehow my configuration works with some services I've found online but when I invoke very simple services deployed on my server(s) I always have "java.rmi.MarshalException: (1)Missing end tag for Body or Envelope" exception"
    Let me add some more information to the problem:
    System Configuration:
    - JBoss (but I also tried axis) - standard installation (http/1.1)
    - WTK 2.5 (but I also tried 2.2) - standard installation
    - I tried "trusted" and "untrusted" security configuration of the servlet
    - Netbeans IDE 5.0 (to create both Midlets and WS)
    - WS uses document/literal as expected by JSR 172
    The midlet is created with no problems but at the time of invocation the server throws the above exception (which is part of rmi. remoteException)
    By monitoring the network both at client and server side I noticed that the information received is chuncked after 768 bytes. However, If the (soap) reponse is less than such value, I still have the error.
    Using Http/1.1. at the mobile side, the service does not return me anything (0kb) while if I set the mobile device to http/1.0, I get the above error.
    I really have to make the midlet running so any type of help will be really appreciated!!
    Thanks in advance

    Hi all,
    as many developers I have encountered the famous "java.rmi.MarshallException:(1)Missing end tag for Body or Envelope" during the development of my WS app for J2ME (JSR 172).
    It is correct that is the empty tag <soapenv:Header /> causing this error.
    To fix this error, it is necessary to stop the server to generate this empty header in the response stream.
    I have fixed this error for Axis2: unfortunaly it is necessary to modify a class in Axiom library. This library is used in Axis2 to produce the SOAP response, you can download the source code at http://ws.apache.org/commons/axiom/source-repository.html.
    Here the class to modify:
    axiom\modules\axiom-impl\src\main\java\org\apache\axiom\soap\impl\llom\soap11\SOAP11Factory.java
    by commenting the line 273 in the method called getDefaultEnvelope() to prevent the empty header insertion in SOAP response:
    public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException {
            OMNamespace ns =
                    new OMNamespaceImpl(
                            SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                            SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
            SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this);
            //createSOAPHeader(env); the line to be commented
            createSOAPBody(env);
            return env;
        }Finally you have to recompile Axiom using Maven to obtain the fixed package axiom-impl.jar and to replace this package on the lib repository of your Axis2 server.
    A little tricky to fix this bug but now my app runs perfectly ;)
    Enjoy!
    Romain Pellerin
    http://www.gasp-mobilegaming.org

  • MarshalException: Missing end tag for body or Envelop

    Hi, I am new at this, pls advise.
    I have been trying to code a 'hello world' that returns a string, as below.
    //==================
    package simple;
    public class HelloWorld{
    public String sayHello() {
    return "hello";
    //===================
    and my buil.xml looks like this
    //===================
    <project name="simple" default ="all">
    <property file="../properties.txt"/>
    <property name="temp_dir" value="tmp_build" />
    <target name="all" depends="clean,ear,deploy" />
    <target name="clean" >
    <delete dir="${classDir}/tutorial/simple" />
    <delete file="${appDir}/simple.ear" />
    <delete dir="${temp_dir}" />
    <delete file="client.jar" />
    </target>
    <target name="build" depends="ear" />
    <target name="ear" >
    <delete dir="${temp_dir}" />
    <mkdir dir="${temp_dir}" />
    <mkdir dir="${temp_dir}/WEB-INF" />
    <mkdir dir="${temp_dir}/WEB-INF/classes" />
    <javac srcdir="." includes="HelloWorld.java"
    destdir="${temp_dir}" />
    <servicegen
    destEar="simple.ear"
    warName="simple.war"
    contextURI="simple">
    <service
    javaClassComponents="simple.HelloWorld"
    targetNamespace="http://examples/simple"
    serviceName="Echo"
    serviceURI="/HelloWorld"
         generateTypes="True"
    expandMethods="True"
    style="document">
    <client
    packageName="tutorial.simple.client"
    clientJarName="client.jar"
    />
    </service>
    <classpath>
    <pathelement path="${temp_dir}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </servicegen>
    </target>
    <target name="deploy">
    <copy file="simple.ear" todir="${appDir}"/>
    </target>
    </project>
    //======================
    I manage to deploy and run the service on weblogic through the browser. Next, when I try to run it on Java Wirelesss Tookit. I get a "MarshalException: Missing end tag for Body or Evelop" error.
    I basically used the stub generator from WTK and use them as below
    //====================
    try {
    String str = service.sayHello();
    System.out.println( str );
    } catch (Exception e) {
    e.printStackTrace();
    //=====================
    I have no problem running other examples, just this one which i coded on my own. Can anyone pls enlightent me :)

    Hi all,
    as many developers I have encountered the famous "java.rmi.MarshallException:(1)Missing end tag for Body or Envelope" during the development of my WS app for J2ME (JSR 172).
    It is correct that is the empty tag <soapenv:Header /> causing this error.
    To fix this error, it is necessary to stop the server to generate this empty header in the response stream.
    I have fixed this error for Axis2: unfortunaly it is necessary to modify a class in Axiom library. This library is used in Axis2 to produce the SOAP response, you can download the source code at http://ws.apache.org/commons/axiom/source-repository.html.
    Here the class to modify:
    axiom\modules\axiom-impl\src\main\java\org\apache\axiom\soap\impl\llom\soap11\SOAP11Factory.java
    by commenting the line 273 in the method called getDefaultEnvelope() to prevent the empty header insertion in SOAP response:
    public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException {
            OMNamespace ns =
                    new OMNamespaceImpl(
                            SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                            SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
            SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this);
            //createSOAPHeader(env); the line to be commented
            createSOAPBody(env);
            return env;
        }Finally you have to recompile Axiom using Maven to obtain the fixed package axiom-impl.jar and to replace this package on the lib repository of your Axis2 server.
    A little tricky to fix this bug but now my app runs perfectly ;)
    Enjoy!
    Romain Pellerin
    http://www.gasp-mobilegaming.org

  • Missing vision sub vi's

    Hi there,
       I'm missing some sub vi's from my vision package most notable "Integer to colour value" and "get color pixel line" when I load a vision VI. I reinstalled the latest version of Ni-IMAQ and I can see the camera etc in MAX.
    any thoughts...
    Thanks
    Will.

    Hi Will,
    Thanks for the post and I hope your well.
    What versions of LabVIEW and IMAQ (NI Vision) are you using? - you can find this information in NI License Manager.
    Have you recently upgraded LabVIEW?
    Maybe try,
    If the Motion and Vision Icon and VIs are still missing, close LabVIEW and select Start»Control Panel»Add/Remove Programs and select to Change the National Instruments Software.
    A new window will display the National Instruments software on your computer, so you need to select either NI-IMAQ, Vision, or Motion (depending on what you are trying to install). 
    Select Modify (or Change) until you get to the install option where you select what support to install. Make sure the box next to the version of LabVIEW you are working with, or the option for the latest version of LabVIEW, is selected. 
    Continue the installation. Once complete, open LabVIEW and the palette and VI icons should be there.
    I would also suggest trying the advice in the knowledgebase article, Upgrading NI-IMAQ with LabVIEW.
    Let me know if this  helps,
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • WT 2.5 / WT 2.5.2 - Web Services problem - Missing end tag??

    Hi,
    I'm trying to create a J2ME web services client using the wireless toolkit. I used the Stub Generator to create my STUB from my WSDL file.
    With the Wireless Toolkit 2.5 I was getting a "Missing end tag for body or envelope" error when I invoked a web method. I read that this was a problem with that version of the Wireless Toolkit (a parsing problem).
    I then upgraded to Wireless Toolkit 2.5.2. When running my app on the emulator, the "Missing end tag for body or envelope" error went away, and I was successfully invoking web methods, and the results were being parsed fine. However, when I put this .jar on to my handset (a Nokia E70) I still see the "Missing end tag for body or envelope" error!
    Does anyone know why this is?

    The IDE i'm using is NetBeans. I have WTK2.5 and WTK2.5.2 installed. When I flick the "emulator platform" from WTK2.5 to WTK2.5.2 the error "Missing end tag for body or envelope" does go away, and the SOAP response is successfully parsed. However, when I flick it back to WTK2.5, I get the error back. The SOAP message is being sent properly, and a good response is returned. The problem is with parsing the response. WTK2.5 can't seem to parse it, but WTK2.5.2 can.
    So I can get the application working fine (when the emulator platform is set to WTK2.5.2), but the problem is, I still get the error when I install the app on any phone, and I don't understand why???
    If anyone can shed any light on this, i'd be very grateful.
    p.s I've tested the app on the following handsets:
    Sony Ericsson P1i, K800i
    Nokia E70, E61

  • HT4623 I have plugged in my ipad to my computer and Itunes is up on my computer but where do I find these things in Itunes, # In iTunes, select your device.  # In the Summary pane, click Check for Update, to update my ipad?

    I have plugged in my ipad to my computer and Itunes is up on my computer but where do I find these things in Itunes, # In iTunes, select your device.  # In the Summary pane, click Check for Update, to update my ipad?

    Tap to enlarge.

  • I just got iphone 5c and i am not happy with it. It uses to much data and i don't even know how. I can't get the ringtones i want for my contacts.I got it on my free upgrade but i want to take it back and get something else but where i got it they say i c

    I just got iphone 5c and i am not happy with it. It uses to much data and i don't even know how. I can't get the ringtones i want for my contacts.I got it on my free upgrade but i want to take it back and get something else but where i got it they say i can't because i don't have the earbuds and i have serches or them. now i am suck with a phone i don't like at all until my next upgrade. this is very dishearten

    1. If you are this unhappy with that phone, and the lost earbuds is the only thing stopping you from taking it back, why do not just buy some earbuds. That way you can get rid of that phone. It all depend upon how much you want to get rid of that phone.
    2. Yet if you are stuck with that iPhone, here is something might help you to control the data usage. By design, iPhones do turn off WiFi when they go dormant. So if a download is in progress and so forth when the phone goes dormant, it will switch to use cellular data, if this setting is left on. Therefore, from multi-sources I have learned that if you keep your iPhone connected to a power source, then it will stay connected to the available WiFi.

  • How do you get to the DOS prompt so that you can type in the info to help get into itunes store???  One post said search cmd, right click, run as administrator but where is the search cmd??

    Have been struggling for days trying to get into the itunes store.  Have contacted support with no help.  I have been reading how some have typed something into a DOS prompt and have resolved their issues.  One stated to "search cmd, right click, and run as admininstrator" but where is this?  There was also a post about typing something into the DOS prompt....how do I get to this?  Can someone please help??? SOOOOO FRUSTRATING.  Thanks much...Carrie (Mike's wife:))

    One stated to "search cmd, right click, and run as admininstrator" but where is this?
    In the search field in your Vista start menu, type cmd
    Next, right-click on the cmd that comes up and select "Run as administrator".

  • ITunes 10.2.1. downloads, but where are the files?

    I've tried four times to download the free program "The House in Cypress Canyon," program H255, from the iTunes Store. The word "Downloads" appears in iTunes, along with the download-progress bar, but where in heck is the file when the download is complete??
    I've searched all my playlists, as well as the "Recently Added" list, and there's no sign of the download. Help! (I REALLY don't like iTunes 10.2.1. For six years, iTunes worked beautifully. Now it won't even accept drag-and-drop, and then this problem of simply hiding downloads...)

    It will be in the Apps section under the Library heading.
    If you can't see the Apps section then go into your iTunes preferences and look on the General Tab.
    Make sure you have the Apps tick box selected.

  • Can't install Oracle XE on Windows 7 : the install ends fine but no database created and error in log file

    When i try to install Oracle XE 64bit 11g on a windows 7, the installation ends correctly, but no database is created (no datafiles) and in the log file I find :
    Oracle Database 11g Clusterware Release 11.2.0.2.0 - Production Copyright 1996, 2010 Oracle. All rights reserved.
    2015-03-24 15:24:14.733: [ default][3316]ut_read_reg:2:ocr registry key SOFTWARE\Oracle\olr cannot be opened. error 2
    [ CLSE][3316]clse_get_crs_home: Error retrieving OLR configuration [0] [Error opening olr registry key. Le fichier spécifié est introuvable.
    What's the problem?

    Oracle XE 64bit 11g on a windows 7
    Which edition ?

  • I have got a new phone and my old phone was wiped.  I backed it up but where do i find my contacts list on iTunes?  Or should i be looking somewhere else?

    i have got a new phone and my old phone was wiped.  I backed it up but where can i find all my contacts?

    Unfortunately your other contacts may be lost.  Contacts are not saved in iTunes; they are only synced with iTunes to a supported program such as Outlook or mac Address Book.  If you don't have these, there are other options for backing up your contacts such as syncing them with iCloud or another service such as Google.  Syncing only partially saves contacts in the backup in order to preserve your favorites and recent call lists; it can't be relied on for backing up your entire contact list.

  • How do I drag an image or text box to the "workspace" off of my working file but where I can still see the image and text box for future use?

    How do I drag an image or text box to the "workspace" off of my working file but where I can still see the image and text box for future use?
    When I drag the item off of the trifold that I am creating, it just disappears but I still want to use it.  I just need to move it out of the way to modify other portions of the document.
    thanks,
    C

    Add another page below the current one to use as a storage area. You can't use the grey area around the page for storing items you want to use later.
    Go to the Pages Menu>Provide Pages Feedback if you would like to request this feature be added in future versions.

Maybe you are looking for

  • Multiple labels on a single file?

    Is there a way to place multiple labels on a single file? I'd like to be able to sort files based on several partially overlapping criteria. Thanks.

  • Upgraded from Tiger - Now no mail

    Please bear with me while I type this. I want to be sure everyone understands what happened and I need to be sure I can explain this right. I just recently upgraded from Tiger to Leopard. I did not backup any info from my hard drive prior to upgradin

  • Printing Report Header Text

    I have a link in a report that calls another report. The link information being passed to the report is :ename, :emp_id. I would like to print these values on the report header text. Emp Name: bob Emp ID: 10000 field1 field2 field3 1 2 3

  • Fill automatically Custom fields in a table

    Hi all,     I have a custom table and many se38 reports or Bapi which modify or insert records in this table. Now from se11 I must add 4 new fields to this table that have to contain system values. Can I write a routine which automatically fills thes

  • Arrangement of jar containing main class

    Hello all, usually it is required, that that jar file (let me call it "main jar"), which contains the main class (by which the application is entered), has to be the first jar in the order of the jar files within <resources> of the jnlp file. Now if