|
-
Nov 1st, 2002, 07:46 AM
#1
Thread Starter
New Member
Ms-word Event
i have problem realted to MS-WORD EVENT. SUPPOSE IF I CLICKS ON "BOLD TOOLBAR BUTTON". THIS BUTTON WORKS ACCORDING TO MY CODE.
LIKE
SUB BOLD()
MSGBOX " bOLD"
END SUB
THIS CODE IS WORKING PERFECTLY,
BUT DRAWING TOOLBAR BUTTONS, DOES NOT WORK EXCEPT TEXTBOX TOOLBAR BUTTON.
ANY ONE HAVE ANY IDEA IN THIS REGARDING, I WOULD BE OBLIZED TO GET RESPONCE OF MY PROBLEM.
-------------
VISHI
-
Dec 13th, 2002, 02:39 AM
#2
New Member
Do you want to create a toolbar and then add a button to it to run your code. If so, this is how you do it.
Code:
Dim newButton As CommandBarButton
Application.CommandBars.Add(Name:="New ToolBar").Visible = True
CommandBars("New ToolBar").Position = msoBarTop
Set newButton = CommandBars("New ToolBar").Controls.Add(Type:=msoControlButton)
With newButton
.Caption = "BOLD TOOLBAR BUTTON"
.OnAction = "BOLD"
.Style = msoButtonCaption
End With
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|