Unwanted prefix of "Copy of " added to file name of opened Excel attachments

How can I stop the prefix of "Copy of " from being added to the file name when I save an Excel file that was mailed as an attachment?  
It is very annoying to have to keep deleting that unwanted addition to my filenames.  

1) Don't open attachments - save them first and then open them.
2) You can use this code in the ThisWorkbook object of your Personal.xls:
Private WithEvents App As Application
Private Sub App_WorkbookBeforeSave(ByVal Wb As Workbook, ByVal SaveAsUI As Boolean, Cancel As Boolean)
    If InStr(1, Wb.Name, "Copy of ") = 1 Then
        Application.EnableEvents = False
        Cancel = True
        Wb.SaveAs Replace(Wb.FullName, "Copy of ", "")
        Application.EnableEvents = True
    End If
End Sub
Private Sub Workbook_Open()
    Set App = Application
End Sub
HTH, Bernie

Similar Messages

  • Cannot 'Consolidate Library" : Copying music failed , the file name was too

    Hi,
    I am trying to move all the music library to my new computer ( this is my 3rd time of changing my PC). I tried to consolidate the library... but the message was
    Copying music failed , the file name was invalid or too long"
    I already moved the Itunes to my new pc, but my new Itunes cannot "Relocating my file"
    Please help me

    To find out which file it was, look at where you were
    copying them too and see which was the last file
    copied - and then go back to your source, and go to
    the next one - it should be that one.
    I just wanted to add that I had the same issue (failure to finish copying and "invalid or too long" error msg) and at first didn't see how looking for the last file copied would work since iTunes is copying into folders.
    Duh.
    Reverse sort by date modified (newest folder at the top of the list) then drill down to the folder containing the files being copied. Voila. There was the (missing) culprit, and I knew which file to rename in the source folder.
    Thanks for the kick in the brain pan.
    Sony VAIO PCG-V505ACP Windows XP Pro

  • How to copy the photo with file name at window 7 and search specific one in iphone 4s?

    How to copy the photo with file name at window 7 and search specific one in iphone 4s?

    Clendenen02 wrote:
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    This Bash script will do it.
    Edit "PicDir" and "MovDir" to the location of your Folders
    (Note: The comment is written to the m4v file using xattr, so the Spotlight comment field appears blank in Finder, but the comment metadata is still indexed by Spotlight (If you add a Spotlight comment from Finder, it is stored both as an extended attribute and in a .DS_Store file)
    #!/bin/bash
    PicDir=$HOME/Desktop/Pictures
    MovDir=$HOME/Desktop/Movies
    for f in $PicDir/*
    do
         if [ ! -d "$f" -a "${f##*.}" == "jpeg" ]; then
              comment=$(mdls -raw -name kMDItemFinderComment "$f")
              if [[ $comment != "(null)" ]]; then
                   picname=${f##*/}
                   movname=${picname%.*}.m4v
                   if [ -e "$MovDir"/$movname ]; then
                         xattr -w com.apple.metadata:kMDItemFinderComment "\"$comment\"" "$MovDir"/$movname
                   fi
              fi
         fi
    done

  • Adding the file name and path to a document

    Is there a way to automatically generate the file name and path (i.e. 'P:\ARF530\BACKGROUND\diagram.ai') to a document without having to copy and paste from the explorer window?

    Hi,
    So to select the directory, in the WHNE-BUTTON-PRESSED trigger write,
         :<block_name>.<path_item_name> := GET_FILE_NAME(' ', NULL, NULL, 'Choose any directory.', OPEN_FILE, FALSE);
         IF SUBSTR(:<block_name>.<path_item_name>, LENGTH(:<block_name>.<path_item_name>)) != '/' AND SUBSTR(:<block_name>.<path_item_name>, LENGTH(:<block_name>.<path_item_name>)) != '\' THEN
              :<block_name>.<path_item_name> := :<block_name>.<path_item_name> || '\';
         END IF;and to open the file, write,
    DECLARE
      FT_File  TEXT_IO.FILE_TYPE;
    BEGIN
      IF SUBSTR(:<block_name>.<path_item_name>, LENGTH(:<block_name>.<path_item_name>)) = '/' OR SUBSTR(:<block_name>.<path_item_name>, LENGTH(:<block_name>.<path_item_name>)) = '\' OR :<block_name>.<path_item_name> IS NULL THEN
           MESSAGE('Please Enter file name before continue');
           MESSAGE('Please Enter file name before continue');
           RAISE FORM_TRIGGER_FAILURE;
      END IF;
      FT_File := TEXT_IO.FOPEN(:<block_name>.<path_item_name>, 'w');
    END;Regards,
    Manu.
    If my response or the response of another was helpful or Correct, please mark it accordingly

  • Additional words added to file name

    For certain forms, when the user submits the form the file name, as expected, is the name that I gave the form. But additionally, Adobe Acrobat Pro.pdf is added after the file name. See figure. Is there a way to keep the "Adobe Acrobat Pro.pdf" from being added?
    Thanks,
    MDawn

    I have a submit button that "clicks" a hidden button. The hidden button has script that verifies that all
    required fields are filled in. Script on that button "clicks" another invisible button which opens email where
    the user selects the email recipients.
    I put the script you suggested in the PreSubmit event of the form, and then each of the Submit buttons and none of these worked.
    Thanks,
    MDawn

  • How to auto save output with date added to file name, and email the results?

    Hi,
    We found a script to capture disk space usage, that automatically places the results into an Excel file. We would like the script to autosave this file to a specific directroy with the date ran as part of teh file name. We would then like these results to
    be emailed to us if possible. (also if possible to highlight cell in red that is 5% OR less available disk space would be great)
    Here is what we have:
    $erroractionpreference = “SilentlyContinue”
    $a = New-Object -comobject Excel.Application
    $a.visible = $True
    $b = $a.Workbooks.Add()
    $c = $b.Worksheets.Item(1)
    $c.Cells.Item(1,1) = “Machine Name”
    $c.Cells.Item(1,2) = “Drive”
    $c.Cells.Item(1,3) = “Total size (GB)”
    $c.Cells.Item(1,4) = “Free Space (GB)”
    $c.Cells.Item(1,5) = “Free Space (%)”
    $c.cells.item(1,6) = "Name "
    $d = $c.UsedRange
    $d.Interior.ColorIndex = 19
    $d.Font.ColorIndex = 11
    $d.Font.Bold = $True
    $d.EntireColumn.AutoFit()
    $intRow = 2
    $colComputers = get-content "C:\Servers.txt"
    foreach ($strComputer in $colComputers)
    $colDisks = get-wmiobject Win32_LogicalDisk -computername $strComputer -Filter “DriveType = 3"
    foreach ($objdisk in $colDisks)
    $c.Cells.Item($intRow, 1) = $strComputer.ToUpper()
    $c.Cells.Item($intRow, 2) = $objDisk.DeviceID
    $c.Cells.Item($intRow, 3) = “{0:N0}” -f ($objDisk.Size/1GB)
    $c.Cells.Item($intRow, 4) = “{0:N0}” -f ($objDisk.FreeSpace/1GB)
    $c.Cells.Item($intRow, 5) = “{0:P0}” -f ([double]$objDisk.FreeSpace/[double]$objDisk.Size)
    $c.cells.item($introw, 6) = $objdisk.volumename
    $intRow = $intRow + 1
    $d.EntireColumn.AutoFit()
    cls
    Thank You

    Hi Phorbin1128,
    The script below amy be helpful for you to save the Excel file with date in filename, and send email with the attachment of the excel report.
    $erroractionpreference = “SilentlyContinue”
    $a = New-Object -comobject Excel.Application
    $a.visible = $True
    $b = $a.Workbooks.Add()
    $c = $b.Worksheets.Item(1)
    $c.Cells.Item(1,1) = “Machine Name”
    $c.Cells.Item(1,2) = “Drive”
    $c.Cells.Item(1,3) = “Total size (GB)”
    $c.Cells.Item(1,4) = “Free Space (GB)”
    $c.Cells.Item(1,5) = “Free Space (%)”
    $c.cells.item(1,6) = "Name "
    $d = $c.UsedRange
    $d.Interior.ColorIndex = 19
    $d.Font.ColorIndex = 11
    $d.Font.Bold = $True
    $d.EntireColumn.AutoFit()
    $intRow = 2
    $colComputers = get-content "C:\Servers.txt"
    foreach ($strComputer in $colComputers)
    $colDisks = get-wmiobject Win32_LogicalDisk -computername $strComputer -Filter “DriveType = 3"
    foreach ($objdisk in $colDisks)
    $c.Cells.Item($intRow, 1) = $strComputer.ToUpper()
    $c.Cells.Item($intRow, 2) = $objDisk.DeviceID
    $c.Cells.Item($intRow, 3) = “{0:N0}” -f ($objDisk.Size/1GB)
    $c.Cells.Item($intRow, 4) = “{0:N0}” -f ($objDisk.FreeSpace/1GB)
    $c.Cells.Item($intRow, 5) = “{0:P0}” -f ([double]$objDisk.FreeSpace/[double]$objDisk.Size)
    $c.cells.item($introw, 6) = $objdisk.volumename
    $intRow = $intRow + 1
    $d.EntireColumn.AutoFit()
    $date=Get-Date -f yyyy-MM-dd
    $filename = "D:\test\"+$date+".xlsx"
    $b.SaveAs($filename)
    $a.Quit()
    Send-MailMessage -SmtpServer xxxxxxxxxx -To [email protected] -From [email protected] -Subject "test mail" -Body "file name is: $new_file" -attachment $filename
    For more detailed information about the cmdlet Send-MailMessage, please refer to this article:
    Send-MailMessage
    I hope this helps.

  • Adding the file name to each page of a pdf

    I need to find a script that will allow me to add the file name of a pdf to each page within the pdf. I need the file name to appear in one of the corners of the pdf.
    for example if the file name is 001.pdf then I need to somehow attach that so it appears in one of the corners of ach page within the pdf
    I have to do this for 20,000 pdf files so any help would be massively appreciated.
    thanks
    Jim

    I assume you have Acrobat Pro for editing, although you don't say.
    This should get you started by showing how to extract the name of one file (that you have selected) in the Finder and then to pass this to a JavaScript that is executed by Acrobat:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;">
    tell application "Finder"
    set theFile to selection as alias
    set theTitle to name of theFile
    end tell
    tell application "Adobe Acrobat Pro"
    open theFile
    --now add theTitle to the bottom/centre of all pages
    do script "this.addWatermarkFromText({ cText: \"" & theTitle & "\", nFontSize: 12, nHorizAlign: app.constants.align.center, nVertAlign: app.constants.align.bottom, nVertValue: 12});"
    --uncomment one of these options
    --close document 1 saving no
    --close document 1 saving yes
    end tell </pre>
    I just noticed that you want the name in a corner - just change the word 'center' to 'left' or 'right'
    Message was edited by: Bernard Harte

  • Adding image file name and logo to image

    Can you do batch processing of images to automatically insert the image file name, say at the bottom along with a logo, in black font. The logo stays constant but the image deatils will change with each image?
    Can this be done in Lightroom or then the full Photoshop?
    Thanks!

    I've taken the script mentioned above and modified it to the best of my abilities.  Still getting the same error, unfortunately:
    function main(){
    var suffix ="cropped";
    var docPath =Folder("~/Desktop");
    if(!docPath.exists){
       alert(docPath + " does not exist!\n Please create it!");
       return;
    var fileName =activeDocument.name.match(/(.*)\.[^\.]+$/)[1];
    var fileExt =activeDocument.name.toLowerCase().match(/[^\.]+$/).toString();
    var saveFile = new File(docPath +"/"+fileName+suffix+'.'+fileExt);
    switch (fileExt){
       case 'jpeg' : SaveJPEG(saveFile); break;
       default : alert("Unknown filetype please use manual save!"); break;
    if(documents.length) main();
    function SaveJPEG(saveFile, jpegQuality){
    jpgSaveOptions = new JPEGSaveOptions();
    jpgSaveOptions.embedColorProfile = true;
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
    jpgSaveOptions.matte = MatteType.NONE;
    jpgSaveOptions.quality = jpegQuality; //1-12
    activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);

  • Tilde (~) added to file name?

    The other day, iBooks Author began creating duplicate files on save with a  tilde (~) character at the end of file name. Anyone know what's going on here and how to make it stop?
    I'm wondering if it has anything to do with Lion 10.7.3, which I updated to the other day, right around the same time this started happening.
    Maria
    Maria Langer, Author
    iBooks Author: Publishing Your First Book

    K T wrote:
    I believe that is a 'version' of your original file that only contains changes at a given point in time.
    See Lion's Help on: versions
    KT you are correct.
    To see this in action place the file you are working on you desktop. Then make a few changes in iBooks Author and see the 'phantom file' appear too on your desktop.
    Save a version of all your work and see the tilded version disapear since it is no longer needed.
    Neat! and it is defintely a feature of LION.
    I read through some more posts and noted you updated to include correctly this appears with other Apple files on Mac. I work with all kinds of documents on the desktop and then clean up after the day is done by moving them elsewhere. TexEdit and other programs, even Preview at times produces this tilde version for a few minutes. It is data not commited yet.

  • Displaying file name for open Acrobat files

    Is there a way to copy and paste the URL for an open pdf file in Acrobat? We currently open the file in MS Word and copy the file link from the web toolbar display.
    Thanks for the help!
    Ken

    Thanks for the quick response. Is that a hard thing to do? We haven't done much with Java Script.
    Ken

  • Dynamic File name for Open Hub file

    Hi All,
    I wanted to create a .csv file using open hub destination. I wanted the name of the file to be dynamic based on month. for example in jan I wanted it as 01.Dump for January and 02.Dump for february.
    is is possible at all to do that.I wanted to save the file in the application server. There should not be any manual intervention the process.
    Thanks in advance.
    Regds
    Raghu

    Hi
    We have take month from the first record that we read.
    Our requirement is to take one months data and give it in a file with a file name having the corresponding month.
    In the code mentioned below MOC_CODE is the field that is used for this purpose.
    Hope it helps.
    Regards,
    Raghu
    code:
    #!/bin/sh
    Script to dump file.
    Parameters.
    $1 Division name to extract from the data file.
    It re-arranges the columns.
    It replaces values in strings.
    Parameters.
    DATA_FILE_NAME="data_file.csv"
    HEADER_FILE_NAME="header_file.csv"
    DIVISION_NAME="$1"
    Re-arrange header file columns.
    Transpose rows to columns comma separated.
    HEADER_ROW=`cat "$
    Re-arrange header columns.
    Re-direct the output to a temporary file.
    " | tr '\n' ',' | sed 's/,$//g'`
    echo "$" | awk 'BEGIN { FS = ","; OFS = "," } { print $2, $3, $1, $4, $5, $6, $7 }' > "$.$.tmp"
    Prepare awk program.
    Re-arrange data file columns.
    Replace UNI in 6th column with UNIT and Replace TON in 6th column with TONS.
    Filter division rows.
    AWK_PROGRAM="BEGIN { FS = \",\"; OFS = \",\"; TVAL = 0 } \$5 ~ /$/ { sub( \"UNI\", \"UNIT\", \$6 ); sub( \"TON\", \"TONS\", \$6 ); print \$2, \$3, \$1, \$4, \$5, \$6, \$7; TVAL = TVAL + \$7 } END { printf \"$ Total Value: %f\", TVAL 2> \"$$Re-direct the program to a temporary program file.Control.ctl\" }"
    echo "$" > "$.awk"
    Execute the data file formatting command.
    awk -f "$.awk" "$" > "$.$
    Get generation date.
    Get moc code from data file.
    .tmp"
    GENERATION_TIME=`date +"%Y%m%d_%H%M%S"`
    MOC_CODE=`head -1 $ | awk -F, '{ print $3 }'`
    Prepare dump file.
    DUMP_FILE_NAME="$_$_$_$"
    cat "$.$.tmp" "$.$.tmp" > "$
    Remove temporary files.
    FTP dump file to remote server.
    FTP.
    rm *.tmp
    REMOTE_SERVER="<replace with server ip address>"
    REMOTE_USER="xxxx"
    REMOTE_PWD="xxxx"
    ftp -n "$" << EOF
         quote USER "$"
         quote PASS "$"
         ascii
         put "$"
         bye
    EOF
    Exit.
    exit 0

  • Dynamic file name in Open hub

    Hi Friends,
    I am using Open hub to send a flat file to an application server. the file name should be dynamic.
    for eg. returnsYYMMDD.dat similarly salesYYMMDD.dat.
    please help me as i dont know how to have this dynamic value in case of flat file on application server.
    Thanks
    Ujjwal goel

    Hi,
    Pls go through the below lionk
    http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417300)ID1655136650DB02514444191271871877End?rid=/library/uuid/01d3a090-0201-0010-9783-bc33ab690e70&overridelayout=true
    It may help you
    Regards,
    Marasa.

  • File name after opening in Photoshop CS3

    After adjusting an image in Lightroom 1.1, I open it, reflecting the Lightroom changes, in Photoshop CS3. When I'm done tweaking the image in Photoshop CS3, I save it as a PSD file. The problem: I find that two PSD files have been saved, one with the file name (as I intended) and one with the file name with "-Edit" appended to it (before the PSD extension). How can I avoid having the second file (with the "-Edit" appended) created and saved?
    Thanks.
    Harvey

    The -edit file is the first file. That file is the method LR uses to send the image to CS3.

  • Is it possible to propose another default file name in ALV Excel Export?

    Hello All,
    I have a problem while exporting to Excel from the WD ALV. The whole process works fine, the problem occurs when the user wants to open (without saving) multiple exported Excel documents at the same time. In this case he gets an error message, that the document with the same name has already been opened.
    Therefore I have a question, is it possible to customize default file name, so that instead of 'export.xlsx' the file name will contain e.g. WD title&time (or something like that)?
    Thank you very much in advance.

    Hi,
    It's the standard functionality. You actually have to enhance the standard method, which is not advisable as the same will be called in other applications as well.
    So, Instead of that, hide the standard Export functionality and create a new Tool bar button, say, 'Export to Excel' and in on action of that button, use cl_wd_runtime_services=>attach_file_to_response ( and pass the file name by concatenating date/time) method to open/save the file.
    Check this document to create a custom button in ALV tool bar: Creating Self-Defined Functions in WDA ALV
    And, check this blog by Chris for code reference to have Export to Excel functionality: Using WD ABAP ALV export - the hacked way
    Hope this helps u,
    Regards,
    Kiran

  • Is there a way to alter the file name given to the attachments in an email button?

    When ever I click the standard email button, I get an attachement with random alfa and numeric characters for the file name.  Is there any way to change the files names to match a data field in the form or start with something I choose?
    Thanks,
    Judy

    Hi RudyLou36,
    While viewing the form in Preview TAB of LC Designer you will always get the junk characters as the name of the file. Save the file and open it in Acrobat or Reader.
    You won't be able to change the filename unless you save the file first. Here (http://forums.adobe.com/thread/462681) is an example of a number of ways to deal with parts of the email programatically.
    Regards,
    ratnesh

Maybe you are looking for

  • Cannot master to tape using Panasonic AJ-D95-dc DVCPRO 50 deck

    Hi, I started this discussion with Black Magic Design, whose DeckLink Extreme card I am using along with an AJ-D95-cd DVCPRO 50 deck using SDI in and out. The deck was on loan from a client. I could batch digitize from the deck - easy as pie. But I c

  • Validation on items in Hide/Show Region

    I have a validation on an item that is in a hide/show region. I display all my errors in-line with the field. When the validations fires, after the page is submitted, the hid/show region is closed so the user can't see the error. Is there a way in th

  • How can I connect the ipad2 to an Epson Stylus SX445W wifi printer?

    How can I connect the ipad2 to an Epson Stylus SX445W wifi printer? Any help appreciated. Obviously I'm not technically minded so simple... Sorry... Very simple instructions would be great. Thanks

  • Can't call with optus sim "error message SIM: CALL BARRED"

    Help please!! i currently joined with optus mobile and i cant call out with my blackberry, everytime i call i get this message "SIM: CALL BARRED", i can still receive call and sms...... it is weird because when i put the sim into a different phone...

  • Customer invoice upload

    Hi,      i am working with interfaces.      i have a scenerio that      Branches(defined as plants in SAP) attached with  godowns which makes sales to customers and an invoice is raised these godown are not in SAP and values of the invoices  such as