Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / May 2006

Tip: Looking for answers? Try searching our database.

Date Format Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
singeredel - 28 May 2006 17:51 GMT
Is there a way to include a non-breaking space between the month and day in
the following date format code so that the month and day do not separate when
they appear at the end of a line?

   ScheduleDate1 = Format(ScheduleDate, "mmmm dd, yyyy")

Thanks...
Signature

singeredel (Julie)

Greg Maxey - 28 May 2006 18:04 GMT
Include the non-breaking character in your format definition:

Sub Test()
Dim SDate As Date
SDate = Now
Selection.Range.InsertAfter _
 Format(SDate, "mmmm" & Chr(160) & "dd," & Chr(160) & "yyyy")
End Sub

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> Is there a way to include a non-breaking space between the month and
> day in the following date format code so that the month and day do
[quoted text clipped - 3 lines]
>
> Thanks...
Helmut Weber - 28 May 2006 18:04 GMT
Hi Singeredel,

looks odd, but seems to work:

Selection.TypeText _
Text:=Format(Now, "mmmm" & Chr(160) & "dd," & Chr(160) & "yyyy")

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

singeredel - 29 May 2006 21:19 GMT
Thank you both. I didn't realize I could break up the format with the
character code. That works.
Signature

singeredel (Julie)

> Is there a way to include a non-breaking space between the month and day in
> the following date format code so that the month and day do not separate when
[quoted text clipped - 3 lines]
>
> Thanks...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.