MS Word 2013 Content Control VBA Code

Hello,<o:p></o:p>
I have an MS
Word Container Control (Word 2013) which populates with an Account Number and a
Description. I wish for the user to click on this combo box (which initially
states "Click Here" in the control. When the User clicks there the
code runs to populate the combo box. After a user selects a specific item
in the combo box - the other container controls are populated with appropriate
information according to that selection.<o:p></o:p>
The population code of the combo box is as follows:
Sub LoadOpportunityList()
'On Error GoTo LoadOpportunityError
Set opportunityList = ActiveDocument.SelectContentControlsByTitle("OpportunityNumber").Item(1)
Dim cnnLoadOpportunity As New ADODB.Connection
Dim rstLoadOpportunity As New ADODB.Recordset
' Need to update this with URL HTTP and also with error trapping
' If Trusted Connection doesn't work, utilize a specific read only user account with access only to a specific view
cnnLoadOpportunity.Open "Provider=SQLOLEDB;" & _
"Data Source=(local);" & _
"Initial Catalog=AdventureWorks2012;" & _
"Trusted_Connection=yes;"
rstLoadOpportunity.Open "SELECT Distinct NationalIdNumber, JobTitle FROM [AdventureWorks2012].[HumanResources].[Employee] order by NationalIdNumber;", _
cnnLoadOpportunity, adOpenStatic
rstLoadOpportunity.MoveFirst
' Clear Combo Box List
With ActiveDocument.SelectContentControlsByTitle("OpportunityNumber").Item(1).DropdownListEntries
.Clear
'Populate Combo Box
Do
.Add rstLoadOpportunity![NationalIdNumber] & " - " & rstLoadOpportunity![JobTitle]
rstLoadOpportunity.MoveNext
Loop Until rstLoadOpportunity.EOF
End With
'GetOpportunityDetails ("Vice President of Engineering")
' Find out if the attempt to connect worked.
If cnnLoadOpportunity.State = adStateOpen Then
MsgBox "Welcome to Database!"
Else
MsgBox "Connection to Database is not available. Please contact IT Help Desk for Support."
End If
rstLoadOpportunity.Close
cnnLoadOpportunity.Close
Set rstLoadOpportunity = Nothing
Set cnnLoadOpportunity = Nothing
LoadOpportunityExit:
On Error Resume Next
cnnLoadOpportunity.Close
Set rsLoadOpportunity = Nothing
Set cnnLoadOpportunity = Nothing
Exit Sub
LoadOpportunityError:
MsgBox "Error " & Err.Number & vbCrLf & Err.Description, vbExclamation, "Error in ConnectionTest" _
& "Connection to Database is not available. Please contact IT Help Desk for Support."
Resume LoadOpportunityExit
End Sub
This code works great.
I'm not certain how to put the code in to execute the update operation for other controls. I'm presuming it needs to be on the Content Control On Exit Event.
The Content Control Combo Box has the following ID Number: 1399939120
This code would initialize the combo box with the User Directions (Presumably when creating Only a new document).
Sub SetInitialComboBoxDirections()
Dim oCC As ContentControl
Set oCC = ActiveDocument.ContentControls("1399939120") 'Replace # with actual
Number Values
oCC.Range.Text = "Click Here to Select an Account."
End Sub
1) How would I extract then just the Account Number of the Content Control. The Description is helpful in combo box with the Account Number, but I don't want to print the combo box out with the Account Number and the Description - just the Id Number. 
2) what is the syntax for code for updating other document content controls after Combo Box on exit (provided that is the best method).
3) I'd prefer to use the ControlName itself rather than the IdNumber of the Control, since it is easier to refer to (or utilize code to do a lookup of the Id, if that is best, on the fly).
Note: I put the Combo box in the Document Header, but also perhaps it should be in the main body of the document.
Thank you,
John

To get the best answer to your question, I recommend you follow Ms. Meister's advice and post your question(s) on this in the
Word Answers forum. More people will see it. If you do this, please put a link in this thread to the new question.
Word 2013 documents work fine in Word 2010, 2007, and 2003, for that matter. Word 2013-specific features do not work in those earlier versions.
You may find the tools provided by Graham Mayor and Greg Maxey helpful. They provide for linked content controls that work in Word 2007-2013. 
Content Control/Variable/Bookmark and Document Property Tools
There is a version especially for Word 2013 but I don't think it's documents will be backward-compatible either.
Add, Map and Employ Repeating Section Content Controls in Word 2013
Charles Kenyon Madison, WI

Similar Messages

  • Is there a way to programmatically save a Word 2013 document into a Word 2010 in compatibility mode?

    Hi,
    I have a Word 2013 document that I want to open in Word 2010.  The problem is this document has a repeating section content control and if I open it in Word 2010, the content control is removed so the data won't be seen.  Is there any way programmatically
    to save the document in Word 2010 compatible mode?  So that I can open in both Word 2013 and 2010.  By the way, I'm using C# and OpenXML for this.
    Thanks.

    Hi,
    Based on my tested, I created a "Rich Text" content control in Word 2013, and it'll works fine in Word 2010.
    As far as I know, in Word 2013, content controls provide three key improvements: improved visualization, support for XML Mapping for Rich Text content controls, and a new content control for repeating content.
    Please see the article "What's new with content controls in Word 2013" it may be helpful to you.
    If you have any further question about coding/programing, please post your question to MSDN forum.
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=worddev&filter=alltypes&sort=lastpostdesc
    Regards,
    George Zhao
    TechNet Community Support

  • Identifying a content control in a Word 2013 document and accessing the current "text" value of the control.

    I'm new to VBA and need to better understand the syntax for identifying, accessing control "value" and setting the value from a user form.
    My task is this, I have a word document containing the new Content Controls. I need to be able to access each individual control to initialize a UserForm control. I then need to update the "values of the controls on exiting the UserForm. Can someone
    proved some simple sample code showing this functionality? I have surmised that the "range" attribute holds the value of the control but I need the textual or logical value of the control.
    Thanks.

    Hi Gunteacher,
    My task is this, I have a word document containing the new Content Controls. I need to be able to access each individual control to initialize a UserForm control. I then need to update the "values of the controls on exiting the UserForm.
    What's content control you are using? Based on my understanding, we can indentify the content control by its tag and get the value of content control and initialize the control on the userform in the initialize event of userform. For example,
    code below is that get the text of rich text content control:
    ActiveDocument.ContentControls(1).Range.Text
    And here are some helpful links about content control for your reference:
    ContentControl Object (Word)
    Working with Content Controls
    What did you mean "I then need to update the "values of the controls on exiting the UserForm."? Did you mean that when the values of content control is changed, it should update the control on the user form which was open before?
    As far as I know, there is no such event suitable for this secnario. If you want content control to support this event, I suggest that you submit the feedback from the "Smile Face" at the top right corner of Word.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Excluding VBA codes from grammar & Spell checker in word 2013

    hi Guys
    i am learning VBA & i write my notes & my exercises in a word document.
    the problem is Grammar & spell checker shows VBA codes as errors.
    i don't want to completely disable checker. is there any method or Add-on so that we introduce Correct VBA codes as correct sentences to word 2013 so that it doesn't show them as errors ?
    thanks in advanced

    i tested it but i noticed an strange behavior. it sometimes works but sometime doesn't. or sometime partially works.
    for example i have defined a box as a border around the selected Area. this applies but although i have selected "do not check spelling or grammar" , system again shows spelling & grammar errors as you see in the screenshot. it's seen even
    after i reapply style. any further help please?
    Your screenshots have far too little resolution to see anything meaningful. I cannot see what Style you're applying the attributes to, or how you're using that Style. If you're applying the Style to text that's already in the document, you may need to run the
    spell-checker to clear the 'error' underlining that was already there.
    Cheers
    Paul Edstein
    [MS MVP - Word]
    i have created the "NOGrammarSpellCheck" Style correctly.
    yes i had written some VBA codes in my doc, then i created my "NoGrammarCheck" Style & Applied it on the selected Exiting codes. but again errors are shown. i noticed that when i again click on my style to apply, know errors disappear.
    so i found that if codes exit before, we must apply the
    "NoGrammarCheck" Style Twice so that it completely be applied.
    but if we Apply the style on a blank area in word doc & then paste our VBA codes in that Area, now everything is ok & no grammar or spell check is shown.
    am i correct ?

  • Open xml relationship target is NULL when inserting chart into a mapped rich text content control in Word 2013

    Hi,
    I have a word document with a rich text content control that is mapped to a CustomXml. You can download an example here
    http://1drv.ms/1raxoUr
    I have looked into the specification ISO/IEC 29500-1:2012 and i understand that the attribute Target for the element Relationship can be set to NULL at times(Empty header and footer in the specification).
    Now, i have stumbled on Target being NULL also when inserting a diagram into a word document. For example:
    <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"
    Target="NULL" TargetMode="External" xmlns="http://schemas.openxmlformats.org/package/2006/relationships" />
    Why is Target="NULL" and how should i interpret that Target is null?
    Br,
    /Peter
    Peter

    Hello Peter,
    The relationship in question is associated with the externalData element (ISO/IEC 29500-1:2012 §21.2.2.63). For the other two charts in this document, the corresponding relationships are of the other allowable form:
      <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package" Target="../embeddings/Microsoft_Excel_Worksheet1.xlsx"/>  <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package" Target="../embeddings/Microsoft_Excel_Worksheet2.xlsx"/>
    For charts 1 and 3 in your document, the data can be edited via the Chart Tools ribbon control. The option to edit data is not available for chart 2. The data used to create chart 2 is the same default spreadsheet data used for chart 1, and in fact the spreadsheet
    references are still present in the file format, despite there being no apparent link to a spreadsheet for chart 2.
    Thus, it appears that Target="NULL" in this context means that the chart is not associated with an external data source. The specification doesn't have much to say about the semantics of the Target attribute (ISO/IEC 29500-2:2012 §9.3.2.2) beyond
    the fact that it be a valid xsd:anyURI, which the string "NULL" is.
    It looks like there is some unexpected interaction between the chart and the content control. I don't think the file format is the issue. You will probably need to pursue that behavior from the product perspective via a support incident, if that behavior
    is unexpected. If you still have questions about what is seen in the file format, please let me know.
    Best regards,
    Matt Weber | Microsoft Open Specifications Team

  • Where is the forum for writing VBA code to control SharePoint 2013

    For Example, I want to use VBA code to create a SharePoint list and maintain it.  I can't find how to do that.  In Office 2003, we had the SharedWorkspace Object; but that's been deprecated.

    Current way to go is either CSOM or the SharePoint 2013 REST API. I'm not great at VBA, but I assume the REST API is the only option for you. Here you can find more info:
    http://msdn.microsoft.com/en-us/magazine/dn198245.aspx
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Word 2013 - Bulleted list inside rich text content control

    Hi,
    I'm mapping a rich text content control to an xml node within my custom xml.
    While i'm in design mode i try to format the text so that it will be a numbered list.
    One thing that i noted though was that the numbers are placed outside the content control. This is only my first observation.
    The thing is, the rich text(RTF) that is saved within the custom xml is later used to populate a second document. This works great except for one small issue. The numbered list is not showing up within the second document.
    Would appreciate any help i can get with this issue.
    Br,
    /Peter
    Peter

    Hi Peter
    This is tricky, because...
    By default, when you insert a new RichText content control it will not include the paragraph mark for the paragraph it's in. Numbering is a paragraph-level formatting.
    If you work in Word, you can see this. Turn  on the display of non-printing characters (the backwards P button in the "Home" tab of the Ribbon). Insert a RT content control and observe where the paragraph mark (backwards P) is in relation to the
    CC's boundaries. Now press ENTER and observe that the paragraph mark is WITHIN the CC. Apply number formatting and you'll see that it's NOW inside the CC.
    You can do this the other way around: apply the numbering then press ENTER. Again, it should now be within the CC.
    This behavior is by-design. I would guess that lists the users type would have more than entry, so the numbering will be within the CC range when the custom XML is extracted?
    Cindy Meister, VSTO/Word MVP,
    my blog

  • Userform controls disappearing in Word 2013/Windows 8.1 with High-Res display - DLL error?

    I have a .dotm file with a large number of modules and userforms. Creating new documents from the template works fine on almost every computer I've tested it on (hundreds), but I've run into a setup that fails consistently.
    Two different Samsung ATIV 9's with a high res display and Windows 8 (64bit)/Office 2013 show the same problem:
    When opening a new document based on the template for the first time, it works fine. If I open the VB editor, everything looks normal, userforms are intact.
    On the second and all consecutive attempts, it throws a "Type Mismatch" error. Opening the VB Editor, I get a compile error on lines of code referencing components of the first userform (alphabetically). Opening that userform, it shows only a blank
    multi-page control, and all the other controls are missing - hence the new compile errors on controls that used to exist. If I remove that userform and save the file, the project compiles, but opening a new document from the template will result in "Word
    has stopped working..."
    I can actually reproduce this behavior starting from scratch - new blank document, save as a .dotm. Create a new userform and add a multipage control. Clicking any control in the toolbox to add it to the form will result in a "Type Mismatch" error,
    even though there's no VBA code. I can then successfully add the control to the form. But, once I save and reopen the template, the multi-page control is blank, and the other controls I put on it disappear.
    I at one point got an error from the VB Editor that it "could not open macro storage" and the included help suggested that might be due to an incorrect version of vbe7.dll.
    The only copy of vbe7.dll I could find was at:
    c:\Program Files\Microsoft Office 15\root\vfs\ProgramFilesCommonX86\Microsoft Shared\VBA\VBA7.1
    The dll version was 7.1.10.44
    I tried replacing that file with a vbe7.dll file from a working computer (version 7.0.15.89 from c:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA7), but that just resulted in the VB editor not loading at all.
    I have tried both a 32bit Click-to-run version of Office 2013, and installing off a CD with 64bit Office 2013, both had exactly the same error.
    The reason I'm wondering if it's a high-DPI display related error is that googling about vbe7.dll errors, I came across this hotfix:
    http://support.microsoft.com/kb/2880496/en-us
    which claims it "Fixes various Visual Basic for Applications (VBA) issues with displays on high-DPI devices."
    Neither the 32bit or 64bit installer for that hotfix would run, they said there was no affected programs installed.
    My reasoning for suspecting a hardware/DLL incompatibility is this:
    1) It's not the template or the VBA code, since those work elsewhere and the same behavior happens with any file with a userform
    2) It's not the Office version, since both 32/64 bit, MSI and Click-to-run didn't work
    3) It's not Windows 8.1, since this same template works fine on other machines
    4) The first time I open the template on the affected machines, it works fine - but the template is shipped compacted and decompiled. After I open it once and then close, Word has compiled the code and corrupted it somehow, because whatever the first userform
    was in the list shows up as blank.
    5) It feels hardware-specific, since out of hundreds of machines, I've only seen this behavior on two of the same laptop model - seems like too much of a coincidence.
    Is there any chance the VBE in Office 2013 is somehow incompatible with this hardware? If that might be the case, does anyone have any idea how I'd go about testing and/or fixing it?
    Any thoughts are much appreciated.

    Hi Chris,
    Try the following.
    Download the IDT Audio installer on the link below and save it to your Downloads folder.
    http://ftp.hp.com/pub/softpaq/sp59501-60000/sp59861.exe
    When done, open windows Control Panel, open Device Manager and open up Sound, Video and Game Controllers.  If you see an entry for IDT HD Audio ( or very similar IDT entry ), right click the device and select Uninstall - you should also get a prompt to remove the current driver, tick the box to allow this and then proceed with the uninstall.  If there was no IDT entry, just proceed below.
    When complete, shut down the notebook, unplug the AC Adapter and then remove the battery.  Hold down the Power button for 30 seconds.  Re-insert the battery and plug in the AC Adapter.
    Tap away at the esc key as you start the notebook to launch the Start-up Menu and then select f10 to enter the bios menu.  Press f5 to load the defaults ( this is sometimes f9, but the menu at the bottom will show the correct key ), use the arrow keys to select 'Yes' and hit enter.  Press f10 to save the setting and again use the arrow keys to select 'Yes' and hit enter.
    Let Windows fully load - it will automatically load an audio driver, but just let this complete.  Then open your Downloads folder, right click on the IDT installer and select 'Run as Administrator' to start the installation.  When this has completed, right click the speaker icon in the Taskbar and select Playback Devices.  Left click 'Speakers and Headphones' once to highlight it and then click the Set Default button - check if you now have audio.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Word 2013 VBA Complie error in hidden module: frmabout

    Cannot seem to find a resolution to this problem.
    Happening on one system and weirdly only one user profile.
    Each time the user of profile one opens or closes MS Word 2013 they receive a dialog box indicating the following.
    VBA : COMPILE ERROR IN HIDDEN MODULE: FRMABOUT
    THIS ERROR COMMONLY OCCURS WHE CODE IS INCOMPATIBLE WITH THE VERSION, PLATFORM, OR ARCHITURE OF THIS APPLICATION. CLICK "HELP" FOR INFORMATION ON HOW TO CORRECT THIS ERROR.
    On the same system user, profile two opens and closes MS Word 2013 without any error. 
    Word 2013 seem usable even with the error it's just annoying to the end user.
    System is not connecting to a domain or external server.
    Any assistance is appreciated.
    Art

    Hi,
    For the error message, the FRMABOUT macro code in that template is not compatible with any recent version of Word. We may try to find the template and rename it.
    The template is typically named FRMABOUT.dotm, although the number may be different depending on which version of the wizard you installed.
    There are three possible locations to find the template:
    %appdata%\Microsoft\Word\STARTUP
    C:\Program Files\Microsoft Office\Office15\STARTUP
    C:\Program Files (x86)\Microsoft Office\Office15\STARTUP
    For the first one, paste the path into the address bar of the file explorer and press Enter, so the %appdata% part gets expanded to the proper place in your user profile.
    The last of the locations will exist only if you're running 32-bit Office on 64-bit Windows.
    Look in each place and rename the file wherever you find it. Then restart Word.
    More reference:
    http://support.microsoft.com/kb/921541/en-us
    Regards,
    George Zhao
    TechNet Community Support

  • Add code behind functionality that run when the user view the SP 2013 content pages

    I need to add code behind functionality that run when the user view the SP 2013 content pages, What is the best approach to do that?
    is it add Delegate Control to master page?
    is it add code behind to master page?
    is there an event reviver for that?
    Your answer will be highly appreciated

    Hi,
    According to me, for code behind stuff
    Create master page(using module etc..), have the required placeholders in it.
    Then, create a page that inherit from this master page, now you can use that placeholder in you page.
    Lastly, place web parts in that placeholder. So, code behind will come with that master page .
    Hope it helps.
    Thanks
    -Rahul

  • Access 2000 with VBA code doesn't work in Access 2013

    I have a database that was created in Access 2000 with lots of VBA code to pull data from SQL for reports. When I try to run a report in 2013, I get 'file not found".  When I go into debug, it appears the forms for the reports are not being found. 
    How can I fix this?

    Good Morning MariS2,
    Did you verify the change in the connection type?
    Did you check all your references which are changed for the new version of Access?
    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

  • Bookmarks are not automatically creating based on Word 2013 Table of Contents.

    Bookmarks are not automatically creating based on Word 2013 Table of Contents.  In older version of Word, the Style built Table of Contents converted into Bookmarks when PDFing.

    I figured it out.  There is a new checkbox you must turn on in Word 2013 when export to PDF that allows it to convert items to Bookmarks when PDFing.

  • Word 2010 - Extra Space Around Checkbox Content Controls - only on some computers

    I am experiencing a problem with Word 2010 adding extra above/below spacing on content control checkboxes, but only on some of our computers. We have a template we use that is the same file for our network. On some of the computers in our office however,
    we get extra spacing what can not be removed.  
    I am at a lose to fix this and have been trying for about 3 weeks. The settings are the same on all the computers. The user can switch to another computer and the form will open correctly, but if they move back to their workstation and try to reopen it there
    the double spacing returns - again only for the checkbox content controls. 
    Attached are two images - Correct formatting, and then what happens on some of the computers. Any assistance would be greatly appreciated. 
    Can't post links due to account not verified
    Correct Formating Image - https://drive.google.com/file/d/0BzORWKV0f6tjWjdaTGxTd0tWeUk/view?usp=sharing
    Extra Space Added on Some Comptuers Image - https://drive.google.com/file/d/0BzORWKV0f6tjOU8wYXp0d1ZZVDA/view?usp=sharing

    Some issues worth noting:
    1. Word uses information returned by the active printer driver to manage a document's layout. This can result in line spacing, text-wrapping, and so on varying from one PC to the next - or even on the same PC when switching to a printer that uses a different
    driver.
    2. Differences in font versions (or the use of a font that is available on one PC and not another) can result in line spacing, text-wrapping, and so on varying from one PC to the next.
    3. Differences in Word version (or even update state) may result in line spacing, text-wrapping, and so on varying from one PC to the next.
    4. Your document that displays the extra spacing has Word's formatting display switched on - even that can change the appearance if the document contains hidden content.
    5. Various Word options can also affect line spacing, text-wrapping, and so on. These include having Word configured to 'optimize character positioning for layout rather than readability', 'scale content for A4 or 8.5x11" paper sizes' and, perhaps,
    the use of draft print quality.
    Obviously, there are multiple possibilities to work through, ensuring all PCs & printer configurations are the same. That said, your use of tables allows you the option of setting the row heights to 'exact' measurements, so they won't expand as they
    evidently now can. You can also try setting the paragraph line spacings and before/after spacings to precise numbers of points, for example, so they don't auto-adjust.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • Change propertise of Picture Content Control in microsoft office Word 2010

    Hi
    I have a Picture Content Control in my document. When I right click on object and select size and position, on the size tab we have two option: Absolute and Relative.
    How i can change absolute to Relative... The relative option is always grayed.
    I want to when i add picture to my picture content control object, it's resize fit with my image size.
    Please help me as soon as possible.
    Thanks

    Hi,
    Based on my research, the Relative Size settings only pertain to 'Drawing
    Objects' (AutoShapes). It does not apply to photographs, Clip Art or other images unless they are Grouped with a Shape. See:
    http://answers.microsoft.com/en-us/office/forum/office_2010-word/set-relative-size-of-an-image/a22b83c5-d098-4c8c-a68e-f6c92a2ef5eb
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Word 2010 Copy Rich Text Content Control

    I am working on a Word 2010 template that links to another word document to copy information from Rich Text Content Controls.  I am able to copy values between RTF controls but losing the rich text formatting - only text is copied over.
    Any Suggestions on how to copy between rich text controls and still preserve the formatting?
      Set sourceCCs = sourceDoc.SelectContentControlsByTag(sourceCCTag)
        If Not (IsNull(sourceCCs)) Then
            For Each sourceCC In sourceCCs
                Set editCCs = editDoc.SelectContentControlsByTag(editCCTag)
                If Not (IsNull(editCCs)) Then
                    For Each editCC In editCCs
                        If appendText Then
                            'editCC.Range.Text = editCC.Range.Text & vbCrLf & sourceCC.Range.Text
                            editCC.Range = editCC.Range & vbCrLf & sourceCC.Range
                        Else
                            'editCC.Range.Text = sourceCC.Range.Text
                            editCC.Range = sourceCC.Range
                        End If
                    Next
                End If
            Next
        End If
    Thanks in advance

    Try something along the lines of:
      Set sourceCCs = sourceDoc.SelectContentControlsByTag(sourceCCTag)
      If Not (IsNull(sourceCCs)) Then
        For Each sourceCC In sourceCCs
          Set editCCs = editDoc.SelectContentControlsByTag(editCCTag)
          If Not (IsNull(editCCs)) Then
            For Each editCC In editCCs
              With editCC.Range
                If appendText Then
                  .InsertAfter vbCr
                  .Collapse wdCollapseEnd
                End If
                .FormattedText = sourceCC.Range.FormattedText
              End With
            Next
          End If
        Next
      End If
    Cheers
    Paul Edstein
    [MS MVP - Word]

Maybe you are looking for

  • PowerPoint file won't open under one user account, but does under another account

    Hello, I have a 10.9.5 macbook pro here that will not open a Powerpoint file under one user account. It is up-to-date with Software updates and Office 2008 is up-to-date as well. When I try to open the PowerPoint file, I get the message, "PowerPoint

  • VAT code

    Hi, for evry documents posted with this Account : "XXXXXX" i want to have specific code of VAT like : "Y1". so i want to force users to choose this VAT code when they post documents with "XXXXXX" (it is treasury account). please advise good points fo

  • Compress after searching in finder

    I went into finder and did a 'search' for PDF documents, I selected several of them and then did a right click but there was no Compress option in the drop down menu. Compress appears for selected files if I am not acting on a search list in Finder,

  • Installed win 7 on macbook pro, but want mac OS on it

    A friend got a macbook pro with win 7 not dual just single win os installed on it, we want to install a mac os on it so we got a mac os x tiger ver 10.4 and the mac does not recognize the installation disc, then we managed to get a copy of mac os x 1

  • Mac Computer shuts down when rendering or exporting

    I have an early 2013 Macbook pro and i am working on my first project in Premeire Pro CC. My computer turns off (like if it was a plugged in device and power would go out) every time I try to render my timeline or export my finished project. any idea