Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Displaying documents in VB

I am currently working on a project which uses an access Database with a VB fron end. My problem is I need to be able to display some documents containing various types of instructions to the user at their command. I have hard copies of all the documents. The first thing I did was to manualy insert them into the code as a string, then read the files into a rich text box with a scroll bar.This is not feasible considering the fact that there are about 15 documents, and it's just poor programming. The user would have no way of modifying the instructions later. I used some tips from this board to open a word doc in my program, it worked, but i had to put the entire path to the doc in the code to read it. I couldn't shorten it to the doc name or the bin/doc path. can someone tell me the best format of a document, and how to display them in my program?

Comments

  • grarungrarun Member Posts: 40
    : I am currently working on a project which uses an access Database with a VB fron end. My problem is I need to be able to display some documents containing various types of instructions to the user at their command. I have hard copies of all the documents. The first thing I did was to manualy insert them into the code as a string, then read the files into a rich text box with a scroll bar.This is not feasible considering the fact that there are about 15 documents, and it's just poor programming. The user would have no way of modifying the instructions later. I used some tips from this board to open a word doc in my program, it worked, but i had to put the entire path to the doc in the code to read it. I couldn't shorten it to the doc name or the bin/doc path. can someone tell me the best format of a document, and how to display them in my program?
    :
    :



    If u don't want the user to modify the instructions displayed in the RichTextBox u can lock it. You can try with the PDF format which is ReadOnly. U can place the documents in your application folder and specify the path as (App.Path & "FileName.doc")


  • slickDevslickDev Member Posts: 9
    : : I am currently working on a project which uses an access Database with a VB fron end. My problem is I need to be able to display some documents containing various types of instructions to the user at their command. I have hard copies of all the documents. The first thing I did was to manualy insert them into the code as a string, then read the files into a rich text box with a scroll bar.This is not feasible considering the fact that there are about 15 documents, and it's just poor programming. The user would have no way of modifying the instructions later. I used some tips from this board to open a word doc in my program, it worked, but i had to put the entire path to the doc in the code to read it. I couldn't shorten it to the doc name or the bin/doc path. can someone tell me the best format of a document, and how to display them in my program?
    : :
    : :
    :
    :
    :
    : If u don't want the user to modify the instructions displayed in the RichTextBox u can lock it. You can try with the PDF format which is ReadOnly. U can place the documents in your application folder and specify the path as (App.Path & "FileName.doc")
    :
    :
    :
    Hi
    1.You can easy read Text files using the 'FileSystemObject'
    To use 'FSO' first you must have a reference to it.
    Open the References DialogBox and add a Reference to
    'Microsoft Scripting RunTime' and then you can use 'FSO' classModule
    If you do not understand how to use the 'FSO' you can get some help from MSDN library. If you do not have it then send a msg and I writte an example.
    2.If you want the user to open any TextFile he want you can use an ActiveX Control like 'Microsoft Common Dialog Control'. Else use the app.path function.


Sign In or Register to comment.