Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-03-2016, 02:59 AM
highrise955 highrise955 is offline Newbie Question - Need direction on how to proceed Windows 10 Newbie Question - Need direction on how to proceed Office 2013
Advanced Beginner
Newbie Question - Need direction on how to proceed
 
Join Date: Mar 2016
Posts: 37
highrise955 is on a distinguished road
Default

OK, after searching the forum again I think I may have answered the question myself. This code supplied by macropod seems to do the trick...

Quote:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim i As Long, StrDetails As String
With ContentControl
If .Title = "Name" Then
For i = 1 To .DropdownListEntries.Count
If .DropdownListEntries(i).Text = .Range.Text Then
StrDetails = Replace(.DropdownListEntries(i).Value, "|", Chr(11))
Exit For
End If
Next
ActiveDocument.SelectContentControlsByTitle("Title ").Item(1).Range.Text = StrDetails
End If
End With
End Sub
Thanks macropod!!!

To finish this off can someone point me in the right direction to have the Name field auto-populate upon opening the document? I think this is a "built-in variable" but I don't know how to access it and populate it in the Name field. Also, by auto-populating the Name field can I also auto-populate the Title and if so, how?
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie question on Word 2010 sunalta Word 7 09-06-2012 12:49 PM
Newbie Question - Need direction on how to proceed Newbie Question thistlebarrow PowerPoint 4 04-06-2012 01:46 PM
Newbie Question - Need direction on how to proceed newbie question DanSandbergUCONN Word 5 03-06-2011 04:27 PM
Newbie Question - Need direction on how to proceed Newbie to Powerpoint question Phil66 PowerPoint 9 06-01-2010 10:51 AM
Perhaps a newbie question I know but as1947 Excel 0 02-05-2009 08:01 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:56 AM.


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