473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to create toll bar in word 2007

In earlier vision of word 2000/03 there was a future to create toll bar with buttons in add-ins but in 2007 how to create that.

ribbon also we can say.
Nov 13 '13 #1
1 1082
Any one need plz help!!

Expand|Select|Wrap|Line Numbers
  1. Sub Section()
  2. '
  3. ' Section Macro
  4. ' Macro recorded 11/15/2013 by sharma.anil
  5. '
  6.     ActiveDocument.Styles.Add Name:="Section", Type:=wdStyleTypeParagraph
  7.     ActiveDocument.Styles("Section").AutomaticallyUpdate = False
  8.     With ActiveDocument.Styles("Section").Font
  9.         .Name = "Times New Roman"
  10.         .Size = 12
  11.         .Bold = False
  12.         .Italic = False
  13.         .Underline = wdUnderlineNone
  14.         .UnderlineColor = wdColorAutomatic
  15.         .StrikeThrough = False
  16.         .DoubleStrikeThrough = False
  17.         .Outline = False
  18.         .Emboss = False
  19.         .Shadow = False
  20.         .Hidden = False
  21.         .SmallCaps = False
  22.         .AllCaps = False
  23.         .Color = wdColorAutomatic
  24.         .Engrave = False
  25.         .Superscript = False
  26.         .Subscript = False
  27.         .Scaling = 100
  28.         .Kerning = 0
  29.         .Animation = wdAnimationNone
  30.     End With
  31.     With ActiveDocument.Styles("Section").ParagraphFormat
  32.         .LeftIndent = InchesToPoints(0)
  33.         .RightIndent = InchesToPoints(0)
  34.         .SpaceBefore = 0
  35.         .SpaceBeforeAuto = False
  36.         .SpaceAfter = 0
  37.         .SpaceAfterAuto = False
  38.         .LineSpacingRule = wdLineSpaceSingle
  39.         .Alignment = wdAlignParagraphLeft
  40.         .WidowControl = True
  41.         .KeepWithNext = False
  42.         .KeepTogether = False
  43.         .PageBreakBefore = False
  44.         .NoLineNumber = False
  45.         .Hyphenation = True
  46.         .FirstLineIndent = InchesToPoints(0)
  47.         .OutlineLevel = wdOutlineLevelBodyText
  48.         .CharacterUnitLeftIndent = 0
  49.         .CharacterUnitRightIndent = 0
  50.         .CharacterUnitFirstLineIndent = 0
  51.         .LineUnitBefore = 0
  52.         .LineUnitAfter = 0
  53.     End With
  54.     ActiveDocument.Styles("Section").ParagraphFormat.TabStops.ClearAll
  55.     With ActiveDocument.Styles("Section").ParagraphFormat
  56.         With .Shading
  57.             .Texture = wdTextureNone
  58.             .ForegroundPatternColor = wdColorAutomatic
  59.             .BackgroundPatternColor = wdColorAutomatic
  60.         End With
  61.         .Borders(wdBorderLeft).LineStyle = wdLineStyleNone
  62.         .Borders(wdBorderRight).LineStyle = wdLineStyleNone
  63.         .Borders(wdBorderTop).LineStyle = wdLineStyleNone
  64.         .Borders(wdBorderBottom).LineStyle = wdLineStyleNone
  65.         With .Borders
  66.             .DistanceFromTop = 1
  67.             .DistanceFromLeft = 4
  68.             .DistanceFromBottom = 1
  69.             .DistanceFromRight = 4
  70.             .Shadow = False
  71.         End With
  72.     End With
  73.     ActiveDocument.Styles("Section").LanguageID = wdEnglishUS
  74.     ActiveDocument.Styles("Section").NoProofing = False
  75.     ActiveDocument.Styles("Section").Frame.Delete
  76.     Selection.Style = ActiveDocument.Styles("Section")
  77. End Sub
Nov 15 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Gops | last post by:
I've find out few XML Node differences in the Migrated word 2007 document and Native Word documnet 2007 Open XML format. For Example, In Migrated word 2007 <w:p> <w:pPr> ...
1
by: Darsin | last post by:
What i am doing is to pull the data from a CMS and import it to Word 2007 Beta and i also have to export the data from Word 2007 Beta back to that CMS. We have with us two Web Services of the CMS....
2
by: Sasie7679 | last post by:
Dear All, We currently use word in our application. We hide the title bar of word and display it in a ActiveX control (just the textual area). We use the below API for hiding the title bar. ...
4
by: Bob Darlington | last post by:
I'm using the following code to check whether Word is running: Function IsAppRunning(strAppname As String) As Boolean Dim strClassName As String Select Case LCase$(strAppname) Case "Excel": ...
0
by: ppardi | last post by:
I'm developing an addin for Word 2007 and I need to determine whether a user saves a Word 2007 document in an older format (97-2003) after a save as is done. The scenario is that the user starts...
1
by: Bruno Wouters | last post by:
Hello, I want to create a tooltip like Word 2007 shows when you select text. http://img167.imageshack.us/img167/9809/floatiefq4.gif I have no problem with putting buttons etc in the tooltip...
0
by: Luft | last post by:
I'm just starting to work with VSTO and Word 2007 but I've run into a problem when trying to create an add-in. I get the warning: This project references the primary interop assembly for Microsoft...
5
by: sphinney | last post by:
Basic question: Does anyone know how to go about adding a control to an Access 2007 form that will allow viewing a Word 2007 document? Reason for asking: My office is about to receive 100+/-...
2
by: brat33 | last post by:
I am trying to modify some code to create a mail merged label document within Word 2007, using a Access 2007 Parameter Field. My issue comes about when I cannot see the Parameter Query within the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.