|
Dette er et arbejdesark Ny Ribbon editor http://www.andypope.info/vba/ribboneditor.htm (undersøg muligehederne for Checkbox) http://www.excelguru.ca/blog/2006/11/29/modifying-the-ribbon-part-6/ Baggrundsviden til ribbon: http://msdn.microsoft.com/en-us/library/ms406046.aspx http://www.shaunakelly.com/word/word-development/resources-for-word-vba.html (bla. ny installer)
Undersøg: http://www.mztools.com/v3/download.aspx
Editor til ribbon
http://openxmldeveloper.org/archive/2006/05/26/CustomUIeditor.aspx
Checkbox http://msdn.microsoft.com/en-us/library/bb410116(v=office.12).aspx
Læs mere på http://www.rondebruin.nl/ribbon.htm
Word2007 på Win7 C:\Users\3456\AppData\Roaming\Microsoft\Word\START
Word2010 på Win7 med word2007 installeret tidligere C:\Users\3456\AppData\Roaming\Microsoft\Word\START
<group id="Checkboxtest" label="CheckboxTest"> <checkBox id="checkbox1" enabled="true" getLabel="GetLabel" label="Checkbox1 label" keytip="A1" getScreentip="GetScreentip" supertip="This is a super tip for the checkBox." visible="true" getPressed="GetPressed" onAction="OnAction" /> <checkBox id="checkbox2" getLabel="GetLabel" onAction="OnAction" />
</group>
'¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤#############################¤ test '¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤#############################¤ test '¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤#############################¤ test
'Callback for checkbox1 getLabel Sub GetLabel(control As IRibbonControl, ByRef returnedVal) MsgBox "GetLabel" End Sub
'Callback for checkbox1 getScreentip Sub GetScreenTip(control As IRibbonControl, ByRef returnedVal) MsgBox "GetScreenTip" End Sub
'Callback for checkbox1 getPressed Sub GetPressed(control As IRibbonControl, ByRef returnedVal) MsgBox "GetPressed" End Sub
'Callback for checkbox1 onAction Sub OnAction(control As IRibbonControl, pressed As Boolean) MsgBox "OnAction" End Sub
'Public Function GetLabel(ByVal control As IRibbonControl) As String ' Dim strLabel As String ' strLabel = "" ' Select Case control.ID ' Case "checkbox1": strLabel = "Insert text." ' Case "checkbox2": strLabel = "Insert more text." ' End Select ' MsgBox strLabel 'End Function 'Public Function GetScreenTip(ByVal control As IRibbonControl) As String '' Return "Inserts text into the active worksheet." 'End Function'
'Public pressedState As Boolean 'pressedState = False ' 'Public Function GetPressed(ByVal control As IRibbonControl) As Boolean ' MsgBox pressedState 'End Function 'Public Sub OnAction(ByVal control As IRibbonControl, ByVal pressed As Boolean) ' If pressed Then ' MsgBox " applicationObject.Range(A1).Value valgt textbox" ' Else ' MsgBox "applicationObject.Range(A1).Value = You cleared the check box." ' End If ' pressedState = pressed 'bør være true? 'End Sub
Teknisk artikel om Word http://support.microsoft.com/kb/921541
Sub MarkerIFarver() 'Fremhæver sætninger med spørgsmålstegn med blå og fed. 'http://www.vbaexpress.com/forum/archive/index.php/t-23254.html Dim r As Range Set r = ActiveDocument.Range With r.Find Do While .Execute(Findtext:="?", Forward:=True) = True With r .Expand Unit:=wdSentence .Font.Bold = True .Font.Color = wdColorBlue .Collapse Direction:=wdCollapseEnd End With Loop End With End Sub
Ribbon http://msdn.microsoft.com/en-us/library/dd756403.aspx
http://www.rondebruin.nl/galleries.htm
XML oversigt http://msdn.microsoft.com/en-us/library/aa722523(v=office.12).aspx
http://benread.net/tools/Macros-Word-Annotation.htm
Range.MoveUntil Method
|