请问用VB打开一个Word文件之后,如何能够利用VB代码启动“录制宏”到该文档当中。

解决方案 »

  1.   

    不会做本来想用SendKeys的,发现“录制宏”没有快捷键UP
      

  2.   

    Application.OrganizerCopy Source:="SourceFilePath",_  Destination:="DestinationFilePath", _
             Name:="MacrosName", Object:=wdOrganizerObjectProjectItems
      

  3.   

    只是想在word打开后能够自动的打开录制宏,录制用户的修改。
    up
      

  4.   

    VB 的 Addin http://community.csdn.net/Expert/topic/4533/4533395.xml?temp=.3866388
      

  5.   

    SENDKEYS 可行:Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPrivate Sub Command1_Click()
    ShellExecute hwnd, "open", "H:\xxxx.doc", vbNullString, vbNullString, 5
    SendKeys "%tm"
    SendKeys "{down}"
    SendKeys "{enter 2}"
    End Sub