#1
|
|||
|
|||
Word 2010 Macro Enabled Template with Content Controls
Hi all,
So I have created a small two page form using content controls in Word 2010 and saved it as a macro enabled template. I have added all the necessary vba code to essentially save all the data from the content controls to an external excel file, paired with the template set-up which should allow multiple users to access the file. The problem is this; when the file opens in a version-ed copy of thew template, the file opens in a compatibility mode and the content controls revert just rich text objects rather than controls. My transposing vba code works fine, I just can't figure out how to save the file such that I can open it as a version and have the content control objects function. If you open the file direct from the desktop shortcut to the file it opens as a version with no working controls. If you open the Word, then open the file through Word, it opens as a version but without working content controls. I've also tried using a helper file, which opened as a standard Word document from the same location as the form template, and used VBA to capture the pathway to associate later with the template. I used documents.add which opens the file as a version with non working controls, and documents.open which opens the file as the template itself and not a version but with working controls. I've encountered similar problems when working with template files in Excel, but using a helper file solved those issues for me. Can anyone help? |
#2
|
||||
|
||||
I'm not sure what you mean by "when the file opens in a version-ed copy of thew template". Word 2007 & later don't support the versioning feature of earlier Word versions. And, of course, if the template is saved in the .dot format or is used with Word 97-2003, the content controls will be converted to text.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
||||
|
||||
Cross-posted at: http://www.vbaexpress.com/forum/show...ntent-Controls
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
version
Quote:
Also I'm running an XP with Office 2010. The file is saved as a .dotm type. Word 2010 has a new set of controls call Content Control which are distinct from that of their now legacy controls. I think I have also figured out the issue as well. I have to check with my IT department to determine whether or not I have registry errors with my latest upgrade to 2010 which may be causing errors in general. |
#5
|
||||
|
||||
Quote:
The dotm extension identifies the template as a Word xml-format macro-enabled template, which is correct for what you're doing. As for the suspected application errors, have you tried repairing the Office installation (via Programs & Features > Microsoft Office > Change in the Windows Control Panel)?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
I'm aware of what opening a template does and should do. Maybe I don't know the correct terminology for it but still. The reason I post is because the content controls become rich text objects upon opening a new document from the template file. This is my exact problem. I'm repairing my word installation to see if that addresses the issues, and will update when I can confirm or deny.
|
#7
|
|||
|
|||
Repairing the installation did not work. Will now have to follow Microsoft steps.
|
#8
|
||||
|
||||
When you open a template, the template itself is editable. That is not the same as what happens when you create a document from a template. If you open the template for editing, are your content controls intact?
I'm also not sure what you mean by "Will now have to follow Microsoft steps". Can you clarify?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Rich text/Plain text Content Controls in Template | michael.fisher5 | Word | 9 | 11-19-2014 06:36 AM |
Content Controls | Sammie0Sue | Word | 6 | 11-06-2013 10:56 PM |
Macro-enabled Template | ReviTULize | Word VBA | 4 | 02-01-2013 01:46 PM |
Macro to link 2 content controls | bortonj88 | Word VBA | 2 | 08-21-2012 06:24 AM |
Grouping Content Controls | cksm4 | Word VBA | 2 | 03-01-2011 12:46 PM |