• Save As ASP – getting the file name (2002)

    Home » Forums » Developers, developers, developers » Web design and development » Save As ASP – getting the file name (2002)

    Author
    Topic
    #386956

    I’m trying to write a macro to save a file as an ASP. How do I
    obtain the “current” name of the file, or should i generate one?

          'Loop through all open pages
          Dim url As String
          For Each page In ActiveWebWindow.PageWindows
              page.Activate
              '***  Generate file name here?
              '
              page.SaveAs url
          Next
    
    Viewing 0 reply threads
    Author
    Replies
    • #673917

      After some trial and error, something that sorta works…

              Dim name as String
              For Each myPageWindow In ActiveWebWindow.PageWindows
                  myPageWindow.Activate
                  If myPageWindow.IsDirty Then
                      name = myPageWindow.Document.Title & ".asp"
                      myPageWindow.SaveAs name
                  End If
              Next
      
    Viewing 0 reply threads
    Reply To: Save As ASP – getting the file name (2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: