Non-breaking spacing in dates

G

Guest

Word should have an option to automatically covert the space after a month
name to a non-breaking space since the month name and the number of the day
shouldn't have a line break between them. This could probably be done with
AutoCorrect, but it would be better as a checkbox option in Options.
 
S

Suzanne S. Barnhill

Suppose what follows the month name is not a date? What if you're talking
about the "September issue" of a magazine, for example. Also, many people
put the date before the month (12 December 2004); it could be argued that
the month should be kept with the year as well, but not all users would want
that. I don't see how this request could reasonably be implemented in a way
that would not irritate more people than it pleased. How difficult is it to
just type Ctrl+Shift+Space when you want a nonbreaking space?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
S

Shauna Kelly

Hi Ray

That's not a bad idea.

A workaround might be to create 12 AutoTexts each holding January[plus a
non-breaking space], February... etc. Name them January, February etc, and
all you'll need to do is type the first four letters of a month's name and
press Enter to get the name of the month plus the non-breaking space.

If the nature of your work means that you're frequently typing January 2004,
then you could add the year as well.

To create an AutoText, type the text you want in a document, select it and
do Insert > AutoText > AutoText. By default, the AutoText will be saved in
normal.dot, so when you exit Word, if you're asked whether you want to save
normal.dot, say yes.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 
G

Guest

Suzanne:

As I stated in my original post, I suggested "Word should have an OPTION to
automatically convert..."

Short of having an option (that should be by default deselected so as not to
"irritate more people than it pleased"), the easiest workaround I can figure
is one hundred eight Auto Corrects (January through December, with each month
followed by the digits 1 through 9). The only problem to this would be an
example of "In January 5,000 people...." I could live with that in the
workaround situation.

You ask "[h]ow difficult is it to just type Ctrl+Shift+Space when you want a
nonbreaking space?" The smart-aleck answer is, of course, "three times as
difficult." :) However, the reason I want to address that is, while I often
catch spots where the nonbreaking space should be fixed, if something is
edited later, I have to go through again to make sure any dates (which had a
regular space in the middle of the line) hadn't been moved to the end of the
line (and breaking the two parts up).

Back to the smart-aleck answer, I should be able to just type spaces. If
Word has the option for one or two spaces after a period, would this really
be that difficult to implement?

So...to the question of THIS post ... is there a way to have a list of
autocorrects and their appropriate corrections? I could easily come up with
the 108 using Excel to copy/fill and concantenate, but can it be translated
for autocorrects?

-Ray
 
C

Charles Kenyon

You can create a field to make such a date, either a fixed CreateDate field
or an automatically updating Date field with non-breaking spaces. Then save
it as an AutoText entry and use that for date insertion.
{ CreateDate \@ "MMMM d yyyy" } with the spaces being non-breaking.

I use a template with a createdate field to create letters. My pleadings
have appropriate createdate fields over the signature lines. Most places a
date is used it will not be wrapped.
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

Ray_Johnson said:
Suzanne:

As I stated in my original post, I suggested "Word should have an OPTION
to
automatically convert..."

Short of having an option (that should be by default deselected so as not
to
"irritate more people than it pleased"), the easiest workaround I can
figure
is one hundred eight Auto Corrects (January through December, with each
month
followed by the digits 1 through 9). The only problem to this would be an
example of "In January 5,000 people...." I could live with that in the
workaround situation.

You ask "[h]ow difficult is it to just type Ctrl+Shift+Space when you want
a
nonbreaking space?" The smart-aleck answer is, of course, "three times as
difficult." :) However, the reason I want to address that is, while I
often
catch spots where the nonbreaking space should be fixed, if something is
edited later, I have to go through again to make sure any dates (which had
a
regular space in the middle of the line) hadn't been moved to the end of
the
line (and breaking the two parts up).

Back to the smart-aleck answer, I should be able to just type spaces. If
Word has the option for one or two spaces after a period, would this
really
be that difficult to implement?

So...to the question of THIS post ... is there a way to have a list of
autocorrects and their appropriate corrections? I could easily come up
with
the 108 using Excel to copy/fill and concantenate, but can it be
translated
for autocorrects?

-Ray

Suzanne S. Barnhill said:
Suppose what follows the month name is not a date? What if you're talking
about the "September issue" of a magazine, for example. Also, many people
put the date before the month (12 December 2004); it could be argued that
the month should be kept with the year as well, but not all users would
want
that. I don't see how this request could reasonably be implemented in a
way
that would not irritate more people than it pleased. How difficult is it
to
just type Ctrl+Shift+Space when you want a nonbreaking space?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.
 
G

Greg

Ray,

Try the following macro. For this one to work, you will need a two
column table headed Wrong and Right. Put the text to correct in the
wrong column and the correct text in the Right column. Save the file
as C:\MyACList.doc (Note: you can save it as whatever you like, but
would need to change the macro)

Sub MultiAutoCorrectGererator()
'
' Adapted by Greg Maxey from MultiFindAndReplace code
' provided by Doug Robbins
Dim MyACList As Document
Dim Source As Document
Dim i As Integer
Dim Wrong As Range
Dim Right As Range
Set Source = ActiveDocument
' Change the path and filename to suit where you have your list of
words
Set MyACList = Documents.Open(FileName:="C:\MyACL.doc")
' MyACL.doc is a tow column table headed Wrong and Right. The text you
want
' autocorrected is listed in the wrong column. The correct text in the
' right column
Source.Activate
For i = 2 To MyACList.Tables(1).Rows.Count
Set Wrong = MyACList.Tables(1).Cell(i, 1).Range
Wrong.End = Wrong.End - 1
Set Right = MyACList.Tables(1).Cell(i, 2).Range
Right.End = Right.End - 1
AutoCorrect.Entries.Add Name:=Wrong, Value:=Right

Next i

End Sub
 
G

Guest

Fantastic, except the filename should be saved as C:\MyACL.doc. That's what
I get for running the code without reading it first :).

Thanks SO much! This is going to make life a lot easier!
 
G

Greg Maxey

Ray,

That was my fault. I usually save files as Test this or that and then
monkey with the code after determining if it works. It caught up with me
this time. Glad I could help.
 
S

Suzanne S. Barnhill

Word does *not* have "the option for one or two spaces after a period." That
is, it does not have the option to generate or enforce the desired number
automatically.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Ray_Johnson said:
Suzanne:

As I stated in my original post, I suggested "Word should have an OPTION to
automatically convert..."

Short of having an option (that should be by default deselected so as not to
"irritate more people than it pleased"), the easiest workaround I can figure
is one hundred eight Auto Corrects (January through December, with each month
followed by the digits 1 through 9). The only problem to this would be an
example of "In January 5,000 people...." I could live with that in the
workaround situation.

You ask "[h]ow difficult is it to just type Ctrl+Shift+Space when you want a
nonbreaking space?" The smart-aleck answer is, of course, "three times as
difficult." :) However, the reason I want to address that is, while I often
catch spots where the nonbreaking space should be fixed, if something is
edited later, I have to go through again to make sure any dates (which had a
regular space in the middle of the line) hadn't been moved to the end of the
line (and breaking the two parts up).

Back to the smart-aleck answer, I should be able to just type spaces. If
Word has the option for one or two spaces after a period, would this really
be that difficult to implement?

So...to the question of THIS post ... is there a way to have a list of
autocorrects and their appropriate corrections? I could easily come up with
the 108 using Excel to copy/fill and concantenate, but can it be translated
for autocorrects?

-Ray

Suzanne S. Barnhill said:
Suppose what follows the month name is not a date? What if you're talking
about the "September issue" of a magazine, for example. Also, many people
put the date before the month (12 December 2004); it could be argued that
the month should be kept with the year as well, but not all users would want
that. I don't see how this request could reasonably be implemented in a way
that would not irritate more people than it pleased. How difficult is it to
just type Ctrl+Shift+Space when you want a nonbreaking space?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
G

Guest

Hi,

Works in autotext, but not in autocorrect, where I want it. I want my
autotext entry to have a nonbreaking hyphen in it. When I type the word,
with the nonbreaking hyphen, then copy it and paste it in the autocorrect
entry, it does not retain the nonbreatking hyphen. Anyway to do this in
autocorrect?

-- Lee Techwriter



Shauna Kelly said:
Hi Ray

That's not a bad idea.

A workaround might be to create 12 AutoTexts each holding January[plus a
non-breaking space], February... etc. Name them January, February etc, and
all you'll need to do is type the first four letters of a month's name and
press Enter to get the name of the month plus the non-breaking space.

If the nature of your work means that you're frequently typing January 2004,
then you could add the year as well.

To create an AutoText, type the text you want in a document, select it and
do Insert > AutoText > AutoText. By default, the AutoText will be saved in
normal.dot, so when you exit Word, if you're asked whether you want to save
normal.dot, say yes.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


Ray_Johnson said:
Word should have an option to automatically covert the space after a month
name to a non-breaking space since the month name and the number of the
day
shouldn't have a line break between them. This could probably be done
with
AutoCorrect, but it would be better as a checkbox option in Options.
 
S

Suzanne S. Barnhill

You should not need to copy and paste. If you text is selected when you open
the AutoCorrect dialog, it should already be placed in the "With" box. You
may need to save it as a formatted entry.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Lee Techwriter said:
Hi,

Works in autotext, but not in autocorrect, where I want it. I want my
autotext entry to have a nonbreaking hyphen in it. When I type the word,
with the nonbreaking hyphen, then copy it and paste it in the autocorrect
entry, it does not retain the nonbreatking hyphen. Anyway to do this in
autocorrect?

-- Lee Techwriter



Shauna Kelly said:
Hi Ray

That's not a bad idea.

A workaround might be to create 12 AutoTexts each holding January[plus a
non-breaking space], February... etc. Name them January, February etc, and
all you'll need to do is type the first four letters of a month's name and
press Enter to get the name of the month plus the non-breaking space.

If the nature of your work means that you're frequently typing January 2004,
then you could add the year as well.

To create an AutoText, type the text you want in a document, select it and
do Insert > AutoText > AutoText. By default, the AutoText will be saved in
normal.dot, so when you exit Word, if you're asked whether you want to save
normal.dot, say yes.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


Ray_Johnson said:
Word should have an option to automatically covert the space after a month
name to a non-breaking space since the month name and the number of the
day
shouldn't have a line break between them. This could probably be done
with
AutoCorrect, but it would be better as a checkbox option in Options.
 
G

Graham Mayor

A problem is going to be that you can save the month and the space, but when
you press space after the shortcut you get the non-breaking space followed
by a standard space. A workaround is to add a semi colon after the shortcut
eg for January make the shortcut Jan; then when you hit the semicolon the
entry is inserted without the extra space.
See the essentially similar issue at
http://www.gmayor.com/avoiding_unwanted_capitalization.htm

If you are adding the year (which presumably you would be or the
non-breaking space is largely superfluous) then the issue doesn't arrive.
Simply make the entry a formatted entry.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Lee said:
Hi,

Works in autotext, but not in autocorrect, where I want it. I want my
autotext entry to have a nonbreaking hyphen in it. When I type the
word, with the nonbreaking hyphen, then copy it and paste it in the
autocorrect entry, it does not retain the nonbreatking hyphen.
Anyway to do this in autocorrect?

-- Lee Techwriter



Shauna Kelly said:
Hi Ray

That's not a bad idea.

A workaround might be to create 12 AutoTexts each holding
January[plus a non-breaking space], February... etc. Name them
January, February etc, and all you'll need to do is type the first
four letters of a month's name and press Enter to get the name of
the month plus the non-breaking space.

If the nature of your work means that you're frequently typing
January 2004, then you could add the year as well.

To create an AutoText, type the text you want in a document, select
it and do Insert > AutoText > AutoText. By default, the AutoText
will be saved in normal.dot, so when you exit Word, if you're asked
whether you want to save normal.dot, say yes.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


Ray_Johnson said:
Word should have an option to automatically covert the space after
a month name to a non-breaking space since the month name and the
number of the day
shouldn't have a line break between them. This could probably be
done with
AutoCorrect, but it would be better as a checkbox option in Options.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top