Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2014, 02:13 AM
MGerhard MGerhard is offline Updating grouped ContentControls in Word 2010 Windows Vista Updating grouped ContentControls in Word 2010 Office 2010 32bit
Novice
Updating grouped ContentControls in Word 2010
 
Join Date: Jul 2014
Posts: 2
MGerhard is on a distinguished road
Question 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
Reply With Quote
  #2  
Old 07-29-2014, 11:48 PM
macropod's Avatar
macropod macropod is offline Updating grouped ContentControls in Word 2010 Windows 7 32bit Updating grouped ContentControls in Word 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 08-04-2014, 01:47 AM
MGerhard MGerhard is offline Updating grouped ContentControls in Word 2010 Windows Vista Updating grouped ContentControls in Word 2010 Office 2010 32bit
Novice
Updating grouped ContentControls in Word 2010
 
Join Date: Jul 2014
Posts: 2
MGerhard is on a distinguished road
Default

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
Reply With Quote
  #4  
Old 08-04-2014, 02:34 AM
macropod's Avatar
macropod macropod is offline Updating grouped ContentControls in Word 2010 Windows 7 32bit Updating grouped ContentControls in Word 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by MGerhard View Post
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.
Grouping content controls has nothing to do with preventing their deletion, since it's quite easy to delete the entire group in one go. What you need for that is to set their 'cannot be deleted' property.
Quote:
My major problem was that while the content controls are protected through those groups the fields.update() could not update the enclosed controls.[
.Fields.Update has nothing to do with content controls - it applies to fields, which may contain or be contained within content controls.
Quote:
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.
That's largely why I suggested attaching a document to a post. In any event, you don't need to provide a restricted document - only one that demonstrates the issue.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

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
Updating grouped ContentControls in Word 2010 Word 2010 Includetext not automatically updating nataliec Word 4 12-13-2012 02:37 PM
Updating grouped ContentControls in Word 2010 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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:40 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft