How to state web-based location when using SaveAsWeb method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raddrummer
    New Member
    • Oct 2007
    • 26

    #1

    How to state web-based location when using SaveAsWeb method

    I'm using Access to call Visio and generate organization charts (using Visio's Org Chart Wizard) and then us the SaveAsWeb method to save the file as a set of web pages.

    As long as my target is on a "normal" drive (i.e. "k:\mydrive\Org Chart.htm") things work fine. As soon as I change the target to one of the folders on our intranet, I get an error message that the path name is invalid.

    I thought I'd be able to use:
    /TARGET=//pashanet/hr/TotalRewards/Drawing5.htm

    but it's not working. Any thoughts???

    Code:
    Sub Generate()
    Dim VisApp As Object
    Dim visDoc As Visio.Document
    Dim visExcelFile As String
    Dim objAddOn As Object
    Dim objAddOn2 As Object
    Dim orgWizArgs As String
    
    
    'Export data file from access and save as Excel file
    DoCmd.OutputTo acOutputTable, "TblOrgChart", acFormatXLS, "K:\HR-Payroll\HR\HRIS\OrgChart.xls"
    
    'Assign file location of Excel file that feeds into Visio
    visExcelFile = "K:\HR-Payroll\HR\HRIS\OrgChart.xls"
    
    'START VISIO'S ORG CHART WIZARD
    Set VisApp = CreateObject("Visio.Application")
    Set objAddOn = VisApp.Addons.ItemU("OrgCWiz")
    objAddOn.Run ("/S-INIT")
    
    'Add org chart arguments
    orgWizArgs = " /FILENAME=" & visExcelFile & " /NAME-FIELD=NAME /MANAGER-FIELD=SupID /DISPLAY-FIELDS=Name, Title /CUSTOM-PROPERTY-FIELDS=Title,Location HIDDEN /SHOW-DIVIDER-LINE /SYNC-ACROSS-PAGES /HYPERLINK-ACROSS-PAGES" 'fill in args here
    objAddOn.Run ("/S-ARGSTR " + orgWizArgs)
    
    'Run the wizard
    objAddOn.Run ("/S-RUN")
    
    'Save the document as a web page
    Set objAddOn2 = VisApp.Addons.ItemU("SaveAsWeb")
    
    'Add the Web Page Arguments/Preferences
    objAddOn2.Run "/QUIET=True /NAVBAR=False /SEARCH=true /TARGET=//pashanet/hr/TotalRewards/Drawing5.htm"
    
    'Quit Visio and close everything out
    VisApp.Quit
    Set VisApp = Nothing
    
    End Sub
    Last edited by pbmods; Mar 28 '09, 03:18 PM. Reason: Added CODE tags.
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Have you tried 'Mapping' the Drives?
    Last edited by pbmods; Mar 28 '09, 03:19 PM. Reason: Removed unnecessary quote.

    Comment

    • raddrummer
      New Member
      • Oct 2007
      • 26

      #3
      SOLVED:How to state web-based location when using SaveAsWeb method

      Hi ADezii,

      Thanks so much. This worked perfectly!

      Comment

      • ADezii
        Recognized Expert Expert
        • Apr 2006
        • 8834

        #4
        Originally posted by raddrummer
        Hi ADezii,

        Thanks so much. This worked perfectly!
        You are quite welcome.

        Comment

        Working...