none
Batch converting the Visio 2003-2010 .vsd drawings to new Visio 2013 .vsdx format RRS feed

  • Question

  • We have a thousands of Visio drawing files which is created in Visio 2007 and Visio 2010 which are using the same file format so we can easily view it in any version of Visio. But now if we are deciding to use the new Visio 2013 program we would like to convert our all drawings from .vsd to .vsdx. How can we do that batch operation with present Visio 2013. The Visio 2013 designers has to think about that.

     

    Even of course there is a option to convert the single drawing using the convert button provided in Visio 2013 it is not convenient to convert our all drawing. People who using the Visio not only for a few drawings some organization having thousands of drawings.

     

    So please anybody know the answer to batch converting let me to know otherwise Microsoft experts please do the needful option in Visio 2013.

    Monday, November 4, 2013 2:06 PM

Answers

  • Hi Sellam,
    Welcome to MSDN forum.
    According to your description, you want to batch convert many Visio drawing files which were created in Visio 2007 and 2010 to Visio 2013 drawing files.
    There is no such feature in Visio 2013. As you mentioned, there is an option to convert one at a time.

    Here is a sample to batch convert Visio drawing files. You should go to Visual Basic editer (ALT + F11), right click the current project to insert a module and add code below, and then run this macro.

    The macro will loop all .vsd files in E:\Visio\ then convert them to .vsdx files.
    Hope it can give you help.

    Code block:

    Sub ConvertToVsdx()
         Dim strPath As String
         Dim strFile As String
         strPath = "E:\Visio\"
         strFile = Dir(strPath & "*.vsd")
         Do While strFile <> ""
             If Right(strFile, 3) = "vsd" Then
                Application.Documents.Open strPath & strFile
                Application.ActiveDocument.SaveAs strPath & strFile & "x"
                Application.ActiveDocument.Close
             End If
             strFile = Dir
         Loop
    End Sub

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 5, 2013 3:05 PM
    Moderator

All replies

  • Hi Sellam,
    Welcome to MSDN forum.
    According to your description, you want to batch convert many Visio drawing files which were created in Visio 2007 and 2010 to Visio 2013 drawing files.
    There is no such feature in Visio 2013. As you mentioned, there is an option to convert one at a time.

    Here is a sample to batch convert Visio drawing files. You should go to Visual Basic editer (ALT + F11), right click the current project to insert a module and add code below, and then run this macro.

    The macro will loop all .vsd files in E:\Visio\ then convert them to .vsdx files.
    Hope it can give you help.

    Code block:

    Sub ConvertToVsdx()
         Dim strPath As String
         Dim strFile As String
         strPath = "E:\Visio\"
         strFile = Dir(strPath & "*.vsd")
         Do While strFile <> ""
             If Right(strFile, 3) = "vsd" Then
                Application.Documents.Open strPath & strFile
                Application.ActiveDocument.SaveAs strPath & strFile & "x"
                Application.ActiveDocument.Close
             End If
             strFile = Dir
         Loop
    End Sub

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 5, 2013 3:05 PM
    Moderator
  • Dear George Hua,

    Thank you so much for your reply and it is the fine answer which i expected to do. This code successfully tested and working fine. Thanks again for your effort.

    Wednesday, November 6, 2013 4:35 AM
  • Dear George

    Can you give me the modified coding to select the folder path where the .vsd files to be converted are present while executing this module instead of giving the permanent one location?

    If you could do that or me I am very thankful to you.

    Thank you.

    Sunday, November 10, 2013 6:42 PM
  • Hi Sellam,

    We can use Application.FileDialog to open a dialogue box to choose the folder path in VBA, but this function cannot be support in Visio.

    However, we can achieve the goal in Excel.

    So if you have Excel 2013, please add a reference named "Microsoft Excel 15.0 Object Library".

    After that, run code below:

    Sub ConvertToVsdx()
         Dim strPath As String
         Dim strFile As String
         Dim excel As New excel.Application
         Dim fd As Office.FileDialog
         Set fd = excel.FileDialog(msoFileDialogFolderPicker)
         Dim vrtSelectedItem As Variant
         With fd
            If .Show = -1 Then
                For Each vrtSelectedItem In .SelectedItems
    '                MsgBox "The path is: " & vrtSelectedItem
                    strPath = vrtSelectedItem & "\"
                Next vrtSelectedItem
            Else
                MsgBox "Please select a folder"
            End If
         End With
    
    '     strPath = "E:\Visio\"
         If strPath <> "" Then
            strFile = Dir(strPath & "*.vsd")
            Do While strFile <> ""
                If Right(strFile, 3) = "vsd" Then
                   Application.Documents.Open strPath & strFile
                   Application.ActiveDocument.SaveAs strPath & strFile & "x"
                   Application.ActiveDocument.Close
                End If
                strFile = Dir
            Loop
         End If
         excel.Quit
    End Sub

    Hope this can help you.

    In addition, since this question has been resolved, if you have any other question, we suggest you to post a new thread, so that other members will involve in.

    Thank you for your understanding.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, November 12, 2013 2:43 AM
    Moderator
  • This works great for a single folder containing all your Visio files, however is there a way to make this script recursive through all the folders of a root folder?

    for example, i want to run this script for the 'customers' folder, however the vsd's are distributed as such;

    Customers\Customer 1\Drawings\*.vsd

    Customers\Customer 2\Drawings\*.vsd

    Customers\Customer 3\Drawings\*.vsd

    Many thanks


    Wednesday, July 29, 2015 8:56 AM
  • George,

    This works for a single directory, can it be modified to convert all vsd files in a directory and any sub directory within the main directory? Also so that if a VSD File is in a Sub directory, it creates that new VSDX file in that same sub directory?  Please let me know, Thank you!

    Wednesday, November 22, 2017 3:48 PM