Solved

AutoCorrect for Date and TIme update not working

Posted on 2010-09-14
21
379 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

749 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