Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6654141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:21:16+00:00 2026-05-26T01:21:16+00:00

An open-source project I am working on uses Visio drawings for documentation, which are

  • 0

An open-source project I am working on uses Visio drawings for documentation, which are checked into source control. For those working on the project who don’t own Visio, we have been converting the vsd files to PDFs so that they can still view them. It’s not too difficult to save a copy as a PDF when making changes to the documentation, but we would like an automated way to do this conversion, so that we can set it up as a pre-checkin script in the SVN client. If anybody knows of a way to do this, either using something built-in to Visio, or with an outside script or command line tool, we would appreciate it.

Edit: Thanks to the suggestion below, I have found the Visio Viewer 2010. This will be helpful for our contributors using Windows. We would still like to have the ability to create PDFs though, as there are readers available on every major operating system, and our contributors will not be using only Windows.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:21:17+00:00Added an answer on May 26, 2026 at 1:21 am

    I found this nice vbs script and adapted it to visio.It can be called via cygwin (works for all kind of Office stuff)

     Option Explicit
    
    Main()
    
    Sub Main()
      If WScript.Arguments.Count > 0 Then 
          Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
          Dim i
          For i = 0 to wscript.arguments.count - 1
              Dim strFilePath : strFilePath = WScript.Arguments.Item(i)
              Dim dirPath : dirPath = objFSO.GetParentFolderName(strFilePath)
              Dim fileBaseName : fileBaseName = objFSO.GetBaseName(strFilePath)
              'WScript.Echo strFilePath
              Dim strNewFileName : strNewFileName = dirPath & "\" & fileBaseName & ".pdf"
              'WScript.Echo strNewFileName
              Dim strFileExt : strFileExt = UCase(objFSO.GetExtensionName(strFilePath))
              Select Case strFileExt
                  Case "DOC"
                      DOC2PDF strFilePath, strNewFileName
                  Case "XLS"
                      XLS2PDF strFilePath, strNewFileName
                  Case "PPT"
                      PPT2PDF strFilePath, strNewFileName
                  Case "VSD"
                      VSD2PDF strFilePath, strNewFileName
                  Case Else
                      WScript.Echo "Extension Type:  " & strFileExt
              End Select
          Next
      Else
          msgbox("Sie muessen eine Datei zum konvertieren auswählen.")
      End If
    End Sub
    
    Sub PPT2PDF(strSourceFile, strDestFile)
      Const ppWindowMinimized = 2
      Const ppWindowNormal = 1
      Const ppSaveAsPDF = 32
    
      Dim objPPT : Set objPPT = CreateObject("PowerPoint.Application")
      objPPT.Visible = True
      objPPT.WindowState = ppWindowMinimized
      objPPT.Presentations.Open strSourceFile
      objPPT.ActivePresentation.SaveAs strDestFile, ppSaveAsPDF 
      objPPT.Quit()
    End Sub
    
    Sub DOC2PDF(strSourceFile, strDestFile)
      Const wdExportAllDocument = 0
      Const wdExportOptimizeForPrint = 0
      Const wdExportDocumentContent = 0
      Const wdExportFormatPDF = 17
      Const wdExportCreateHeadingBookmarks = 1
    
      Dim objWord : Set objWord = CreateObject("Word.Application")
      Dim objDoc : Set objDoc = objWord.Documents.Open(strSourceFile,,TRUE)    
      objWord.ActiveDocument.ExportAsFixedFormat strDestFile, wdExportFormatPDF, False, _
                      wdExportOptimizeForPrint, wdExportAllDocument,,, _
                      wdExportDocumentContent, False, True, wdExportCreateHeadingBookmarks
      objWord.Quit()
    End Sub
    
    Sub XLS2PDF(strSourceFile, strDestFile)
      Const xlTypePDF = 0
    
      Dim objExcel : Set objExcel = CreateObject("Excel.Application")
      Dim objeDoc : Set objeDoc = objExcel.Workbooks.Open(strSourceFile,,TRUE)    
      objExcel.ActiveWorkbook.ExportAsFixedFormat xlTypePDF, strDestFile
      objExcel.ActiveWorkbook.Close(False)
      objExcel.Quit
    End Sub
    
    Sub VSD2PDF(strSourceFile, strDestFile)
      Const xlTypePDF = 1
      Const visOpenRO = 2
      Const visOpenMinimized = 16
      Const visOpenHidden = 64
      Const visOpenMacrosDisabled = 128
      Const visOpenNoWorkspace = 256
    
      Dim objVisio : Set objVisio = CreateObject("Visio.Application")
      Dim objeDoc : Set objeDoc = objVisio.Documents.OpenEx(strSourceFile, visOpenRO + visOpenMinimized + visOpenHidden + visOpenMacrosDisabled + visOpenNoWorkspace)    
      objeDoc.ExportAsFixedFormat xlTypePDF, strDestFile, 1, 0
      objeDoc.Close
      objVisio.Quit
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an open source project which uses C for libraries, C++
I am working on an open source project which can use a number of
I've just started working on an ASP.NET project which I hope to open source
I'm working on a Open Source project on SourceForge that uses Subversion. A few
Currently I'm working on open source project. There exists bunch of java classes which
I'm working on an open source project that uses SQL Server 2005 as the
Im working on a patch for an open source project that uses svn. I
I'm currently working on a Java project which uses Tibco rendezvous control. I have
I have recently started working on some open source project which I found relevant
I am working on an open source javascript project using backbone that uses a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.