Solved

AutoCorrect for Date and TIme update not working

Posted on 2010-09-14
21
372 Views
Last Modified: 2012-05-10
I created an AUTOCORRECT that includes the date and time and when I created it I checked the box to UPDATE with the current date.  But the next day when I use this autocorrect the date stays the same.  I want the physician to sign off his document that he read the note and is electronically signing his name with the date and time, i.e.

AUTOCORRECT:  REV

* this document was reviewed and signed off by Dr. Whatever on September 14, 2010  1209pm

When I inserted the date and time I checked update automatically.  But when I type REV in my document it prints the same date and time every day.

0
Comment
Question by:kvrogers
  • 11
  • 10
21 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
I assume that it is an Autotext entry. What does the date look like the field codes are displayed (Alt+F9 toggle)? It should be:

{ DATE \@ "MMMM dd, yyyy, hh:mm AM/PM" }.

If it is just fixed text like September 14, 2010  12:09pm - you might want to try creating the Autotext again
0
 

Author Comment

by:kvrogers
Comment Utility
No I did create is as an Auto Correct.  But when I looked at display (Alt+F9 toggle? it is correct.    I was wrong about the date it is 9/14/2010 4:36 pm .  Display shows:

#        SIGNED BY Dr. Whatever on [DATE\@"M/d/yyyy h:mm am/pm" ]
 
0
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
If the [ and ] are the field delimiters  - I think that they look more like { and } - then that looks OK.

I wonder if it is a field updating problem. Make sure that the field is in the selection, and press F9.
0
 

Author Comment

by:kvrogers
Comment Utility
Yes the field is not updating.  When you say "Make sure that the field is in the selection" what do you mean.
 
 
0
 

Author Comment

by:kvrogers
Comment Utility
Here is what the line looks like when I do an ALT+F9

{DATE\@"M/d/yyyy h:mm am/pm"}
 
0
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
Just to be sure that it is a typo, there should be at last one space between the word DATE and the following switch backslash.
0
 

Author Comment

by:kvrogers
Comment Utility
There is.  I also found that if I hover my mouse over the date, and click it a box appears saying !UPDATE.  If I click that it will update with current date and time, but I really would like the physician to type "rev" and it would type:
#        SIGNED BY Dr. Whatever on  9/15/2010  02:53 pm
Can that be done through AutoCorrect (MS Word  2007)?
 
0
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
I have experimented with a TIME field, and this does display the current time in when the AutoCorrect trigger is typed, so the mechanism to automatically update the field is there.

I am trying to find an option that might be making the difference.

0
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
You might have a small problem with your installation.

Look at this list of troubleshooting steps, especially those concerning the registry keys.

http://support.microsoft.com/default.aspx/kb/921541
0
 

Author Comment

by:kvrogers
Comment Utility
Graham: Have you tried that same AutoCorrect today?  My problem is it works fine when first created but the next day is repeating the same date and time as the day before and keeps that date and time does not update the NEXT day.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
Sorry. I didn't save the document. I will do some more tests, specifically with the DATE field, by adjusting my system date.
0
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
Duh! The Autocorrect entry isn't stored in the document, of course.

I have tested it with the entry that I created yesterday and it shows today's date: 16/09/2010
0
 

Author Comment

by:kvrogers
Comment Utility
Any suggestions then.  When you enter your AutoCorrect and use the ALT+F9 how does your code read?


0
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
Have you tried the trroubleshooting steps in the Microsoft article?
0
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
My field looks like:

{ DATE \@ "dd/MM/yyyy" }

In the AutoCorrect dialogue, the entry looks like

*DATE *15/09/2010**



0
 

Author Comment

by:kvrogers
Comment Utility
Graham:
I think I found a solution.  The problem now is every time you open an old note it updates it with todays day. So... I created a macro that enters the information.  When I created the macro by  inserting the date and time, I unchecked the box that says "update automatically".  
Then I added this macro to the ribbon.  That way all the physician has to do is click on this button and the macro will enter the information and the date and time will be permanent.  I HOPE
Do you think this will work?
 
 
0
 

Author Comment

by:kvrogers
Comment Utility
NO,  It did not work.  Is there any way through VB you can have it add the date and time without updating?
 
 
0
 

Author Comment

by:kvrogers
Comment Utility
The doctor is complaining because the solution I gave him he does not like.  What I need is a solution of either an AutoCorrect or Macro that will print the following:

Signed by Dr. XX on ;  10/12/2010 10:23:43 AM
The problem is every time the document is opened the date and time defaults to today's date and time.  If there any way I can create a Macro or AutoCorrect that will insert todays date and time and will not update when the document is opened again.   I tried creating the macro and no checking the box next to update but it's still doing it.
 
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
Comment Utility
If the process is to create a new document for signing, you could use a CreateDate field instead of a Date field.

It is easy enough to compose a macro to write the line, but it isn't possible to initiate a macro via Autocorrrect.

Instead you could use a macro button to do it.

This macro will remove the Macrobutton field that calls it and will replace it with the text and the date
Sub ClickToSign()

    Dim rng As Range

    Dim fld As Field

    

    Set fld = Selection.Range.Fields(1)

    Set rng = fld.Code

    fld.Delete

    rng.Text = "Signed by Dr. XX on ;  " & Format(Now, "MM/dd/yyyy hh:mm:ss AM/PM")

End Sub

Open in new window

0
 

Author Comment

by:kvrogers
Comment Utility
Graham:
I tried using your solution but get a run-time error on Line 5 above.  I am using this macro and currently this seems to be working
Sub rev()
'
' rev Macro
'
'
    Selection.TypeText Text:="Signed by Dr. XXX;  "
    Selection.InsertDateTime DateTimeFormat:="M/d/yyyy h:mm:ss am/pm", _
        InsertAsField:=False, DateLanguage:=wdEnglishUS, CalendarType:= _
        wdCalendarWestern, InsertAsFullWidth:=False
End Sub
 
 I'll let you know if it is STILL working tomorrow.
0
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
That will work as well. In fact you could reduce it to the single line below

Did you use a Macrobutton field? If not, there would be no field at the selection point.

The idea is that you put the macrobutton field in the template at the position where the document is to be signed.  The display text could be something like 'Click Here to Sign' and the macro to be called will be ClickToSign.

The advantages are that is does fix the position and that you have something to click.

The signer may want to choose the position, so the first point would be a advantageous in that case.
  

Selection.Text = "Signed by Dr. XX on ;  " & Format(Now, "M/d/yyyy hh:mm:ss AM/PM")

Open in new window

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now