Skip to Content
author's profile photo Former Member
Former Member

How to display the open file dialogue in SBO 2007

Hi

I have my own form on screen with a edit text box which will contain the path and name of a file entered by the user

Is there any way I can display the windows open file dialogue so the user can search for a file ?

Many thanks

Regards Andy

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 21, 2009 at 05:35 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 20, 2009 at 04:05 PM

    Hi..

    I imagine you are using C# or VB.net.

    You can use this method

    OpenFileDialog f = new OpenFileDialog();

    f.ShowDialog();

    Before doing this you must do the steps provided in this thread.

    Opening a Asp.net based form in sap

    Anoop

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Anoop Krishnan

      Hi Anoop

      Code below, simple and it seems to work well

      Thanks for your help

      Regards Andy

      fpath = ""

      Dim thread As New System.Threading.Thread(AddressOf openfile)

      thread.SetApartmentState(Threading.ApartmentState.STA)

      thread.Start()

      thread.Join()

      form.Items.Item("4").Specific.string = fpath

      Sub openfile()

      Dim abform As Form1

      abform = New Form1

      abform.Show()

      abform.OpenFileDialog1.Filter = "CSV Files|*.csv"

      If abform.OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then

      fpath = abform.OpenFileDialog1.FileName

      End If

      abform.Close()

      End Sub

  • author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2009 at 09:11 AM

    Reopnened as using the link solution always copies file to attachment folder

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.