Announcement

Collapse
No announcement yet.

Need help with File Open, Print

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help with File Open, Print

    I'm redoing this post cause it was meant as a question, so i used the question icon...lol. Here it is again:

    I need help with the proper command for "File open", i.e. to open .htm and .html files, and also the print command so that it will properly print a page viewed... I'm a newbie, so please help if u can. Thanx.

  • #2
    Re: Need help with File Open, Print

    To open a htm file in the default browser use the file open action.

    File.Execute ("%SrcDir%\Test.htm", "", Continue)

    I'm not sure you can ge thhe default browser to print from AMS.

    =================
    To open a HTM file in the web object:
    WebBrowserObject[WebBrowser1].NavigateTo ("http://www.indigorose.com")


    To Print:
    WebBrowserObject[WebBrowser1].Print

    Comment


    • #3
      Re: Need help with File Open, Print

      Just remembered a post a while back from Lorne. If the HTM file is local and it is open in an external browser you may be able to do a File.Open with a print verb to get it to print.

      Comment


      • #4
        Re: Need help with File Open, Print... More please:-)

        It will be local .htm files i will want to open from a browser i made with ams... ex. i will want to open folder c:\my documents\my htm files\*.htm... could u please give me the proper command lango... ? Appreciate it much ;-).

        Comment


        • #5
          Re: Need help with File Open, Print... More please:-)

          Drop a Browser object on a page, the put this action in a click event.

          WebBrowserObject[WebBrowser1].NavigateTo ("file://C:/your/path/here/your.htm")

          Comment


          • #6
            Re: Need help with File Open, Print... More please:-) And Again...

            Please don't laugh... I have created a little document browser, and set it to open a local web page at startup that i have on my hard drive... but i then created a text object that says "File"... what i want is, when File text object is click, the directory i specify will open, from where i can choose a page, and it will then display that page... directory will be c:\My Documents\My HTM Files\*.htm ... can u help? lol

            Comment


            • #7
              Re: Need help with File Open, Print... More please:-) And Again...

              Here is a sample.

              Comment


              • #8
                Re: Need help with File Open, Print... More please:-) And Again...

                It will open the files ok, but before it opens the folder, it returns this error: "Could not Load Dll" and lists the path. Is this merely because I must have exact path of files location entered? Darn us newbies got so much to learn...lol

                Comment


                • #9
                  Re: Need help with File Open, Print... More please:-) And Again...

                  Check your distribution folder and make sure there is a file there named GetFolders.dll

                  If it is there and you are still getting the error, modify the click event to be this
                  %FullPath% = Dialog.FileBrowse (Open, "File Open", "%Desktop%", "HTML (*.htm, *.html)|*.htm|*.html")
                  WebBrowserObject[WebBrowser1].NavigateTo ("%FullPath%")

                  Comment


                  • #10
                    Re: Need help with File Open, Print... More please:-) And Again...

                    Sorry to make this such a long drawn out thing, there is no GetFolders.dll under distribution, where do i get such a file?

                    Comment


                    • #11
                      Re: Need help with File Open, Print... More please:-) And Again...

                      Got the GetFolders.dll afterall, but i'm still getting the "Could not load dll" error before it will permit me to open an .htm page...

                      Comment


                      • #12
                        Re: Need help with File Open, Print... More please:-) And Again...

                        What OS are you running? What version of IE?

                        The DLL is one that I wrote to get the My Documents directoy. If putting in the static address path works, do that.

                        Comment


                        • #13
                          Re: Need help with File Open, Print... More please:-) And Again...

                          Worm: a funny thing happend, i figured how to file open without using the dll, however it worked fine in win xp and cause error in win98... so i went back to figuring out how to use the GetFolders.dll that you sent me. I think I got it working now... just had to move GetFolders.dll into distribution folder for whatever cause.

                          Comment


                          • #14
                            Re: Need help with File Open, Print... More please:-) And Again...

                            exactly! I must have missed that when I zipped it up.

                            Have Fun!

                            Comment


                            • #15
                              Re: Need help with File Open, Print... More please:-) And Again...

                              The reason for the DLL is that the My Documents folder may not be where you expect it to be. Using the DLL, you'll be able to define where the user has their My Documents folder.

                              Probably not too many people would change the location. At my place of employment, it is the company standard to change it to a location on the servers so that a users documents are backed-up.

                              Comment

                              Working...
                              X