Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Faifax, Virginia, USA
    Posts
    542
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Save As ASP - getting the file name (2002)

    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?
    <pre> '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
    </pre>


  2. #2
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Faifax, Virginia, USA
    Posts
    542
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save As ASP - getting the file name (2002)

    After some trial and error, something that sorta works...<pre> 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
    </pre>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •