Word 2007: Create a referenced date control with a default date

I am trying to do the following for a client:

A template for a letter has a locked (grouped, but not protected) section on 
the first page containing content controls for name, address and date.

On the following pages there is a header with REF fields referencing 
bookmarks around the content controls on the first page. This works fine for 
copying the data to the header.

Now I want a default date in the date control on the first page, so I add a 
CREATEDDATE field inside the control. This gets filled in automatically when 
the document is generated, and the user can change the date if he wants - 
that much works. 
BUT - the REF field in the header does not pick up the automatically 
generated date. Only after the user changes the date, does the REF field get 
the correct value.

Works:
CREATEDATE with bookmark and referenced by REF
Bookmark and content control and referenced by REF

Does not work:
CREATEDATE with bookmark and content control and referenced by REF

Can it be solved? I have a macro that runs at startup, but I don't believe I 
can use macros for this problem.
0
Utf
12/11/2009 3:35:01 PM
word.vba.general 1023 articles. 1 followers. Follow

5 Replies
919 Views

Similar Articles

[PageSpeed] 5

With a Rich Text Content Control containing a CreateDate field with the 
whole content control bookmarked and a ref field to the text of that 
bookmark in the header in a .dotm template, what you describe works here.

When I had tried saving the template as a .dotx however, there was no new 
document created when I selected that template as the basis of a document. 
I admit however, that I have never used a .dotx template before so do not 
know anything about them.

-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"happysad" <happysad@discussions.microsoft.com> wrote in message 
news:1DA6B8F7-C036-4B36-B083-029ED74264EA@microsoft.com...
> I am trying to do the following for a client:
>
> A template for a letter has a locked (grouped, but not protected) section 
> on
> the first page containing content controls for name, address and date.
>
> On the following pages there is a header with REF fields referencing
> bookmarks around the content controls on the first page. This works fine 
> for
> copying the data to the header.
>
> Now I want a default date in the date control on the first page, so I add 
> a
> CREATEDDATE field inside the control. This gets filled in automatically 
> when
> the document is generated, and the user can change the date if he wants -
> that much works.
> BUT - the REF field in the header does not pick up the automatically
> generated date. Only after the user changes the date, does the REF field 
> get
> the correct value.
>
> Works:
> CREATEDATE with bookmark and referenced by REF
> Bookmark and content control and referenced by REF
>
> Does not work:
> CREATEDATE with bookmark and content control and referenced by REF
>
> Can it be solved? I have a macro that runs at startup, but I don't believe 
> I
> can use macros for this problem. 

0
Doug
12/12/2009 12:35:27 AM
REF fields in headers do not update automatically. You could apply a 
uniquely named character style to the date (based on the underlying style) 
and use a styleref field in the header. Styleref fields constantly update - 
but will not take the data from inside a content control.
Why do you need a content control for the date? Simply insert the Createdate 
field in the document body and/or the header as required.

-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


"happysad" <happysad@discussions.microsoft.com> wrote in message 
news:1DA6B8F7-C036-4B36-B083-029ED74264EA@microsoft.com...
>I am trying to do the following for a client:
>
> A template for a letter has a locked (grouped, but not protected) section 
> on
> the first page containing content controls for name, address and date.
>
> On the following pages there is a header with REF fields referencing
> bookmarks around the content controls on the first page. This works fine 
> for
> copying the data to the header.
>
> Now I want a default date in the date control on the first page, so I add 
> a
> CREATEDDATE field inside the control. This gets filled in automatically 
> when
> the document is generated, and the user can change the date if he wants -
> that much works.
> BUT - the REF field in the header does not pick up the automatically
> generated date. Only after the user changes the date, does the REF field 
> get
> the correct value.
>
> Works:
> CREATEDATE with bookmark and referenced by REF
> Bookmark and content control and referenced by REF
>
> Does not work:
> CREATEDATE with bookmark and content control and referenced by REF
>
> Can it be solved? I have a macro that runs at startup, but I don't believe 
> I
> can use macros for this problem. 


0
Graham
12/12/2009 7:11:58 AM
Hi Graham,

In the case where the Ref to the text of the bookmark actually replicates 
the content control containing the CreateDate field, the date in the header 
does "update" to show the date that the document is created from the 
template.

-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Graham Mayor" <gmayor@REMOVETHISmvps.org> wrote in message 
news:uhZFlpveKHA.5808@TK2MSFTNGP06.phx.gbl...
> REF fields in headers do not update automatically. You could apply a 
> uniquely named character style to the date (based on the underlying style) 
> and use a styleref field in the header. Styleref fields constantly 
> update - but will not take the data from inside a content control.
> Why do you need a content control for the date? Simply insert the 
> Createdate field in the document body and/or the header as required.
>
> -- 
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor -  Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> "happysad" <happysad@discussions.microsoft.com> wrote in message 
> news:1DA6B8F7-C036-4B36-B083-029ED74264EA@microsoft.com...
>>I am trying to do the following for a client:
>>
>> A template for a letter has a locked (grouped, but not protected) section 
>> on
>> the first page containing content controls for name, address and date.
>>
>> On the following pages there is a header with REF fields referencing
>> bookmarks around the content controls on the first page. This works fine 
>> for
>> copying the data to the header.
>>
>> Now I want a default date in the date control on the first page, so I add 
>> a
>> CREATEDDATE field inside the control. This gets filled in automatically 
>> when
>> the document is generated, and the user can change the date if he wants -
>> that much works.
>> BUT - the REF field in the header does not pick up the automatically
>> generated date. Only after the user changes the date, does the REF field 
>> get
>> the correct value.
>>
>> Works:
>> CREATEDATE with bookmark and referenced by REF
>> Bookmark and content control and referenced by REF
>>
>> Does not work:
>> CREATEDATE with bookmark and content control and referenced by REF
>>
>> Can it be solved? I have a macro that runs at startup, but I don't 
>> believe I
>> can use macros for this problem.
>
> 
0
Doug
12/12/2009 7:28:02 AM
Yes! I can also get it to work with the Rich Text Content Control. 
Strange, when the Text Content Control and Date Content Control don't work.

(I need it to be a content control because the field is in a grouped table. 
It is not possible to edit outside the content controls.)



"Doug Robbins - Word MVP" wrote:

> With a Rich Text Content Control containing a CreateDate field with the 
> whole content control bookmarked and a ref field to the text of that 
> bookmark in the header in a .dotm template, what you describe works here.
> 
> When I had tried saving the template as a .dotx however, there was no new 
> document created when I selected that template as the basis of a document. 
> I admit however, that I have never used a .dotx template before so do not 
> know anything about them.
> 
> -- 
> Hope this helps.

0
Utf
12/14/2009 10:54:01 AM
I got the RTF control working with the deafult date and the REF field. 

But now the tab order is no longer working after the cursor reaches the date 
field.
I think it is because TABs can be entered in an RTF control.

Can it be fixed somehow? Or is there a way to trick Word so it skips over 
the RTF control when tabbing?

The date field is in the first row of the 2nd column in a 2 column table. 
The table is grouped.

"Doug Robbins - Word MVP" wrote:

> With a Rich Text Content Control containing a CreateDate field with the 
> whole content control bookmarked and a ref field to the text of that 
> bookmark in the header in a .dotm template, what you describe works here.
> 
> When I had tried saving the template as a .dotx however, there was no new 
> document created when I selected that template as the basis of a document. 
> I admit however, that I have never used a .dotx template before so do not 
> know anything about them.
> 
> -- 
> Hope this helps.
> 

0
Utf
12/14/2009 12:14:02 PM
Reply:

Similar Artilces:

Security Vulnerability in Outlook 2007 email Encryption
I am using Outlook 2007 and Vista Ultimate. When someone with whom I have exchanged digital ID's with sends me an encrypted e-mail and I attempt a straight-forward "Reply To" there is an error message "Microsoft Outlook had problems encrypting this message ... recipients had missing or invalid certificates, or conflicting or unsupported encryption capabilities". The choices offered are to send unencrypted or to cancel. However, send unencrypted doesn't work. So then if I save the "Reply To" as a draft, restart Outlook, and then send the draf...

Sort Dates by Month and Day, Not Year
Is there a trick to sort a date column by Month and Day, and not have it sort the list by year as first sort. Without breaking up the data into multiple columns. Hi, You could add a column with the formula =YEARFRAC(DATE(YEAR(A1),1,1),A1) and sort on that column. It does sound like you want to avoid this. If your dates are the row field of a pivot table and your group by month and day Excel will ignore the year. If this helps, please click the Yes button. Cheers, Shane Devenshire "Al Franz" <albert@nospam.netmation.com> wrote in message news:OsrEqlJaJHA.5340@TK...

How to create an email in a client's default mail client
Hi I need to create and send an email using MAPI that works when the client is using outlook express, or a variety of versions of outlook. I think this code will work with a variety of outlook versions, but it doesn't work with outlook express What do I need to do differently to work with Outlook Express and Outlook? -------------- Code Snippet Set oApp = CreateObject("Outlook.Application") Set oOutbox = oApp.GetNamespace("MAPI").GetDefaultFolder(4) '4 = olFolderOutbox enum value Set oEmail = oApp.CreateItem(0) '0 - olMailItem enum va...

Bank Transfers Carry Default Trx Type of Interest Income?
All of our transactions entered using the Bank Transfer Entry window display in SmartList with a CM Trx Type of Interest Income. Is there a setting somewhere that controls this? -- Pete P. Interest income? Which SmartList are you looking at? Bank Transfers go from one bank account to another so they should use the cash accounts assigned to the Checkbook ID. The cash account is a required field when you set up the checkbook. What account is set on the Checkbook? "Pete Pillitteri" wrote: > All of our transactions entered using the Bank Transfer Entry w...

How do i show the office assistant in microsoft 2007?
I wanna see the paper clip dude!!!!!!!!!!!!!!!!!!!!! The office assistant is no longer available in Office 2007. Yves "Frankdoodle" <Frankdoodle@discussions.microsoft.com> wrote in message news:20606EED-B915-436B-A9E1-21DCAA2CE632@microsoft.com... >I wanna see the paper clip dude!!!!!!!!!!!!!!!!!!!!! http://www.appscout.com/2007/02/to_kill_a_paperclip.php -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. On Sun, 28 Mar 2010 23:15...

Placing a Date Range on a Report
I have several reports that have been created in Microsoft Access that require a date range in order to pull the requested data. The date range was set up in the query that was built to run the report. Is there a way to get that date range displayed on the report? ...

Access tab control from Lebans
Hi to everyone in the newsgroup, recently I was surfing in the Lebans's website and at this link http://www.lebans.com/tabcolors.htm, I found an mdb example to enhance the standard Access TAB control. Unfortunately, due my poor knowledge in Access and VBA code, I am having problems to use it on my own form. Of course, I exported to my db the module and the class and I copied all the necessary too, but it's still telling me: ''Unable to create DIBSection''. Could someone explain me how to do? May be, I will appreciate a step by step help or something else. Thank...

Calculated controls
Hi, I have several different forms using subforms in continuous form view. Some are calculated controls. I seem to have problems with Access in continual 'Calculating...' mode, with the form essentially locked up. Pressing F9 stops this, and all is well and works fine. As best I can trace it, it is because of the calculated fields, but I can't see any circulating formulas. For example, =nz([UnitsOuterLast])*nz([LastOuterStock])+nz([LastUnitStock]) locks up one form as stated. All three parts are fields, not even referencing other calculated controls (Or vice versa). If I...

Cannot create Mailbox or Addresses
Exchange 2003 on a 2003 Server Mailboxes do not seem to be created when a new user is created. Recently I added this Exchange 2003 server to my existing domain. I moved mailboxes and Public Folders from my old and ailing Exchange 2000 server and then took it offline. The new Exchange 2003 server has seemed to work fine for a month, but today I added a new user for the first time. Everything goes fine and everything is checked to create a new mailbox for the user, however, the mailbox never seems to be created or the addresses generated. I have tried this 6 or 7 times, but always with the...

How can I control the application bar color (active state)?
Hi all, When a Windows application lost focus, it's title bar will become gray(in WinXP). I have twin process application´┐Ż´┐Ż I hope one process has focus, the other process' title bar is still blue. I don't want to draw the title bar myself. Is there any flag I can control to maintain the blue state when user focus come to any process of mine? Thanks in advance to anyone who can help! On May 11, 8:49=A0am, "John Smith" <ta...@126.com> wrote: > Hi all, > > =A0 =A0 =A0When a Windows application lost focus, it...

How can I graph the #of times a certain word is found in Excel?
For example I have a list of reasons of what brand of butter a group of customers choose to buy.... How can I take the number of times "I can't believe it's not butter" is listed as compared to "Brommel and Brown", etc. and graph them accordingly onto one graph so if I have 512 occurances where customers chose "I can't believe it's not butter" and 256 occurances where customers chose "Brommel and Brown" - then I would like the graph is twice as large for the "I can't believe it's not butter". Hi, Just put in an ...

Dates getting corrupted in Microsoft Money 2005
Does anyone else have this issue? Money is corrupting the transaction dates in my data. Account balances reconcile and all the transactions are there, but the dates of the transactions are getting progressively corrupted for some reason. Especially problematic as I'm trying to do my tak returns at the moment and nothing reconciles to the expected totals. I am on MM 2005. My data goes back to 1995 and my Money file is around 22MB in size. * Is there a later version I should try? * Should I re-install? * Can I recover or correct this data without going back to old archives (fortun...

Money 2007: odd behavior of transactions in loan account
Hello, In Money 2007, looking into loan account with payments made from checking account, when I click the transaction, for some transactions the Category is grey/disabled, while for others it's enabled. The category is "transfer from checking". If I pick a transction where it's enabled and click "split", the split screen for some reason shows that the whole amount is unassigned, and the sum of splits = $0 - even though "transfer from checking" does appear above with correct amount. But then, if I click on the empty line, "unassigned" dis...

Opening spreadsheet & word very slow others ok
When I use file open in Word and Excell it is very slow in going from folder to folder. Several minutes may pass in a deeply embedded spreadsheed or doc. Other software flips through folders fine. Office 2003 SP1 W2K Pro 10 machine p2p network Right-click on the My Computer icon on the Windows desktop, left-click on Disconnect Network Drive, and disconnect any mapped network drives that are not currently available. Nokose wrote: > When I use file open in Word and Excell it is very slow in going from folder > to folder. > Several minutes may pass in a deeply embedded spreadsheed ...

find default "look in"
Is there a way, I can make Excel default the "look in" to 'values' when I open the Find dialog box, rather than formulas ?? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ It looks like excel tries to help by remembering the last thing you used. So maybe you could have a dummy workbook that you put in your XLStart folder that does a Find with the settings you like: Option Explicit Sub auto_open() Worksheets("sheet1").Cells.Find...

need a date look here
This is a multi-part message in MIME format --=_NextPart_2rfkindysadvnqw3nerasdf Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Get all the hots girls @ www.pearlymae.com --=_NextPart_2rfkindysadvnqw3nerasdf Content-Type: text/html Content-Transfer-Encoding: quoted-printable <html> <head> <meta name=3D"GENERATOR" content=3D"Microsoft FrontPage 6.0"> <meta name=3D"ProgId" content=3D"FrontPage.Editor.Document"> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dwindow...

can't save
Write using Word - 2007 - Windows 7 When I try to shut word file down with the red "close" button - Word/Windows will not close. Even after saving the files - the "word document" simply stays open Hope you have some help....I've been frustrated for weeks. Even tried a Word Uninstallment (didn't work) - and tried a COMPLETE Office 2007 Series Uninstall - No luck.... Thanks for any help you may be able to provide. Pete firpro1@comcast.net Add the CLOSE command button to your Quick Access Toolbar. -- Terry Farrell - MSWord MVP &qu...

Formula for Dates and CF Colour then convert to Text
Hi, Part 1 - Although I can do the CF on the cell, I am looking for a formula based on the following: 1. Date entered is from Today up 7 Days - My CF will format cell to Green 2. Date entered is between 8 days and 14 days - CF will format Amber 3. Date entered is greater than 14 days (15?) - CF will format Red My current formula's in CF based on: Condition 1 - Formula is: =IF(D4<>"",D4>TODAY()-7) Condition 2 - Formula is: =AND(D4<>"",D4>TODAY()-14) Condition 3 - Formula is: =AND(D4<>"",D4>TODAY()-600) -60...

3075 Error Trying to search for key word in a comments field.
OK so here is where I am and what I am trying to do next. Where I am. I have my Visual Basic code tied into the OK command button. I have a Form to search through my data and only put the requested information in a query. So far I have all of this working fine. I have the code clear the query each time it is used and repopulate the querry with the new choices.(The Where From etc...) The Problem with what I am trying to do next. It has been decided that there needs to be a comments column. They then what the option to search for a key word in the column to define the results. The...

Outlook 2007 and UTF-8 encoding problems
Hi all! Outlook 2007 seems to not work with plain text letters in UTF-8 encoding. How to reproduce: 1. Create a new e-mail using UTF-8 encoding in plain text format 2. Type in main body (not subject!) some NON-ASCII letters (for example cyrillic symbols) 3. Fill "To" field (use your own e-mail address) 4. Send&Receive 5. Open message. It is unreadable until you switch message encoding to any other and back to UTF-8. I can't duplicate the problem here. I turned off auto-encoding, then = created a message in plain text format, typed some cyrillic text into it = (I have t...

How to set Outlook 2000 Default font size
I have to use Microsoft word as my default Message editor in Outlook. How can I get my way to make Font :Arial Text Size 18 as my default whenever I compose and reply a mail. ...

Word Mail merge lables from .xls document
Office 2000 Windows XP Pro: I am trying to create Avery 8160 lables in WORD form an Excel database. . My sequence in WORD is as follows. Tools>Mail Merge>Create Main Document>Mailing Lables> Active Window>Get Data>Open Data Source. When I get to into folder that contains the .xls file the only files listed in that folder are WORD files. When I click on the File Type drop down menu at the botton of the OPEN DATA SOURCE window, the only options I have are "All Word Documents", "Word documents", "Web pages", "Rich text format", &qu...

Outlook 2003 disable "send" Control/Enter shortcut
Can anyone please tell me how to disable a shortcut in Outlook 2003? In Outlook, Control/Enter is a shortcut that sends email. I have hit it on more than one unhappy occasion when the email I was writing was not yet in any shape to be shipped. The Outlook Help files tell you how to remove a shortcut from a shortcut group, once you have set up a shortcut group. But I have not set up any shortcut groups and cannot find instructions on how to disable the default shortcuts that come with Outlook. I tried the MS Knowledge Base and could not find the answer. I hope one of the geniuses on t...

Create functions that support MAKEINTRESOURCE
Hi, I would like to create a CListControl with a method defined like this : InitControl( LPCTSTR lpszFileName, int nImgCount ) that loads an image and assign an image list. The problem is I want to be able to load an external image file or an embedded resource. SO how can I detect that its a resource when caller used MAKEINTRESOURCE. >SO how can I detect that its a resource when caller used MAKEINTRESOURCE. The documentation gives it away: "The return value is the specified value in the low-order word and zero in the high-order word." i.e. test the high word of the paramete...

Access 2007 Stopped working
I have noticed that many other people have also had this problem of "Access 2007 has stopped working. Windows will check for a solution" etc etc... I have noticed within my Access 2007 program (running on Vista) that this crash happens when I close the very last (or only open) object in access. I doesent matter what that object is; Table, Form, Report Qry etc. When the last tab is closed or X'd. Access crashes and restarts. This is VERY annoying, especially if I have a lot of work to do and dont like to keep tabs/objects open if i no longer need them, but just want to cont...