'The following VBA scripts implement the title elaboration function, consider the following questions:
How to capture a CELL cell clicking event? Can I add other Windows messages in Excel?
'Unit: mcc'fun: goto exactly position in Word from Excel Impls by VBA.'Args: Bookmark String (Predefined In Word Handed Yourself Or Using Tools)' Ref: MS Word / Excel Object Lib.'modify: 1.Open Word Archives in Readonly Way 2.get ABS Path Using for Anchor'Future: 1.Search by String Exactly'author: Qjwxsd'dt: 2005-04-18 ~~
Const TC3 = "TC03_ Software Rights Rights Management / TC03_Software License Management" Const TC4 = "TC04_ Equipped with Resource Management / TC04_Periphery Resource" const TC10 = "TC10_ Data Security Management / TC10_Data Security Management"
Public Sub GotoWord (Filename, Bookmark As String) ON Error Resume Next Dim A AS Word.Application Dim B AS Word.Document Dim C As Excel.Application Dim D AS Excel.Workbook Dim e as Excel.Worksheet
Dim path as string set c = getObject (, "excel.application") SET D = C.ActiveWorkbook set e = D.activeSheet 'path = c.path Path = D.Path' The path to the current function list is passed to Word. in. Otherwise, Word cannot obtain the path, 'Open the corresponding TC. Set a = getObject (, "word.application") if a = null the set a = createObject ("word.application") end if 'a.documents.open "h: /0408/pcmain5.5.0 _other.doc"' Msgbox a.path 'msgbox application.path' msgbox curdir 'msgbox a.documents.item (0) .fullname a.documents.open path & "& filename &" .doc ", readonly: = true a.setence. Goto What: = WDGOTOBOOKMARK, NAME: = Bookmark a.visible = true a.activate 'front display Word Form End Subprivate Sub Label1_Click () GotoWord TC3, "TC3_1" end SUB
Private sub Label10_Click () gotoWord TC4, "TC4_4" end SUB