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
993 Views

Similar Articles

[PageSpeed] 44

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:

Setting Default Domain for Logon
I am running OWA for Exchange 2003 and I have set the default domain for the default web site to mywindows2000domain.com. When I logon to OWA this doesn't seem to be working because when the user goes to logoff they get a username and pw prompt. If they login with mywindows2000domain\username when they login it works fine. I would like to not use the mywindows2000domain\username format. Any idea? Cheers! try using mywindows2000domain (netbious name of the domain) instead of mywindows2000domain.com (fqdn of the domain) -rp- "Rio" <anonymous@discussions.microsoft...

Awesome list of Excel/Word/Powerpoint shortcuts!
Hi, everybody! I recently discovered a great keyboard shortcut list for the office applications. It seems to have practically every shortcut imaginable and it fits on one page too! I printed it out and put on the wall next to my monitor -- just great!. Thought you would appreciate it... Here's the link to the PDF file. Hit print and you're ready to go. http://www.prihodko.com/msoffice/Office_2003_Shortcuts.pdf Lindy Hi Lindy, For Excel, I like Chip Pearson's Excel Keyboard Shortcuts page at: http://www.cpearson.com/excel/KeyboardShortcuts.htm There is also a d...

Merge to email w/Word and Outlook 2002 security issue
I am trying to merge email using Word and Outlook 2002. This merge consists of about 3000 recipients. When I commence the merge I get an Outlook Security warning that tells me that some outside program is trying to send email using my Outlook profile and I have to click Yes or No. It procedes to ask me for ever single recipient... I'm not going to sit there and say yes for 3000 people. Do you know of a setting somewhere that I can change to not ask me everytime? Thanks, Brian What service pack(s) have you applied? Did you choose HTML as the message format for the merge? -- ...

Using insert to paste a row--how done in Excel 2007
Hi, In my old version of Excel, I could copy a row or chunk of rows, move to a new spot and use the "insert row" icon to insert the rows and paste it automatically. Now in Office 2007 it just inserts a row instead of what I have copied. I want it the old way! How do I do it? -- Thanks, PTweety R-click, Insert Copied Cells. pickytweety wrote: > Hi, > In my old version of Excel, I could copy a row or chunk of rows, move to a > new spot and use the "insert row" icon to insert the rows and paste it > automatically. Now in Office 2007 it just inserts a r...

Opening tab-delimited files in Excel... how to stop the autoformat of dates?
Hello, I'm doing bioinformatics work in which I often download tab-delimited files describing genomes and open them in Excel. Unfortunately, Excel decides that genes with names like APR1 and SEP7 are actually dates, and reformats them as such. This is a huge headache, as I often don't notice these problems until much later. Is there anyway to completely disable this date autoformatting? I've searched high and low and have yet to find a solution. Thanks! P.S. I'm using Excel 2002 -- salamander ------------------------------------------------------------------------ sa...

Can I make a database in Word with Excel Data
I know this may be a "DUH" question, but... I am making a list of area dentists that I have copied and pasted of of the Dex website into Excel. I am wondering if I can take this inf and make a database in Word for printing address labels. Does anyon know if this can be done, and HOW?:confused -- Myn77 ----------------------------------------------------------------------- Myn777's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2958 View this thread: http://www.excelforum.com/showthread.php?threadid=49283 For help on Word mail merge using Excel as the...

create bar in timeline like a Gantt
I would really appreciate your help. I have a weird one! I have built a horizontal time line at the top of an Excel sheet. VBA code collects the start and end dates of a date range. How can I build a bar on the row below the time line, like in a Gantt chart? I would also like to put a name within the bar. Collecting the start and end dates, navigating to the timeline sheet and the row below the time line is OK, but I can’t find the code for creating the bar. Knowing the start and end dates I guess I could relate them to the spreadsheet columns, but how do I connect them wi...

Exposing Creating User's team membership
Hi, Can anyone demonstrate (or point me in the right direction) the following:- We have a number of sites, and a number of teams which map directly to the sites and have the same name as the site (eg siteA has a corresponding team called siteA). When in an opportunity, I would like to obtain the value of the creating user's team, and use this to set a value in another picklist. I am having trouble retrieving the team membership of the user that created the opportunity. Does anyone know of a way to do this? I am not even sure where to start looking at this. Thanks Fentp Hi Fen...

Create form similar to MS Access 2000 Help
Is it possible to create a form that works similar to the Help - Index form in Access 2000? My StreetTable consists of the following fields: Street_ID(autonumber), StreetName(text), Directions(memo). I want to be able to type the beginning letters of the street and the List of StreetNames continually reduces until I see the street I need in the StreetNames window. I would then click on that street and the Directions would appear in the third window panel. Since I'm dealing with approx. 5000 streets, scrolling really isn't an option that I want to consider. I found that a combo ...

HELP: Excel userform version control issue
Hi All, I have an excel userform that is posted on my companys intranet. The issue I am having is, users are saving this form to their hard drive and then using it(Instead of launching it everytime from intranet), SO basically when I have a new version of form on intranet they still use the old version as they have a habbit of saving it on their hard drive. Is there a way to resove this? something like they would see a popup message saying that "This is an older version that you are using, Please launch the form from Intranet for newer version". Thanks in advan...

Fix: Visio 2007 x64 Hangs During Database model Creation
I'm posting this here, so hopefully others will have an easier time finding the solution than I did... On Windows XP (x64) Visio 2007 hangs when I try to create a new database model diagram. Performing a "repair" doesn't help at all. For some reason, turning off the "Print Spooler" Service makes things work just fine. I have no idea why this is, but it did the trick. -- Chris Mullins, MCSD.NET, MCPD:Enterprise, MVP C# http://www.coversant.net/blogs/cmullins Hi Chris, Thanks for sharing this information. Do you see the hang when creating other new draw...

Create a new instance of a class that is a reference
Hi all, I am trying to make a class that when you create a 2nd instance the second instance will be a reference to the first. Public Class ClassA Private Shared tableList As Hashtable Public myInt as integer = 0 Public Sub New() MyBase.New() InitializeValues() End Sub Private Function openTable() As Boolean If (tableList Is Nothing) Then tableList = New Hashtable() End If If (tableList.ContainsKey(TABLE)) Then SetReference(Me, tableList(TABLE)) OpenCount += 1 Else ...

Spinning Beach Ball
I seem to notice a correlation between seeing the spinning beach ball more often after launching MS Word for OSX. I removed the PDFMaker.Lib and this improved the performance a great deal, but still noticing the SBB more often after launching Word. Anyone know about this? Many Word issues are related to corrupt Word Settings or Normal Template. You could try removing the Word Settings file, then testing. The Normal Template could be renamed, then test. Be sure Word is closed before removing or changing any files. You could also consider running the Remove Office utility and reinstalling Offi...

generate list of non-entries within dates
I use Excel (2007) to record activity and support for about 100 current online learners and I have to provide an activity summary sheet every two weeks. The list of learners is in one sheet and are marked "current", agreed break" or "completed" in an adjacent column. The total list is about 1000 and grows by about 10 each week. The activity log is another sheet of the same workbook. Assuming that all activity is logged in this way I need to generate a list (sheet) of those current learners who have not submitted any recent work and are therefore "inacti...

OWA authentication default domain
I'm running Exchange 2003 OWA. The exchange server is sitting behind a firewall, we are port forwarding web traffic to the exchange server. Users are getting asked for username/password, but are getting rejected when they do no enter the domain before the username (e.g. DOMAIN\username. I've set the default domain within IIS (using ESM), and we are NOT USING FORMS-BASED AUTHENTICATION. any ideas? thanks Andrew. Are you using a sigle server configuration or front-end/back-end? What kinds of authentication methods are enabled on the Exchange virtual dir? -- Blog "subject: exc...

Quotation mark key produces << instead of " in Word doc from PC
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I am updating a document that was created in Word on a PC several years ago. When I viewed it all the ' had become =. I found out in the forum how to fix that. But more important, I do not seem to be able to type a quotation mark. When I hit Shift &quot;, I get a symbol that looks like a doubled >. The symbol doesn't even exist on my keyboard. I suspect that I can go to Insert, Symbols, and get the proper &quot;, but this is a syllabus for a class that I teach year after year, updating t...

How do I turn on drag and drop in MS Word 2007?
It seems that drag and drop has stopped working..... I have no clue why. There are instructions on how to turn drag and drop on/off for MS Word 2003, but I can't find the directions on how to do this for Word 2007. I'd like to turn this back on. Can anyone help? Click on the the Office Button (top/left) and at the bottom of that window click on Word Options. In that window choose Advanced. Drag and Drop is the third choice down. (That said... it doesn't always work even when you have selected it. Sigh) The problem could have to do with the Symbols dialog box. When you...

Money 2007 add/delete Category
Is there a way to maintain my categories by viewing a list so easily add/delete categories? The Category maintenance in 2007 sucks.. I need to run through every single category just to delete one. Deluxe or Essential? If Deluxe, use the Account List More pull out, Categories & :Payees|Categories should show you all the categories at once and allow you to Move, Modify or Delete them as required. The pulldown at the top lets you see just Categories or Categories and Subcategories. "Vital" <Vital@discussions.microsoft.com> wrote in message news:4D4AAA91-6602-429E-915...

time/date stamp on email
i used microsoft outlook for email. i sent an email to another outlook user and i wanted to find out if he's read it or not. is there any way to view the time/date that the person reads the email ? if you requested a read receipt and if the recipient uses a program that is capable of replying, yes. otherwise, no. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchang...

Create Outlook Folders on external drive
How can I create an Outlook Folder (.pst) on another hard drive leter. I want to free up hard drive space without removing emails. I can see how to archive to an external drive, but I want an active, accessible folder on an external drive and have it show up in the Personal Folders list in Outlook. I want to be able to move email from the Inbox to folders on the external drive and be able to view them "realtime" from that folder or folders. At work the IT guys do it on a network drive. We can read or move email to and from folders on the network drive. I want to do that wi...

Using a Space in Webbrowser Control
Hello: As usual, I've run into a problem with something that is probably so simple... any help is appreciated. I'm using the webbrowser control with the navigate method. The url I'm using needs a space (which I know is not normally allowed, but it works directly in firefox and IE). Here's some sample code: ------------------------------------ strWebPage = "http://www.imdb.com" &" ?" & Text2.Text txtURL.Text = strWebPage Web1.Navigate txtURL.Text Do While Web1.ReadyState <> READYSTATE_COMPLETE DoEvents Loop DoEven...

Exporting a table from Access 2003 to Excel 2007
I am trying to export a table from Access 2003 with more than 100,000 records into Excel 2007 and am not having any luck. I do not find the 2007 file extension in the drop down and choosing the latest version only exports part of the table. Any thoughts on whether this is possible to do? -- Carol Hi Carol, This is even hard to do with Excel 2007. You won't be able to do it directly with Excel 2003. You could export the file as a comma separated value with a csv suffix. By default Excel usually opens csv files. However you may lose formatting and other stuff. I ju...

Word 2003-Page Orientation
I have a long Word 2003 document with all pages in portrait orientation except one. That page contains a table the size of which requires landscape orientation. I have always done this by inserting section breaks before and after this page. But now for some reason I can't get the orientation to change either on-screen or in my printer. When I check the page orientation in that page (section) it is set to landscape. Suspecting typical Word corruption (this document was made from previous versons of the same stuff) I did the usual copy-and-paste all but the last few empty ...

Changing default worksheet tab fonts
Is there a way to change the default font for a worksheet tab? That is, let's say that for some reason I wanted to use 8 point Verdana as opposed to whatever the default is. How would I go about changing that? Alternatively: is there a way to increase the number of characters allowed in a worksheet tab name? You cannot change the font of the tabs alone. 30 characters per tab is the limit. You can change the size of the tabs. This is a function of your Windows Display Properties. The size of the sheet tabs are governed by the setting for Scrollbars in Windows Display Appearance. ...

Switchboard created with Switchboard Manager doesn't open
Greetings All, The Switchboard I created with the Switchboard Manager wouldn't open when the dB is opened. So I went to Tools -> Database Utilities -> Switchboard Manager, chose my switchboard (that already said (Default)), and clicked the "Make Default" button. The switchboard still does not open when the db is opened. In fact, it doesn't even exist, as far as I can see. It doesn't show in the Forms window, and when I went into Tools -> Startup -> Display Form/Page box and looked for it, it wasn't there. I created a Form I am using as a Switchboard fo...