#1
|
|||
|
|||
Updating grouped ContentControls in Word 2010
Hi @ll,
I am havon some trouble with an automatically generated Word document: A 3rd-Level-Software generates a vbs-file including some variables. This vbs-file creates (in combination with a Word Template) a new Word document and implements the variables. This is working fine. The values of the variables should be shown in several grouped Textboxes (ContentControls). In Word 2007 this also worked fine. But in Word 2010 (14.0.7116.5000 - 32Bit) the .Fields.Update command does not have an affect. The value in the Textbox is still the default value, not the value from the variable. When I am changing into Design Mode I can manually choose "Update fields" in the context menu of the field. But mos of the users do not have the access rights to use the Desing Mode so this way is not available. The Word Template can not be changed. My only access point is the vbs-file. Does anybody have an idea how to handle this issue? With hope and best wishes, Markus |
#2
|
||||
|
||||
Without seeing the problem document and the associated code, it would be difficult for anyone to diagnose the issue. Can you attach the document & code to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen. Adding both the a single zip file for attachment might be the best way to manage this.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Hi macropod,
Thanks for your answer. But I am legally not able to post those documents But I found a workaraound that fulfills 90% of my problems: As far as I know now the basic idea behind the grouping of content controls is to ensure the content controls shall not be deleted or changed. My major problem was that while the content controls are protected through those groups the fields.update() could not update the enclosed controls. My workaround: I am searching for all content control groups and remove them. Then I am updating the fields and after that I create a new group around the whole content. This way the content controls are still locked for the users an the data fields are up to date. The last 10% would be, if I were able to recreate exact the same groups as there were before. I tried that with writing the ranges of the groups into a collection. But when I was trying to set those ranges to a new created group I alway got the error message "Invalid range" But for my client the 90%-Solution works for now. But if you have an idea about the creating of groups an re-setting the range values, you will be very welcome Best regards, Markus |
#4
|
||||
|
||||
Quote:
Quote:
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
content control, macro, updating |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Directory MailMerge with Category Grouped Lists on Labels | screech | Mail Merge | 3 | 06-18-2014 11:41 PM |
Create automatically updating fields in Word 2010 | tryer | Word | 8 | 01-08-2014 12:39 AM |
Word 2010 Includetext not automatically updating | nataliec | Word | 4 | 12-13-2012 02:37 PM |
Mail Merge a Listing grouped by specific field | KarenLS | Mail Merge | 1 | 11-11-2012 02:41 PM |
Crashes since updating Outlook Connector on 30 September 2010 | bluefield | Outlook | 8 | 10-18-2010 12:15 AM |