File Attachment Name - InfoPath Dev
in

InfoPath Dev

File Attachment Name

Last post 08-27-2008 07:05 AM by feesh. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-21-2008 08:28 AM

    • feesh
    • Not Ranked
    • Joined on 09-25-2007
    • Posts 11

    File Attachment Name

    I am running into a problem when opening a file attached to the infopath form. When I open the file the name of the file changes (looks to be just a random sequence of letters and numbers). When I hit Save As it still shows the original name. The problem is that the file name is very important and the users are confused when they see something different if they open the file directly from the form. Is there any way to code it to keep the original name?

  • 08-24-2008 11:10 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Hello Feesh,

    Check out this link,

    http://support.microsoft.com/kb/892730

     

  • 08-25-2008 08:18 AM In reply to

    • feesh
    • Not Ranked
    • Joined on 09-25-2007
    • Posts 11

    Hi Shiva

    Thanks for the info. I checked our the page but I do still have some questions.

    I beleive I understand how to retrieve the name of the file that is saved inside infopath but how would I go open having infopath open it as that file name?

    Just to clarify my problem: I don't need to save the file name anywhere. Let's say I have a file saved in windows under the name hat_picture.jpg and I attach it to the form. The control still shows the name hat_picture.jpg and if I try and save the file back to my desktop it opens a save window with the name hat_picture.jpg BUT if I try and just open the file directly from the form it will open as a name like 4CB851E9.jpg.

  • 08-25-2008 11:04 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Hello Feesh,

    Here are the steps you need to follow,

    • 1. First add the image(hat_picture.jpg ) to the form using Tools -> Resource Files.
    • 2. Save the form and close it.
    • 3. Open the view1.xsl file in editor mode, search for ‘4CB851E9.jpg' replace with ‘hat_picture.jpg' and save the file and close it.
    • 4. Open the manifest.xsf file in editor mode, , search for ‘4CB851E9.jpg' and remove the below code from that file:

    <xsf:file name="4CB851E9.jpg">

      <xsf:fileProperties>

        <xsf:property name="fileType" type="string" value="resource"></xsf:property>          

      </xsf:fileProperties>

    </xsf:file>

    • 5. Save the manifest.xsf file and close it.
    • 6. Remove ‘4CB851E9.jpg' file from your folder.

    Now you can have only one file in your folder and that is ‘hat_picture.jpg'.

  • 08-27-2008 07:05 AM In reply to

    • feesh
    • Not Ranked
    • Joined on 09-25-2007
    • Posts 11

    Hi Shiva

    Sorry if I was not clear in my first post but the picture file is not static. It is something the user uploads and will have a different name everytime. The issue is that keeping the name of the file correct is very important for our reference. Is there anyway to do the above but only when a user uploads it?

     

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.