A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date keep changing when opened



 
 
Thread Tools Display Modes
  #1  
Old October 21st, 2009, 11:48 AM posted to microsoft.public.word.mailmerge.fields
Frank Situmorang[_3_]
external usenet poster
 
Posts: 61
Default Date keep changing when opened

Hello,

I have a database that can be mereged to word, this is the VBA in my dbase
form:
Private Sub cmdMerge_Click()
Dim strMsg As String

' merge the doc
If IsNull(Me.lstFiles) = False Then

Call RidesMergeWord(strDirPath & Me.lstFiles & ".doc", strDirPath,
strOutDocName)
DoCmd.Close acForm, Me.Name

Else
' Note: This is message string #1.
strMsg = DLookup("MessageString", "[Lookup Message String_Qry]",
"[FormName] = '" & Me.Name & "' AND [StringNumber] = 1")

MsgBox [strMsg], vbExclamation, "Word Merge"

End If

End Sub

In the word template that to be merged, I put date field, so that when I
perform the merge, it has the date created.

When it performed the merge today in Oct 20, 2009, I saved the document in
other name, say " membership transfer of Mr. A", then when I opened the word
of membership transfer of MR. to morrow the date becomes Oct 21, 2009. What
should I do to keep it the same date as when the merged is performed.

I have tried to changed it to created date, but it shows the date when the
template is created although I have saved it in other name, it still shows
the old date.

Thanks for any help.

Frank
  #2  
Old October 21st, 2009, 12:09 PM posted to microsoft.public.word.mailmerge.fields
Rich/rerat
external usenet poster
 
Posts: 423
Default Date keep changing when opened

Frank,
Try inserting the field for the date in the Word document:

{SAVEDATE \*Mergeformat}
OR
{SAVEDATE \@ "MMMM d, yyyy"}

--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat
(RRR News) message rule
Previous Text Snipped to Save Bandwidth When Appropriate


"Frank Situmorang" wrote in
message ...
Hello,

I have a database that can be mereged to word, this is the VBA in my dbase
form:
Private Sub cmdMerge_Click()
Dim strMsg As String

' merge the doc
If IsNull(Me.lstFiles) = False Then

Call RidesMergeWord(strDirPath & Me.lstFiles & ".doc", strDirPath,
strOutDocName)
DoCmd.Close acForm, Me.Name

Else
' Note: This is message string #1.
strMsg = DLookup("MessageString", "[Lookup Message String_Qry]",
"[FormName] = '" & Me.Name & "' AND [StringNumber] = 1")

MsgBox [strMsg], vbExclamation, "Word Merge"

End If

End Sub

In the word template that to be merged, I put date field, so that when I
perform the merge, it has the date created.

When it performed the merge today in Oct 20, 2009, I saved the document in
other name, say " membership transfer of Mr. A", then when I opened the word
of membership transfer of MR. to morrow the date becomes Oct 21, 2009. What
should I do to keep it the same date as when the merged is performed.

I have tried to changed it to created date, but it shows the date when the
template is created although I have saved it in other name, it still shows
the old date.

Thanks for any help.

Frank


  #3  
Old October 21st, 2009, 01:35 PM posted to microsoft.public.word.mailmerge.fields
Graham Mayor
external usenet poster
 
Posts: 18,297
Default Date keep changing when opened

Use a Quote field around the Date field eg
{ QUOTE { DATE \@ "d MMMM yyyy" }}
See the section Mail Merge and Date Fields at
http://www.gmayor.com/formatting_word_fields.htm for more detail.

--

Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Frank Situmorang wrote:
Hello,

I have a database that can be mereged to word, this is the VBA in my
dbase form:
Private Sub cmdMerge_Click()
Dim strMsg As String

' merge the doc
If IsNull(Me.lstFiles) = False Then

Call RidesMergeWord(strDirPath & Me.lstFiles & ".doc",
strDirPath, strOutDocName)
DoCmd.Close acForm, Me.Name

Else
' Note: This is message string #1.
strMsg = DLookup("MessageString", "[Lookup Message String_Qry]",
"[FormName] = '" & Me.Name & "' AND [StringNumber] = 1")

MsgBox [strMsg], vbExclamation, "Word Merge"

End If

End Sub

In the word template that to be merged, I put date field, so that
when I perform the merge, it has the date created.

When it performed the merge today in Oct 20, 2009, I saved the
document in other name, say " membership transfer of Mr. A", then
when I opened the word of membership transfer of MR. to morrow the
date becomes Oct 21, 2009. What should I do to keep it the same date
as when the merged is performed.

I have tried to changed it to created date, but it shows the date
when the template is created although I have saved it in other name,
it still shows the old date.

Thanks for any help.

Frank



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.