Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-28-2014, 05:40 AM
keen1598 keen1598 is offline Word 2010 Macro Enabled Template with Content Controls Windows XP Word 2010 Macro Enabled Template with Content Controls Office 2010 32bit
Novice
Word 2010 Macro Enabled Template with Content Controls
 
Join Date: Jan 2014
Posts: 4
keen1598 is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 01-28-2014, 02:59 PM
macropod's Avatar
macropod macropod is offline Word 2010 Macro Enabled Template with Content Controls Windows 7 32bit Word 2010 Macro Enabled Template with Content Controls Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

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]
Reply With Quote
  #3  
Old 01-28-2014, 03:10 PM
macropod's Avatar
macropod macropod is offline Word 2010 Macro Enabled Template with Content Controls Windows 7 32bit Word 2010 Macro Enabled Template with Content Controls Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

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]
Reply With Quote
  #4  
Old 01-28-2014, 06:42 PM
keen1598 keen1598 is offline Word 2010 Macro Enabled Template with Content Controls Windows XP Word 2010 Macro Enabled Template with Content Controls Office 2010 32bit
Novice
Word 2010 Macro Enabled Template with Content Controls
 
Join Date: Jan 2014
Posts: 4
keen1598 is on a distinguished road
Default version

Quote:
Originally Posted by macropod View Post
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.
What I mean by version is that when you open a template it opens as what I would call a ghost copy. When you are using a template document it, opens as 'Document1' and that file has no path/directory associated with it, but when opened in this manner multiple users can access the file simultaneously without read-write errors. In order for that file to receive an identity, the user would have to save it somewhere first.

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.
Reply With Quote
  #5  
Old 01-28-2014, 10:17 PM
macropod's Avatar
macropod macropod is offline Word 2010 Macro Enabled Template with Content Controls Windows 7 32bit Word 2010 Macro Enabled Template with Content Controls Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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 keen1598 View Post
What I mean by version is that when you open a template it opens as what I would call a ghost copy. When you are using a template document it, opens as 'Document1' and that file has no path/directory associated with it.
What you're doing here is the same as when you create any new document from its template. This has nothing to do with versioning or 'ghost' copies - you've created an entirely new document, with all the features of the template. So, if the content controls exist in the template, they'll exist in the document also.

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]
Reply With Quote
  #6  
Old 01-29-2014, 05:43 AM
keen1598 keen1598 is offline Word 2010 Macro Enabled Template with Content Controls Windows XP Word 2010 Macro Enabled Template with Content Controls Office 2010 32bit
Novice
Word 2010 Macro Enabled Template with Content Controls
 
Join Date: Jan 2014
Posts: 4
keen1598 is on a distinguished road
Default

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.
Quote:
Originally Posted by macropod View Post
you've created an entirely new document, with all the features of the template. So, if the content controls exist in the template, they'll exist in the document also.
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.
Reply With Quote
  #7  
Old 01-29-2014, 06:58 AM
keen1598 keen1598 is offline Word 2010 Macro Enabled Template with Content Controls Windows XP Word 2010 Macro Enabled Template with Content Controls Office 2010 32bit
Novice
Word 2010 Macro Enabled Template with Content Controls
 
Join Date: Jan 2014
Posts: 4
keen1598 is on a distinguished road
Default

Repairing the installation did not work. Will now have to follow Microsoft steps.
Reply With Quote
  #8  
Old 01-29-2014, 03:17 PM
macropod's Avatar
macropod macropod is offline Word 2010 Macro Enabled Template with Content Controls Windows 7 32bit Word 2010 Macro Enabled Template with Content Controls Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

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]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2010 Macro Enabled Template with Content Controls Rich text/Plain text Content Controls in Template michael.fisher5 Word 9 11-19-2014 06:36 AM
Word 2010 Macro Enabled Template with Content Controls Content Controls Sammie0Sue Word 6 11-06-2013 10:56 PM
Word 2010 Macro Enabled Template with Content Controls 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
Word 2010 Macro Enabled Template with Content Controls Grouping Content Controls cksm4 Word VBA 2 03-01-2011 12:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:41 PM.


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