Bug with Excel script

I wrote a script that:
1. gathers data from cells copied in an excel spreadsheet
2. creates variables from data
3. creates a new job folders using variables
4. copies an excel file into the job folder
5. opens the excel file and fills in specified cells with variables
6. saves and closes the excel file
The problem I'm having is with the last step. Instead of closing the new file, it wants to close the other document I copied from. Here is the last bit of code.
tell application "Microsoft Excel"
open myexcelfile
set value of cell ("A" & 2) to myvariable1
set value of cell ("B" & 2) to myvariable2
set value of cell ("D" & 2) to myvariable3
set value of cell ("G" & 2) to myvariable4
save myexcelfile
close workbook myexcelfile
end tell

Hi
You may be running into an issue that is pointed out here (refer to Opening a Workbook)
http://www.mactech.com/articles/mactech/Vol.23/23.02/2302AppleScript/index.html
"When referencing the active workbook property, one thing to keep in mind is that, if another workbook is brought to the front, then your script may reference the incorrect workbook. Because of this, it is recommended to reference workbooks by name."
So based on the info from above the below may work for you?
set _File to choose file with prompt "Select File"
set theName to name of (info for _File)
tell application "Microsoft Excel"
open t_File
set thebook to workbook theName
-- DO YOUR GATHERING STUFF --
close workbook thekbook saving no
set myexcelfile to choose file with prompt "Select File"
open myexcelfile
set value of cell ("A" & 2) to myvariable1
set value of cell ("B" & 2) to myvariable2
set value of cell ("D" & 2) to myvariable3
set value of cell ("G" & 2) to myvariable4
save myexcelfile
close workbook myexcelfile
end tell
Budgie

Similar Messages

  • Solaris 9 Bug with Installer Scripts?

    The installer for my product, which works fine on Solaris versions from 2.5 through 2.9 Early Release, does not work on the released Solaris 9. The problem is visible right away in my "request" file, which early in the file uses the standard shell variable '$0'.
    The result I get is something like:
    "/tmp/installBOayFd/checkinstallDOayFd", rather than the expected
    "/myhome/mypkg/install/request". I don't know why files are being referenced from "/tmp", and the garbage characters look suspiciously like a string terminator is being left out someplace.
    Does anybody know anything about this? If so, is there an expected fix or a workaround?

    Here is the output from the command:
    bash-2.05$ /usr/jdk/latest/bin/java -version:"1.5+" -version
    java version "1.5.0_15"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
    Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode, sharing)
    It looks like the java version should be okay, but it doesn't seem to include the definition for TransportAdapterException.
    Thanks for pointing out that this cron job doesn't actually do what I was hoping that it did, which was to run a sort of "smpatch update" automatically each night to handle the downloading and/or installation of "safe" patches. I'll probably just drop it.

  • Adobe Reader / Pro XI bug with PDF as embedded object in Microsoft Excel

    We are using Adobe Reader and Adobe Pro version 11.0.06, Windows 7 Enterprise 64-bit, with a mixture of MS Office 2010 and 2013.
    We have been able to reproduce a bug using Reader/Pro together with Excel, where Reader/Pro freezes when we preform the following tasks.
    Open an Excel file where a PDF file is attached as an object in the spreadsheet
    Double click and open the PDF file attached, PDF is opened in Adobe Reader/Pro
    From Adobe Reader/Pro, click on the document on the Page Thumbnails, scroll the document up and down for a few times
    Close the Adobe Reader/Pro, it freezes and the adobe process is starting to consume the system memory
    This problem is happening on multiple machines with Adobe Reader/Pro 11.0.06 installed, regardless of the Office version and is reproducible. We did not see such issue on Adobe X.
    Is there anyone reported the same?

    Hello,
    I know this problem was reported many months ago, but I am also experiencing this exact same issue, and have found no resolution to it yet. My user has a simple PDF embedded into an Excel 2010 document. Double click the PDF and it opens properly in Acrobat. If I close Acrobat, Excel freezes in the background (not responding). I have to force quit Excel to get back to Excel.
    Also, if I double click on Acrobat again to re-open the application, it won't open. If I check Task Manager after Excel crashes, I can see that Acrobat.exe is still running in memory, and I have to force-quit it before I can re-open Acorbat.
    Any progress on this issue?

  • Bug sending email with Excel file (immediate reply would he helpfull)

    Hi ,
       Below is have pasted a sample code where it will sends a email along with an attachtment (xls) .where the email is working perfectly but the xls file attachtment has a blank space in the first line .
    where iam facing the problem ,
    ie there should not be any blank lines at the top .
    Please run the code one i have pasted below .u can find the bug .
    can any one help me on this .
    please have ur mail id in ( reclist-receiver ) so that u can check for the output.
    This table requires information about how the data in the
    tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT are
    to be distributed to the documents and its attachments.
    DATA: objpack LIKE sopcklsti1 OCCURS  2 WITH HEADER LINE.
    This table must contain the summarized data dependent on each object type.
    SAPscript objects store information here about forms and styles,
    for example. Excel list viewer objects store the number of rows and columns
    amongst other things and PC objects store their original file name.
    DATA: objhead LIKE solisti1   OCCURS  1 WITH HEADER LINE.
    *CREATION OF INTERNAL TABLE
    DATA : BEGIN OF itobjbin OCCURS 10 ,
           vbeln type vbrp-vbeln,
           matnr type vbrp-matnr,
           werks type vbrp-werks,
           fktyp like vbrk-fktyp,
           END OF itobjbin .
    This table must contain the summarized content of the objects identified as binary objects.
    *DATA: OBJBIN  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
    DATA:   objbin TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                   WITH HEADER LINE.
    DATA: wa_itobjbin LIKE itobjbin .
    This table must contain the summarized content of the objects identified as ASCII objects.
    DATA: objtxt  LIKE solisti1   OCCURS 10 WITH HEADER LINE.
    This table must contain the document recipients.
    DATA: reclist LIKE somlreci1  OCCURS  5 WITH HEADER LINE.
    This structure must contain the attributes of the document to be sent.
    DATA: doc_chng LIKE sodocchgi1.
    DATA: tab_lines LIKE sy-tabix.
    DATA : V_FKTYP LIKE VBRK-FKTYP.
    Creating the document to be sent
    doc_chng-obj_name = 'OFFER'.                      " input contains the attributes of the document to be sent
    doc_chng-obj_descr = 'EMAIL WITH EXCEL DOWNLOAD'.   "input contains title/subject of the document
    *BODY OF THE MAIL
    OBJTXT = 'Hi'.
    APPEND OBJTXT .
    OBJTXT = 'Test for excel download'.
    APPEND OBJTXT.
    OBJTXT = 'Below is the attachment with Billing Document Details'.
    APPEND OBJTXT.
    OBJTXT = 'Regards'.
    APPEND OBJTXT.
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    Creating the entry for the compressed document
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num   = 0.
    objpack-body_start = 1.
    objpack-body_num   = tab_lines.
    objpack-doc_type   = 'RAW'.
    APPEND objpack.
    Creating the document attachment
    (Assume the data in OBJBIN are given in BMP format)
    select vbeln matnr werks
            from vbrp into table itobjbin
            up to 10 rows
            where werks GE '1000'.
    loop at itobjbin.
    select single fktyp into  v_fktyp from vbrk where vbeln = itobjbin-vbeln.
    move v_fktyp to itobjbin-fktyp.
    modify itobjbin.
    endloop.
    PERFORM build_xls_data_table .
    DESCRIBE TABLE objbin LINES tab_lines.
    objhead = 'ABC.XLS'. APPEND objhead.
    Creating the entry for the compressed attachment
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num   = 1.
    objpack-body_start = 1.
    objpack-body_num   = tab_lines.
    objpack-doc_type   = 'XLS'.
    objpack-obj_name   = 'ATTACHMENT'.
    objpack-obj_descr = 'XLS'.
    objpack-doc_size   = tab_lines * 255.
    APPEND objpack..
    Entering names in the distribution list
    reclist-receiver = ''.
    reclist-rec_type = 'U'.
    APPEND reclist.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
         EXPORTING
              document_data = doc_chng
              put_in_outbox = 'X'
              commit_work   = 'X'
         TABLES
              packing_list  = objpack
              object_header = objhead
              contents_bin  = objbin
              contents_txt  = objtxt
              receivers     = reclist
         EXCEPTIONS
              too_many_receivers = 1
              document_not_sent  = 2
              operation_no_authorization = 4
              OTHERS = 99.
    CASE sy-subrc.
      WHEN 0.
        WRITE: / 'Result of the send process:'.
        LOOP AT reclist.
          WRITE: / reclist-receiver(48), ':'.
          IF reclist-retrn_code = 0.
            WRITE 'sent successfully'.
          ELSE.
            WRITE 'not sent'.
          ENDIF.
        ENDLOOP.
      WHEN 1.
        WRITE: / 'no authorization to send to the specified number of',  'recipients!'.
      WHEN 2.
        WRITE: / 'document could not be sent to any of the recipients!'.
      WHEN 4.
        WRITE: / 'no authorization to send !'.
      WHEN OTHERS.
        WRITE: / 'error occurred during sending !'.
    ENDCASE.
    *&      Form  build_xls_data_table
          text
    -->  p1        text
    <--  p2        text
    FORM build_xls_data_table .
    CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
               con_tab TYPE x VALUE '09'.   "OK for non Unicode
    CONCATENATE 'Billing Document' 'Material Number' 'Plant' 'Billing category' ' ' INTO objbin SEPARATED BY con_tab.
    CONCATENATE con_cret objbin  INTO objbin.
    APPEND  objbin.
    LOOP AT itobjbin  .
       CONCATENATE itobjbin-vbeln itobjbin-matnr itobjbin-werks itobjbin-fktyp' '
              INTO objbin SEPARATED BY con_tab.
       CONCATENATE con_cret objbin  INTO objbin.
       APPEND  objbin.
    ENDLOOP.
    thanks in advance,
    vinay .

    Hi ravi ,
         Thanks ,for your help .now xls is working fine .
    but now iam facing a problem with the same function module .for txt files .where all the records are formated in asingle line .
    can u provide a solution for this ,which would be very helpfull.
    below is have attached the sample code .
    Thanks,
    vinay.
    FUNCTION Z_KAILASH_ATTACHMENT1.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(EMAILID)
    *"     VALUE(SUBJECT)
    *"     VALUE(ATYPE)
    *"  TABLES
    *"      ATTACH_FILE STRUCTURE  SOLISTI1
    *"      BODY OPTIONAL
    This table requires information about how the data in the
    tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT are
    to be distributed to the documents and its attachments.
      DATA OBJPACK LIKE SOPCKLSTI1 OCCURS  2 WITH HEADER LINE.
    This table must contain the summarized data dependent on each object type.
    SAPscript objects store information here about forms and styles,
    for example. Excel list viewer objects store the number of rows and columns
    amongst other things and PC objects store their original file name.
      DATA OBJHEAD LIKE SOLISTI1   OCCURS  1 WITH HEADER LINE.
    This table must contain the summarized content of the objects identified as binary objects.
      DATA   OBJBIN TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                     WITH HEADER LINE.
    This table must contain the summarized content of the objects identified as ASCII objects.
      DATA OBJTXT  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
    This table must contain the document recipients.
      DATA  RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE .
    This structure must contain the attributes of the document to be sent.
      DATA: DOC_CHING LIKE SODOCCHGI1.
      DATA: TAB_LINES LIKE SY-TABIX.
    Create the internal table for body , subject
      DATA: IT_BODY LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    CONSTANTS: con_cret TYPE C VALUE cl_abap_char_utilities=>horizontal_tab,
               con_tab TYPE C VALUE cl_abap_char_utilities=>cr_lf.
    Move Body to Internal Table (body into it_body)
      LOOP AT BODY .
        MOVE BODY TO IT_BODY .
        APPEND IT_BODY .
      ENDLOOP.
      DOC_CHING-OBJ_DESCR = SUBJECT.   "Subject of the Email
    Move the Subject and Body to OBJTXT
      OBJTXT[] = IT_BODY[].
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHING-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    CLEAR OBJPACK-TRANSF_BIN.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM   = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM   = TAB_LINES.
    OBJPACK-DOC_TYPE   = 'RAW'.
    APPEND OBJPACK.
    Convert IT to Excel format
    IF ATYPE = 'XLS' .
    *CONSTANTS: con_cret TYPE C VALUE cl_abap_char_utilities=>horizontal_tab,
              con_tab TYPE C VALUE cl_abap_char_utilities=>cr_lf.
      LOOP AT ATTACH_FILE .
        REPLACE ALL OCCURRENCES OF '#' IN ATTACH_FILE WITH con_cret. "  INTO objbin.
        CONCATENATE  ATTACH_FILE con_tab INTO objbin.
        APPEND  objbin.
      ENDLOOP.
    ELSEIF ATYPE = 'TXT' .
      LOOP AT ATTACH_FILE .
        REPLACE ALL OCCURRENCES OF '#' IN ATTACH_FILE WITH con_tab. "  INTO objbin.
        CONCATENATE ATTACH_FILE ' '  INTO OBJBIN .
        APPEND OBJBIN .
      ENDLOOP.
    ENDIF.
    ****End-Code Excel Format .
    DESCRIBE TABLE objbin LINES tab_lines.
    objhead = subject. APPEND objhead.
    Creating the entry for the compressed attachment
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num   = 1.
    objpack-body_start = 1.
    objpack-body_num   = TAB_LINES.
    objpack-doc_type   = ATYPE.
    objpack-obj_name   = 'ATTACHMENT'.
    objpack-obj_descr = 'TEST'. "Attachment File Name
    objpack-doc_size   = TAB_LINES * 255.
    APPEND objpack..
    reclist-receiver = EMAILID.
    reclist-rec_type = 'U'.
    APPEND reclist.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
       DOCUMENT_DATA                    = DOC_CHING
       PUT_IN_OUTBOX                    = 'X'
       COMMIT_WORK                      = 'X'
    IMPORTING
      SENT_TO_ALL                     =
      NEW_OBJECT_ID                   =
      TABLES
        PACKING_LIST                    = OBJPACK
       OBJECT_HEADER                    = OBJHEAD
       CONTENTS_BIN                     = OBJBIN
       CONTENTS_TXT                     = OBJTXT
       RECEIVERS                        =  RECLIST
    EXCEPTIONS
       TOO_MANY_RECEIVERS               = 1
       DOCUMENT_NOT_SENT                = 2
       OPERATION_NO_AUTHORIZATION       = 4
       OTHERS                           = 99 .
    ENDFUNCTION.

  • Bug Appeal: LV6 activeX with Excel; Error -2147319784

    At Thu, 16 Nov 2000 14:55:00
    "Dominic Lavoie" wrote:
    <-2147319784 Old format or invalid type library.
    Dominic and others
    This is an old bug in LabVIEW that I have been fighting
    with for several years. The problem (as I have seen it) is that
    LabVIEW for some reason on some PC's suddenly becomes unable to read
    from the (NT-) registry that Excel is installed as an
    available ActiveX component on the machine. In my case the
    Excel8.olb file.
    Under earlier verion of LabVIEW no error messages
    was generated, but you could see the problem when entering
    the list over ActiveX classes, Type library. Suddenly the Excel
    would be gone from this list, and it will not come back no matter
    how you try to install, reinstall or reconfigure the Excel (or Office)
    system. (And the Regsvr32 program does not handle OLB files.)
    The only way I have heard to fix it, is to reformat the
    harddisk and install the OS and everything fresh. But you might
    see the problem coming back again.
    There might be a possibility that this bug is not NI's, but one
    in the OS. When I use other programs to View/Edit the registry,
    these programs have no problems of detecting the Excel library.
    So I believe it is a LabVIEW bug !
    When working with Excel and ActiveX with this problem
    meant that you had to manually browse to the OLB file each time you
    would want to work with it, or you would sometimes get messed up
    the wires and VI's working against the Excel library.
    Now, under LabVIEW 6i, this situation creates the error message
    -2147319784, and the problem suddenly seems much bigger.
    I have reported this bug two month ago to NI, together with some
    other people that has seen the same problem. So far NI has not
    been able to locate the problem in detail or done anything with it,
    as far as I have been informed.
    This has been a very frustrating experience for me, because there are
    many other features under 6i that I would like to use right away.
    But since I am working a lot with Excel as a data format from LabVIEW,
    I cannot proceed with 6i before they have broken this bug.
    So now I would like the LabVIEW community to help me push NI
    a little in their effort to debug this one.
    All questions of course assuming that you have installed Excel
    on your PC.
    Could as many as possible out there check out if,
    when testing the ActiveX/Excel examples;
    A) under 6i; do you get the Error -2147319784 ? (YES or NO)
    B) under 5.1.1 or earlier; can you run the example Write Table to XL.vi ?
    (YES or NO)
    C) if B=NO, can you locate the Excel library in the ActiveX class list ?
    (YES or NO)
    D) Where in the world are you located (country) ?
    (Some has speculated that this bug might be connected to a problem
    with different OS versions in different parts of the world.)
    E) What version of Excel are you using ?
    F) What OS are you running ?
    If you can't do both A and B/C, send me the one you can.
    Please report your results directly to me.
    DO NOT REPLY TO THIS LIST. I will send a
    summary after a couple of weeks, to let you know
    the results. And also if NI seems to make any progress here.
    best regards
    Martin Plassen

    "[email protected]" wrote in message
    news:[email protected]...
    > Martin, I'm not sure how to reply directly to you. (I can't find your
    > email address or anything.) I may be experiencing a very similar
    > problem. I am trying to generate Excel reports using LabVIEW 6.0
    > under a Windows 2000 OS. Under Win95 in LabVIEW 4 I had no problem
    > but I recently updated. Now I can't even open Excel using the NI
    > distributed LabVIEW 6i Excel toolkits from ni.com. When I execute the
    > Open Excel vi I get a Windows error message, "Labview.exe has
    > generated errors and will be closed by windows. An error log is being
    > created." Could this be the same problem dominic was having under WIN
    > NT?
    dmbillings
    It seems NI has been so kind as to remove the fix on this problem
    from their Knowledgebase. Well, I dug up some old e-mails on the subject,
    and here's one you should look through. According to NI this problem
    should have been fixed under LV 6, so I really hope this is not what you are
    facing...
    Martin
    Good news for all of you,
    we have a bug-fix that seems to do the trick.
    Here's the recipe , with my words:
    Do You have the bug ?
    You can confirm that the bug is there, by opening a new file in LabVIEW,
    in the diagram, insert an Automation Open.VI, right-click on it,
    Select ActiveX class, Browse, and check the Type Library list.
    You should not see the Microsoft Excel5 and 8 library in the list,
    if the bug is there.
    As I have suspected for a long time, the whole bug was related to
    how LabVIEW read the registry at startup to locate all ActiveX
    components on the machine.
    Here's the fix to try out;
    1. Open the RegEdit program
    2. Under HKEY_CLASSES_ROOT locate the TypeLib
    3. Locate the Excel-key
    On my machine this is {00020813-0000-0000-C000-000000000046}
    (You will find it on top part, I think, not necessary to browse long
    down.)
    4. There are two base keys there, named "1.0" and "1.2".
    Under the "1.0"-key, right-click and create new key, name it "0"
    (zero).
    5. Under the new "0"-key, create a new key kalled "win32".
    6. Under the "1.0"-"9"-"win32" key you will find the link to the
    Excel5-library on the machine, copy this link into the key you created
    under pt 5.)
    On my machine this is "C:\Program Files\Microsoft
    Office\Office\XL5EN32.OLB".
    That's all. Exit RegEdit.
    Afterwards, check again that the Microsoft Excel5 and 8 libraries
    is on the LabVIEW list mentioned above. After restarting LabVIEW of
    course. It is not necessary to restart the PC.
    Attached you wil find two gifs showing how this should look
    in RegEdit before and after the described operation.
    Good luck
    PS: hacking around is the registry are do be done with
    caution. The wrong actions here could have large consequences.
    The two attached pictures should help you out,
    but if you feel uncomfortable by working with the registry,
    try to hook on to some hacker around that has been there before.
    As I understand it, this is the reason that NI asked me also not to
    give this info directly to the List-server. So please don't do it
    you either. I plan to put the word out about the fix, not with these
    details, but with a reference to the NI Knowledgebase that soon will
    have this info.
    You are welcome to send me a conformation that you see the
    fix is working, or worst case, not.
    Martin

  • Bug in Excel's handling of metadata? Or at least a deviation from the Open Office XML specification?

    I've discovered some very strange behaviour in Excel which seems to be contrary to that documented in the Open Office XML specification (OOXML). I couldn't find a way to report bugs against Excel, so I thought I'd try to explain the issue here.
    In short it seems that Excel is removing, and incorrectly re-indexing the metadata I programatically associate with cells.
    First, a summary of the relevant parts of the specification:
    From OOXML 18.9: There are two types of metadata: "cell metadata" and "value metadata".
    Cell metadata follows the cell as it moves. Value metadata follows the value through formulae etc.
    From OOXML 18.3.1.4: The c (cell) element has cm and vm attributes which are both documented as "The zero-based index of the [cell|value] metadata...in the Metadata Part"
    From OOXML 18.9.17: The valueMetadata is "a collection of block element that each define the value metadata for a particular cell". "Cells in the workbook index into this collection".
    The valueMetadata contains bk elements which in turn contain rc (metadata record) elements
    From OOXML 18.9.15: rc elements have t (type index) and v (value index) attributes. t is a 1-based index into metadataTypes and v is a 0-based index into the futureMetadata element which matches the name of the metadata type.
    Here's an example of what this might look like:
    <c vm="0"> <!-- vm points to the first bk inside valueMetadata below -->
    <x:valueMetadata>
    <x:bk>
    <x:rc t="1" v="0" /> <!-- t points to the first metadataType below. v points to the first bk in the futureMetadata below (whose name matches the metadataType to which t points) -->
    </x:bk>
    </x:valueMetadata>
    <x:metadataTypes>
    <x:metadataType name="MyMetaType" ... /> <!-- name dictates which futureMetadata valueMetadata's v attribute indexes into -->
    </x:metadataTypes>
    <x:futureMetadata name="MyMetaType" ...>
    <x:bk>
    <x:extLst>
    <x:ext xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main" uri="http://example.com/extension" p5:value="test value" xmlns:p5="http://example.com/extension" />
    </x:extLst>
    </x:bk>
    </x:futureMetadata>
    The Problem
    From what I can tell, for values of n > 2, if you associate n cells with metadata, Excel will drop the last piece of metadata, and the one at index 1, and it will do so silently. The indices are then 0..n-3, and the association for all but the first (0
    index) will be wrong. This renders the future metadata totally useless.
    For n == 1, Excel just removes the last piece of metadata (index 1). If we try 1-based indexes for the vm attribute on the c element, we get different behaviour. This may not be relevant as it is contrary to the specification, but the slightly better behaviour
    might indicate an off-by-one error:
    n
    Deleted Indices (0-based) when using 0-based indices
    Deleted Indices (0-based) when using 1-based indices
    1
    0
    None
    2
    1
    1
    3
    1,2
    1
    4
    1,3
    1
    5
    1,4
    1
    6
    1,5
    1
    Demonstrating the Problem
    I have some example code[1] that demonstrates the problem. You will need a file called test.xlsx with cells A1..C2 populated.
    Compile the source as AddMetadata.exe then run with the test file as the only parameter:
    > AddMetadata.exe test.xlsx
    You can look at test.xlsx in Excel, Visual Studio (with the Open XML Package Editor Power Tool for Visual Studio 2010) or the Open XML SDK 2.0 Productivity Tool for Microsoft Office. Looking at the file before and after running AddMetadata.exe you should
    be able to reproduce the behaviour documented above.
    Summary
    It would be good to know if this is really an Excel bug or whether we're doing something wrong / unsupported. Any insight would be very much appreciated.
    [1] The Example code:
    namespace AddMetadata
    using System;
    using System.Linq;
    using DocumentFormat.OpenXml;
    using DocumentFormat.OpenXml.Packaging;
    using DocumentFormat.OpenXml.Spreadsheet;
    public class Program
    // The cells to associate with metadata
    private readonly static CellSpec[] CellSpecs = new[]
    new CellSpec{ Sheet = "Sheet1", Column = "A", Row = 1 },
    new CellSpec{ Sheet = "Sheet1", Column = "B", Row = 1 },
    new CellSpec{ Sheet = "Sheet1", Column = "C", Row = 1 },
    new CellSpec{ Sheet = "Sheet1", Column = "A", Row = 2 },
    new CellSpec{ Sheet = "Sheet1", Column = "B", Row = 2 },
    new CellSpec{ Sheet = "Sheet1", Column = "C", Row = 2 },
    private static readonly uint NumCells = (uint)CellSpecs.Length;
    private const string SPREADSHEET_ML_NS = "http://schemas.openxmlformats.org/spreadsheetml/2006/main";
    private const string METADATA_TYPE_NAME = "MyMetaType";
    private const string EXTENSION_URI = "http://example.com/extension";
    public static void Main(string[] args)
    if (args.Length != 1)
    Console.Out.WriteLine("AddMetadata <doc.xslx>");
    Console.Out.WriteLine(" Adds metadata to the specified document to demonstate some strange Excel behaviour");
    Environment.Exit(1);
    try
    var doc = SpreadsheetDocument.Open(args[0], true);
    StripMetadata(doc);
    AddMetadata(doc);
    AddMetadataType(doc);
    AddFutureMetadata(doc);
    AddMetadataRecords(doc);
    AssociateCellsWithMetadata(doc);
    doc.WorkbookPart.Workbook.Save();
    doc.Close();
    catch(Exception e)
    Console.Out.WriteLine(e);
    /// <summary>
    /// Strip any existing metadata.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void StripMetadata(SpreadsheetDocument doc)
    var wbPart = doc.WorkbookPart;
    var cellMetadataPart = wbPart.GetPartsOfType<CellMetadataPart>().FirstOrDefault();
    wbPart.DeletePart(cellMetadataPart);
    /// <summary>
    /// Add basic metadata part structure.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void AddMetadata(SpreadsheetDocument doc)
    doc.WorkbookPart.AddNewPart<CellMetadataPart>();
    doc.WorkbookPart.CellMetadataPart.Metadata = new Metadata { MetadataTypes = new MetadataTypes() };
    /// <summary>
    /// Add the metadata type used by all the metadata we're adding
    /// </summary>
    /// <param name="doc"></param>
    private static void AddMetadataType(SpreadsheetDocument doc)
    var metadata = doc.WorkbookPart.CellMetadataPart.Metadata;
    var metadataType = new MetadataType
    Name = METADATA_TYPE_NAME,
    Assign = false,
    CellMeta = false,
    ClearContents = false,
    ClearAll = false,
    ClearComments = true,
    ClearFormats = true,
    Coerce = false,
    Copy = true,
    Delete = false,
    Edit = true,
    Merge = true,
    MinSupportedVersion = 0U,
    PasteAll = true,
    PasteBorders = false,
    PasteColWidths = false,
    PasteComments = false,
    PasteDataValidation = false,
    PasteFormats = false,
    PasteFormulas = false,
    PasteNumberFormats = false,
    PasteValues = true,
    RowColumnShift = true,
    SplitAll = false,
    SplitFirst = false
    metadata.MetadataTypes.AppendChild(metadataType);
    /// <summary>
    /// Add future metadata blocks which contain the actual metadata for each cell.
    /// They are referenced by the metadata records.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void AddFutureMetadata(SpreadsheetDocument doc)
    var metadata = doc.WorkbookPart.CellMetadataPart.Metadata;
    var futureMetadata = metadata.AppendChild(new FutureMetadata());
    futureMetadata.Name = METADATA_TYPE_NAME;
    futureMetadata.Count = NumCells;
    // Future metadata area
    for (var i = 0; i < NumCells; i++)
    // The metadata for each cell will be single FutureMetadataBlock containing an extension list with a single extension.
    FutureMetadataBlock futureMetadataBlock = futureMetadata.AppendChild(new FutureMetadataBlock());
    ExtensionList extLst = futureMetadataBlock.AppendChild(new ExtensionList());
    Extension ext = extLst.AppendChild(new Extension());
    ext.Uri = EXTENSION_URI;
    ext.AddNamespaceDeclaration("x", SPREADSHEET_ML_NS);
    ext.SetAttribute(new OpenXmlAttribute("value", ext.Uri, string.Format("test value {0}", i)));
    /// <summary>
    /// Add metadata records which point to each future metadata block.
    /// They are in turn referenced by the cells.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void AddMetadataRecords(SpreadsheetDocument doc)
    var metadata = doc.WorkbookPart.CellMetadataPart.Metadata;
    // Value metadata area
    ValueMetadata valueMetadata = metadata.AppendChild(new ValueMetadata());
    for (uint i = 0; i < NumCells; i++)
    // Type is 1-indexed, index into future metadata is 0-indexed
    var metadataBlock = valueMetadata.AppendChild(new MetadataBlock());
    var metadataRecord = metadataBlock.AppendChild(new MetadataRecord());
    metadataRecord.Val = i;
    metadataRecord.TypeIndex = (uint)1;
    /// <summary>
    /// Associate existing cells with existing metadata.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void AssociateCellsWithMetadata(SpreadsheetDocument doc)
    for (uint i = 0; i < CellSpecs.Length; i++)
    var cellSpec = CellSpecs[i];
    var cell = GetCell(doc, cellSpec.Sheet, cellSpec.Column, cellSpec.Row);
    if (cell == null)
    throw new ArgumentException(string.Format("Cell {0} not found in row {1} of sheet {2}", cellSpec.Column, cellSpec.Row, cellSpec.Sheet));
    cell.ValueMetaIndex = i;
    /// <summary>
    /// Get a cell given the document, sheet name, column name and row index.
    /// </summary>
    /// <param name="doc">The document</param>
    /// <param name="sheetName">The sheet name</param>
    /// <param name="columnName">The column name</param>
    /// <param name="rowIndex">The row index</param>
    /// <returns>The cell</returns>
    private static Cell GetCell(SpreadsheetDocument doc, String sheetName, String columnName, uint rowIndex)
    var row = GetRow(doc, sheetName, rowIndex);
    if (row == null)
    throw new ArgumentException(string.Format("Row '{0}' not found", rowIndex));
    return row.Elements<Cell>().Where(c => c.CellReference.Value.StartsWith(columnName)).FirstOrDefault();
    /// <summary>
    /// Get a worksheet part by sheet name.
    /// </summary>
    /// <param name="document">The document</param>
    /// <param name="name">The sheet name</param>
    /// <returns>The worksheet part</returns>
    private static WorksheetPart GetWorksheetPartByName(SpreadsheetDocument document, string name)
    // Get Sheet by name from Sheets in Workbook
    var sheet = document.WorkbookPart.Workbook.GetFirstChild<Sheets>().Elements<Sheet>().Where(x => x.Name == name).FirstOrDefault();
    // Lookup WorksheetPart by Id
    return sheet == null ? null : (WorksheetPart)document.WorkbookPart.GetPartById(sheet.Id.Value);
    /// <summary>
    /// Get a row given the document, sheet name and row index.
    /// </summary>
    /// <param name="doc">The document</param>
    /// <param name="sheetName">The sheet name</param>
    /// <param name="rowIndex">The row index</param>
    /// <returns>The row</returns>
    private static Row GetRow(SpreadsheetDocument doc, String sheetName, uint rowIndex)
    var worksheetPart = GetWorksheetPartByName(doc, sheetName);
    if (worksheetPart == null)
    throw new ArgumentException(string.Format("Sheet '{0}' not found", sheetName));
    return worksheetPart.Worksheet.GetFirstChild<SheetData>().Elements<Row>().Where(r => r.RowIndex == rowIndex).First();
    struct CellSpec
    public string Sheet;
    public string Column;
    public uint Row;

    If you create a metadatatype with a single metdata block, and you reference that in your vm/cm cell attribute using a *one* based index, Excel seems to see the link and it honors it when saving the spreadsheet.
    So, I ended up with something like:
    <c ... cm="1"/> (I'm dealing with cell metadata, but the concept is equivalente to value metadata)
    <metadataTypes count="1">
      <metadataType name="MyMetaType" .../>
    </metadataTypes>
    <futureMetadata count="1" name="MyMetaType">
      <bk>
        <extLst><ext
    uri="http://example" xmlns:x="http://example"><x:val>87</x:val></ext></extLst>
      </bk>
    </futureMetadata>
    <cellMetadata count="1">
      <bk><rc
    t="1" v="0"/></bk> <!-- this is what gets referenced as cm=1 on the cell -->
    </cellMetadata>
    Hope this helps. 

  • A serious issue with excel file read in ODI

    hi gurus,
    Issue with excel file read is that we can read only one file by setting the path from ODBC Data Source Administrator-->System DNS -->Select Work book
    what i want to read the dynamic path(Every time I cant go back and set the Work book to select the excel file..
    So i came up with a solution to write a Vbscript that convert the excel to csv my problem got solved for dynamic paths the script is as follow:
    Set objArgs = WScript.Arguments
    For I = 0 to objArgs.Count - 1
    FullName = objArgs(I)
    FileName = Left(objArgs(I), InstrRev(objArgs(I), ".") )
    Set objExcel = CreateObject("Excel.application")
    set objExcelBook = objExcel.Workbooks.Open(FullName)
    objExcel.application.visible=false
    objExcel.application.displayalerts=false
    objExcelBook.SaveAs FileName & "csv",23
    objExcel.Application.Quit
    objExcel.Quit
    Set objExcel = Nothing
    set objExcelBook = Nothing
    Next
    Now this script convert the xls file to csv with comma seprated values
    e.g in excel sheet if data is ABC XYZ PQR
    csv will come with ABC,XYZ,PQR
    here the delimiter is , i want the delimiter as pipe | who's ascii code is 124
    but if i change 23 with 124 its not working i getting the error cannot save as...
    can anyone tell me that what should be the correct code for pipe
    so that the output is ABC|XYZ|PQR
    AS WE CAN USE THE SCRIPTS IN TOOLS
    Edited by: 789141 on Sep 14, 2010 11:33 PM

    I dont have the answer for your question but i have different approach in handling multiple Excel File.
    Step 1. Copy a sample source Excel File and Call it Final.xls .
    Step 2. Map this Final.xls to DSN and in Topology call this Final.xls
    Step 3. Do the Reversing and Map and test the Interface . Once its done.
    Step 4. Create a Package and using a http://odiexperts.com/?p=1426 get the list of all the Excel File
    Step 5 . Using this http://odiexperts.com/?p=273 create a Loop to Read the Excel File name
    Step 6 . Copy using OdiFileCopy to Final.xls and run your interface .
    Step 7. Increment the Loop and copy your next File for Final and run the interface
    Step 8 . Finally you will be able to read all the Excel File .
    Step 9 . Delete the source file [ Optional ]
    Hope this helps.

  • Performance issue when opening DOCX Word Doc with Excel Links

    Is this a bug or is there a config setting that can prevent Word from needlessly opening Excel repeatedly (upon initial open of a DOCX Word doc) when pre-existing links should NOT be updated. The behavior is good using 2003 formats (DOC & XLS),
    but varies significantly (~100:1 range in performance) depending on the test scenario (see below) using DOCX with XLSX.
    We can't move our environment to the new XML formats until we can find a fix. We were led to believe Microsoft knew this to be a bug in Office 2007, but it has NOT been corrected in Office 2010. Omitting a detailed explanation for why we need to
    do this, here's our test scenarios:
    -Currently testing Office 2010 Pro Trial version on WIN XP SP3. (We have found similar results using Office 2007 with Win7 or XP).
    -Word Option Deselected/DISABLED: "Update Automatic Links at Open"
    -The Word Doc contains 100 linked Excel tables and is 130K in size (DOCX).
    -Each link points to the same 10x10 cell range in one Excel Workbook located in same directory as the Word Doc, although other tests using separate directories produced similar results.
    -The Excel Links were inserted into Word via Paste Special/Paste Link/MS Excel Worksheet Object.
    -The workbook (XLSX) is 15K in size.
    -All Links are set for "Manual" update, our testing showed no difference if links are set to "Auto".
    -Again, Word is set to NOT update Automatic links when the document is opened.
    -Results shown below are for local hard drive test.
    -Network response times are slightly greater on 100mb LAN
    -Word is completely restarted prior to each test to make sure there's no application caching involved.
    LOCAL DRIVE RESPONSE TIMES TO OPEN THE WORD DOC in Docx format:
    1. Open the Word Doc from Word with Excel closed - 175 seconds (Excel appears to be opened and closed once per link)
    2. Open the Word Doc from Word with Excel open & workbook closed - 33 seconds (Excel appears to be accessed once per link)
    3. Open the Word Doc from Word with the linked workbook already open - 7 seconds (Excel appears to be accessed once per link)
    4. Rename Excel XLSX workbook so that Word can't find it. Then open Doc the from Word. 1-2 seconds (Excel does not appear to be invoked)
    5. Repeat ALL of the above scenarios 1-4 using DOC and XLS files. These files are created with "Save AS" option based on original test files and then re-pasting the links.  1-2 seconds to open the Word Doc (Excel does not appear to be invoked)
    Summary
    Using DOCX/XLSX, if Word can't find the linked spreadsheet it gives up and performs nicely during file-open. Otherwise, Word performs needless, time-consuming access to Excel, and in the worst case, opens and closes Excel repeatedly in the background.
    Testing with DOC/XLS formats gives good performance across all scenarios.

    It is a known bug and one for which AFAIK, there has been no fix.  The only way that I could get around it in a particular application was to do something like save the linked information as document variables and then on opening the document recreate
    all the information.  My memory on exactly what I did is a bit hazy, but I can go back and check if you are interested.
    -- Hope this helps.
    Doug Robbins - Word MVP,
    dkr[atsymbol]mvps[dot]org
    Posted via the Community Bridge
    "galmcrantz" wrote in message news:[email protected]...
    Is this a bug or is there a config setting that can prevent Word from needlessly opening Excel repeatedly (upon initial open of a DOCX Word doc) when pre-existing links should NOT be updated. The behavior is good using 2003 formats (DOC & XLS), but varies
    significantly (~100:1 range in performance) depending on the test scenario (see below) using DOCX with XLSX.
    We can't move our environment to the new XML formats until we can find a fix. We were led to believe Microsoft knew this to be a bug in Office 2007, but it has NOT been corrected in Office 2010. Omitting a detailed explanation for why we need to do this,
    here's our test scenarios:
    -Currently testing Office 2010 Pro Trial version on WIN XP SP3. (We have found similar results using Office 2007 with Win7 or XP).
    -Word Option Deselected/DISABLED: "Update Automatic Links at Open"
    -The Word Doc contains 100 linked Excel tables and is 130K in size (DOCX).
    -Each link points to the same 10x10 cell range in one Excel Workbook located in same directory as the Word Doc, although other tests using separate directories produced similar results.
    -The Excel Links were inserted into Word via Paste Special/Paste Link/MS Excel Worksheet Object.
    -The workbook (XLSX) is 15K in size.
    -All Links are set for "Manual" update, our testing showed no difference if links are set to "Auto".
    -Again, Word is set to NOT update Automatic links when the document is opened.
    -Results shown below are for local hard drive test.
    -Network response times are slightly greater on 100mb LAN
    -Word is completely restarted prior to each test to make sure there's no application caching involved.
    LOCAL DRIVE RESPONSE TIMES TO OPEN THE WORD DOC in Docx format:
    1. Open the Word Doc from Word with Excel closed - 175 seconds (Excel appears to be opened and closed once per link)
    2. Open the Word Doc from Word with Excel open & workbook closed - 33 seconds (Excel appears to be accessed once per link)
    3. Open the Word Doc from Word with the linked workbook already open - 7 seconds (Excel appears to be accessed once per link)
    4. Rename Excel XLSX workbook so that Word can't find it. Then open Doc the from Word. 1-2 seconds (Excel does not appear to be invoked)
    5. Repeat ALL of the above scenarios 1-4 using DOC and XLS files. These files are created with "Save AS" option based on original test files and then re-pasting the links.  1-2 seconds to open the Word Doc (Excel does not appear to be invoked)
    Summary
    Using DOCX/XLSX, if Word can't find the linked spreadsheet it gives up and performs nicely during file-open. Otherwise, Word performs needless, time-consuming access to Excel, and in the worst case, opens and closes Excel repeatedly in the background.
    Testing with DOC/XLS formats gives good performance across all scenarios.
    Doug Robbins - Word MVP dkr[atsymbol]mvps[dot]org

  • IE7 Padding Bug with Spry Effects

    I'm having a recurring issue with using the Spry Blind effect
    in IE7 where, when upon trigerring the Blind, the width of the
    element being expanded/contracted is expanding out to the right
    over it's edges.
    For example.
    A div with a width of 800px and a padding of 20px;
    When a Blind is triggerred on this element, the width of the
    element would expand to 840px, the padding on the left side remains
    fine, but the text now goes all the way to the right edge of the
    newly widened element.
    This has been extremely frustrating and doesn't occur in
    Firefox.
    I'm hoping this is a common problem. My implementation of the
    script is fairly straightforward so I don't know if there is
    anything else but a bug with the effect.

    Here is a somewhat messy version of the page I am working
    with.
    http://derekprospero.com/michael/example.html
    If you click the green down arrow at the bottom of the top
    right pane you will see the error.
    The table expands out past the borders of the div. The
    padding-left and padding-right on this div is 20px each, and it
    expands out to 40px past the border of the div, so I am assuming
    there is some correlation.
    It also happens on the bottom one, though it is not as
    evidence, since the text goes behind the background, isntead of
    over it.

  • Connecting SAP with Excel (Beginner)

    Hello!
    I'm new to the SAP scripting. On my company we use lots and lots of Excel spreadsheet lists with sales orders and projects, which is why i need to learn to connect those lists with SAP.
    I have a list of sales orders in Excel starting downwards from cell A2 and I want to get the exchange rate on each of the orders from the header of VA03, so that the script copies the currency rate of each sales order next to the order number in the spreadsheet.
    How do i do this? :s
    Thanks, Mattias

    Hi Mattias,
    if you have allready worked with Scripting (Recording) you allready have the way to connect excel with SAP
    To Connect an existing Instance of SAP with Excel you will need this code:
    Public sapsession
    Public Sub Connect_SAP()
    If Not IsObject(SAPguiApp) Then
    Set SAPguiApp = CreateObject("Sapgui.ScriptingCtrl.1")
    End If
    If Not IsObject(sapsession) Then
    Set sapsession = sapConnection.Children(0)
    End If
    If IsObject(WScript) Then
    WScript.ConnectObject sapsession, "on"
    WScript.ConnectObject sapApplication, "on"
    End If
    End Sub
    at end of all action you have to destroy all objects
    Public Sub Destory_SAP()
    set sapsession = nothing
    set sapapplication = Nothing
    set sapGuiapp = Nothing
    End Sub
    PS Look for Threads that have the same Title as yours -
    There are many in this forum ...
    Greetings
    Thomas B

  • Essbase excel add in conflicts with Excel 2007

    Has anyone encountered issues when using the essbase excel add-in on Excel 2007?
    Is there a fix or newer add-in version?

    user3055639 wrote:
    thanks
    I will be installing essbase version 11 shortly, I assume this problem will be fixed in this release?Not sure.
    Extracts from Oracle Essbase Release 11.1.1.3 readme file > Known Issues:
    +Spreadsheet Add-in: Spreadsheet Add-in does not support worksheet sizes greater than 65,536 rows by 256 columns. [7486542]+
    +Spreadsheet Add-in: With Excel 2007 on Windows XP or Windows Vista, running a VB script to log into a spreadsheet results in slow connection times. [7035038]+
    "

  • PL/SQL + XML with Excel report format?

    Dear all,
    I am a new beginner in XML Publisher. For the EBS11i, I can use PL/SQL with http scripts to generate excel report format.
    The following code will include in store procedure:
    >
    begin
    owa_util.mime_header(ccontent_type => 'application/vnd.ms-excel');
         htp.htmlopen;
         htp.headopen;
         htp.print( '<STYLE>' );
    htp.print( '<!--'||
              '.xl24' ||
              '{mso-style-parent:style0;' ||
                     'mso-number-format:"\@";}' ||
    '.xl41' ||
         '{mso-style-parent:style0;' ||
                   'mso-NUMBER-format:"\#\,\#\#0\.000";}' ||
    '.xl42' ||
         '{mso-style-parent:style0;' ||
                   'mso-NUMBER-format:"\#\,\#\#0\.00";}' ||
    '.xl45' ||
         '{mso-style-parent:style0;' ||
                    'mso-NUMBER-format:"\#\,\#\#0";}' ||
    '-->' );
         htp.print( '</STYLE>' );     
         htp.headclose;
         htp.bodyopen;
         htp.para;
         htp.strong( '<U>' || 'Sample Report Name'|| '</U>');
         htp.para;
    htp.tablerowopen;
         htp.tabledata('<DIV align="left">' || rec_main2.vendor_name || '</DIV>',cattributes => ' class="xl24" width="190"');
    htp.tablerowclose
    >
    How can I do that in R12?
    Please advice.

    We currently do not support SQL aliasing of directories. This
    is causing your errors.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Frank Hubeny (guest) wrote:
    : I think I got past this point by first creating a directory
    : under sys and then granting read privileges to owner of the
    : domsample procedure (in my case the this user is called "xml").
    : create directory xml as 'e:\web\xml';
    : grant read on directory xml to xml;
    : Then the call becomes (I think)
    : exec domsample ('XML','family.xml','test.err')
    : However, I am getting the following error:
    : ERROR at line 1:
    : ORA-20100: Error occurred while parsing: XML/err.log
    : ORA-06512: at "XML.XMLPARSER", line 43
    : ORA-06512: at "XML.XMLPARSER", line 120
    : ORA-06512: at "XML.DOMSAMPLE", line 80
    : ORA-06512: at line 1
    : The readme says "It is necessary for the user running
    : this sample to have been granted the appropriate security
    : priveleges to read and write from a file on the file
    : system." I am not sure what the "write" grant would be.
    : And so I also set utl_file_dir so that it pointed to
    : the directory. But somehow I don't think that utl_file is
    : needed in this context. In any case, it appears I cannot write
    : to the err.log file or find it.
    : Brad Douglass (guest) wrote:
    : : I'm receiving the following error when I use the domsample
    : : procedure supplied with the PL/SQL XML parser:
    : : SQL> exec domsample('e:\web\xml','test.xml','test.err');
    : : begin domsample('e:\web\xml','test.xml','test.err'); end;
    : : ERROR at line 1:
    : : ORA-20101: Error occurred while accessing a file or URL:
    : unknown
    : : protocol: file
    : : ORA-06512: at "XML.XMLPARSER", line 46
    : : ORA-06512: at "XML.XMLPARSER", line 164
    : : ORA-06512: at "XML.DOMSAMPLE", line 77
    : : ORA-06512: at line 1
    : : UTL_FILE doesn't have any problems with the file.
    : : Any ideas?
    null

  • Removing BCC with Apple Script when automatically BCC myself is set in pref

    I have "Automatically Bcc myself" set in the Mail Composing preferences, which I like because I get a copy of email that I send. I also have an apple script that forwards messages to an email address. When I used this apple script on Tiger, the BCC option was never added (it might have been a bug with Mail in Tiger); however, now on Leopard, the BCC option is always added when I used the apple script.
    I've tried setting the BCC field to Null and Blank, but that doesn't seem to work. I suspect that the field is set upon send or the "make new" directive. Does anyone know a way to tell Mail to not Bcc automatically in an Apple Script?
    Here is the forward apple script program:
    (* Cf. http://www.macosxhints.com/article.php?story=20060219014940761 *)
    (* RS 31st July 2006 *)
    set theAuthority to "person AT here"
    tell application "Mail"
    set theMessages to the selection
    repeat with thisMessage in theMessages
    set newMessage to make new outgoing message at end of outgoing messages
    tell newMessage
    set visible to true (* comment out whole line to stop 'blinking' windows *)
    set content to thisMessage's source
    set subject to "Fwd: " & thisMessage's subject
    set bcc to null (* my attempt to set bcc to null or blank *)
    make new to recipient with properties {address:theAuthority}
    end tell
    send newMessage
    set read status of thisMessage to true
    set was forwarded of thisMessage to true
    set junk mail status of thisMessage to true
    end repeat
    end tell

    Thanks for that reply!
    After more google searching, I found this on http://www.macosxhints.com/article.php?story=20040425063255443
    One of the responses said that you can add the lines:
    delete bcc recipients
    delete cc recipients
    "in that order" to the new message tell and get rid of the recipients. I had tried the delete before, but I thought I had to get the recipients before I deleted them. I'm not a very good apple script person. Here is my final script
    (* Cf. http://www.macosxhints.com/article.php?story=20060219014940761 *)
    (* RS 31st July 2006 *)
    set theAuthority to "email address here"
    (* or your personal Knujon address *)
    tell application "Mail"
    set theMessages to the selection
    repeat with thisMessage in theMessages
    set newMessage to make new outgoing message at end of outgoing messages
    tell newMessage
    set visible to false (* comment out whole line to stop 'blinking' windows *)
    set content to thisMessage's source
    set subject to "Fwd: " & thisMessage's subject
    make new to recipient with properties {address:theAuthority}
    delete bcc recipients
    delete cc recipients
    end tell
    send newMessage
    set read status of thisMessage to true
    set was forwarded of thisMessage to true
    set junk mail status of thisMessage to true
    end repeat
    end tell

  • UAT with Test Script

    hi
    give me description about UAT with Test Script  in MM

    Hi ,
    UAT is user acceptance test , carried out by end user from the business .
    It includes business process in test script where each and every step is mentioned with person from business responsible in executing the step,
    it includes SAP t code to execute the step,
    Responsible stream like P2P , O2C etc
    Name of the person executing the step,
    Necessary Input data for particular step,
    Expected results,
    actual results,
    status of the step like, ok , not tested, error , minor issue,
    Error description,
    All these are contained in detail in excell sheet, where end user follow each step to execute and record the results.
    It is carried before Go live and UAT has to pass successfully for go live

  • Better cooparation with Excel to place cells

    better cooperation with excel to punt in cells with place option.
    us defined names of cells so when you make a coupling with the range (name) you have not change our rang A1:f28
    i something that the system Indesign now when excel have a head row ( now i allways must tell indesign after rellink what the head row are)

    It's a bug. The only workaround is to save back to XLS.
    Adobe is aware of it but if you want to report it you can do so here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    Bob

Maybe you are looking for

  • Report Designer error i VS 2013 - "Data at the root level is invalid."

    Hi, I am trying to create rdlc file programmatically. Using Memory Table as dataset. Here is my code ' For each field in the resultset, add the name to an array listDim m_fields AsArrayList   m_fields = NewArrayList()   Dim i AsIntegerFor i = 0 To tb

  • Error occurred in deployment step 'Activate Features': Operation is not valid due to the current state of the object.

    I recently copied a solution from one dev box to another. After pushing through a handful of other errors I hit a wall with this one. Any hints as to the human translation would be appreciated. The solution works on the original box. Also if there's

  • Hard Drive Not detected after replacing DC In Board

    So after more than a year of jiggling an easliy bent AC adapter in the port to get my ibook G4 to charge it just quit and would not charge. I suspected it was the slightly loose DC in port (having no idea what was behind the little hole) so I took it

  • Apple iPod Nano Replacement Program HELP?

    I requested the replacement in mid November, but never received any box or packaging in which to send the product back to Apple. Yet when I check the repair status on the site, it says it was dispatched. What do I do?

  • Web intelligence Report timing out

    Hi We are using BO XI 2. Recently we have started facing an issue with some of our reports. The reports started failing after a database bounce. We are using Oracle Database. Before the bounce the reports used to be generated within 15 minutes. After