没有人知道么??????????

解决方案 »

  1.   

        Dim doc As Word.Document
        Dim win As Word.Window    With oleControl
            .SizeMode=1 'Stretch
            .CreateEmbed "C:\My Documents\发表散寒.doc"
            .DoVerb vbOLEPrimary
        End With
        
        Set doc = oleControl.object
        Set win = doc.ActiveWindow
        
        
        win.ActivePane.DisplayRulers = True
        win.ActivePane.DisplayVerticalRuler = True
        win.DisplayVerticalScrollBar = True
        win.DisplayHorizontalScrollBar = True上面的程序可以运行后可以使用滚动条了,而且在表单的菜单上不显示Word 的菜单。可以看参考MSDN中的Office Developement 部分,再有在Word中录制宏之后查看宏的内容也很有用,有的甚至可以直接拷过来,但有写方法和属性在OLE控件中不起作用。我想知道能否在OLE控件中使用Word的打印预览功能,你可以帮我吗?
        doc.ActiveWindow.ActivePane.SmallScroll Down:=100
        doc.ActiveWindow.LargeScroll Down:=100
        doc.ActiveWindow.PageScroll Down:=1
    与上面类似的方法可以用程序的方法进行纵向滚动,但我不知道横向的方法。
    OleControl,Window,Pane,View这四个对象管理的范围是有差别的,跟JAVA窗口的结构有些类似。
    向一样,只要先在 Word中选“保护文档”-“窗体”后保存就好了。在按上面方法打开就和一样了。但不能在程序中动态修改文档的内容了。