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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|