Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Walter_Slipperman Walter_Slipperman is offline
external usenet poster
 
Posts: 2
Default Insert Date make Bold Macro

I don't know how to write macros but I do know how to record them and make
icons for them that I put on the toolbar. Or I did back before Word 2007.

The goal is to have an icon always accessable on the toolbar, not in a
contextual menu, where I can select a macro that inserts the date in a
particular format and makes it bold and sets spacing following it. I had
this in Word 2003.

When I try to use the record macro function to do the above operations I am
stuck because while the macro recorder is running, after I have inserted the
date in a selected format, I am not able to highlight the date text and make
it bold. The little recorder icon hovers near the text but I can't select
the text.

What should i do?

\walter

  #2   Report Post  
Posted to microsoft.public.word.newusers
Reitanos Reitanos is offline
external usenet poster
 
Posts: 109
Default Insert Date make Bold Macro

You could either make it bold before inserting the date or use the
arrow keys + [Shift] to make the selection.

Also, there is a toolbar that you can customize at the top of the
window where you could add a custom button.

On May 9, 2:07 pm, "Walter_Slipperman" wrote:
I don't know how to write macros but I do know how to record them and make
icons for them that I put on the toolbar. Or I did back before Word 2007.

The goal is to have an icon always accessable on the toolbar, not in a
contextual menu, where I can select a macro that inserts the date in a
particular format and makes it bold and sets spacing following it. I had
this in Word 2003.

When I try to use the record macro function to do the above operations I am
stuck because while the macro recorder is running, after I have inserted the
date in a selected format, I am not able to highlight the date text and make
it bold. The little recorder icon hovers near the text but I can't select
the text.

What should i do?

\walter


  #3   Report Post  
Posted to microsoft.public.word.newusers
Herb Tyson [MVP] Herb Tyson [MVP] is offline
external usenet poster
 
Posts: 2,936
Default Insert Date make Bold Macro

Use the keyboard rather than the mouse for the finishing touches. To select
the inserted date, try Ctrl+****+Left arrow (if it's a date field, it'll
take just on push of the left key, otherwise it might take several depending
on the date format), press Ctrl+B, then use the right arrow to return the
insertion point to the end of the inserted date, then turn the recorder off.

In fact, I do the entire thing with the keyboard (Alt+Shift+D to insert the
date field). The macro I get is:

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldDate
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Font.Bold = wdToggle
Selection.MoveRight Unit:=wdCharacter, Count:=1


--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


"Walter_Slipperman" wrote in message
...
I don't know how to write macros but I do know how to record them and make
icons for them that I put on the toolbar. Or I did back before Word 2007.

The goal is to have an icon always accessable on the toolbar, not in a
contextual menu, where I can select a macro that inserts the date in a
particular format and makes it bold and sets spacing following it. I had
this in Word 2003.

When I try to use the record macro function to do the above operations I
am stuck because while the macro recorder is running, after I have
inserted the date in a selected format, I am not able to highlight the
date text and make it bold. The little recorder icon hovers near the text
but I can't select the text.

What should i do?

\walter


  #4   Report Post  
Posted to microsoft.public.word.newusers
Walter_Slipperman Walter_Slipperman is offline
external usenet poster
 
Posts: 2
Default Insert Date make Bold Macro

Okay. thanks guys. I've got it working:

Sub bold_date()
'
' bold_date Macro
'
'
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldDate
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Font.Bold = wdToggle
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeParagraph
Selection.Font.Bold = wdToggle
End Sub

Now how to do I put it in the small toolbar at the top. In the past I would
make my own icon for it and drag it to the toolbar.

\Walter

  #5   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Insert Date make Bold Macro

Are you sure a date field is what you want here? A date field will update
each time you open the document. A CreateDate field would probably be more
useful - or as you are using vba, simply insert the date as text eg

Sub InsertUSFormatDate()
With Selection
.Font.Bold = True
.InsertDateTime DateTimeFormat:="MMMM" & Chr(160) & _
"d," & Chr(160) & "yyyy", InsertAsField:=False
.Font.Bold = False
.TypeParagraph
End With
End Sub

To add a macro to the QAT (Quick Access Toolbar), see
http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Walter_Slipperman wrote:
Okay. thanks guys. I've got it working:

Sub bold_date()
'
' bold_date Macro
'
'
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldDate
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Font.Bold = wdToggle
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeParagraph
Selection.Font.Bold = wdToggle
End Sub

Now how to do I put it in the small toolbar at the top. In the past
I would make my own icon for it and drag it to the toolbar.

\Walter



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2002: Macro w/today's date - update date automatically MTKathy Microsoft Word Help 1 March 13th 08 10:50 PM
Insert macro date Chris Microsoft Word Help 1 July 13th 07 09:21 AM
how do i make a sentence bold without making everything bold? drbob1125 Microsoft Word Help 1 August 15th 06 03:30 AM
Need macro to locate table uniquely, insert blank row and date and end table Marrick13 Tables 4 July 1st 06 12:33 PM
Cannot make macro to insert ink drawing Elbert Microsoft Word Help 0 July 31st 05 09:48 PM


All times are GMT +1. The time now is 10:15 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"