?
Solved

AutoCorrect for Date and TIme update not working

Posted on 2010-09-14
21
Medium Priority
?
383 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
ID: 33675597
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
ID: 33677306
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
ID: 33677440
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:kvrogers
ID: 33685695
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
ID: 33685715
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
ID: 33685812
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
ID: 33685979
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
ID: 33686708
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
ID: 33686818
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
ID: 33689602
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
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 33689734
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
ID: 33689746
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
ID: 33689806
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
ID: 33693673
Have you tried the trroubleshooting steps in the Microsoft article?
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 33693711
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
ID: 33693785
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
ID: 33719436
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
ID: 33886085
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 2000 total points
ID: 33888370
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
ID: 33888724
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
ID: 33889611
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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
Quickbooks hosting can do wonders to your enterprise but considering the points elaborated in the article which will help you to better analyze the outcomes. So scan your business, its needs and then move to the new world of limitless benefits.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

864 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