Consulting

Results 1 to 2 of 2

Thread: Is it possible to transfer Macro Description text to another machine?

  1. #1
    VBAX Regular
    Joined
    Mar 2014
    Posts
    7
    Location

    Is it possible to transfer Macro Description text to another machine?

    Hello,

    Does anyone know of a way to transfer macro descriptions to another computer without transferring through a .bas file? I believe the descriptions transfer through the .bas file but I need to transfer through a template instead. By descriptions I am referring to the “Description:” field labeled at the bottom of the Word 2010 > Macros (alt + f8) screen.

    I was able to transfer the macros using a .dotm template file and placing it into the Microsoft Word templates directory. All of the macros can be viewed and fired with no problem. I simply cannot figure out how to also transfer the Description: text.

    Thank you!

  2. #2
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,642
    Sub M_snb()
        For Each vc In Documents.Open(AddIns(1).Path & "\" & AddIns(1).Name).VBProject.VBComponents
            If vc.Type = 1 Then
                 With ThisDocument.VBProject.VBComponents.Add(1)
                    .Name = cm.Name
                    .CodeModule.AddFromString vc.CodeModule.Lines(1, vc.CodeModule.CountOfLines)
                 End With
            End If
        Next
    End Sub
    instead of AddIns(1).Path & "\" & AddIns(1).Name you can use the fullname of the templace that contains the macros.

Posting Permissions

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