Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-03-2017, 06:13 AM
strodden strodden is offline Auto Duplicating Text in Doc Windows 10 Auto Duplicating Text in Doc Office 2010 32bit
Novice
Auto Duplicating Text in Doc
 
Join Date: Aug 2017
Posts: 22
strodden is on a distinguished road
Default Auto Duplicating Text in Doc

Hi all,
I've been tweaking this doc for over a month now, so I know there's another version somewhere on the forum - feel free to combine with that story if necessary.

I'm trying to cause the name listed under the "Sales Representative" dropdown at the top to auto populate again at the bottom of the first sheet above "Area Sales Manager".

I think this should be done with cross references to a text style (as I've already done with my "Quotation Number" but I can't make it work with my drop down.

I'm still learning so bullet-pointed instructions would be very helpful! Thanks in advance.

Seth
Attached Files
File Type: docm Proposal Sheet Test Version.docm (113.8 KB, 12 views)
Reply With Quote
  #2  
Old 11-03-2017, 06:43 AM
gmayor's Avatar
gmayor gmayor is offline Auto Duplicating Text in Doc Windows 10 Auto Duplicating Text in Doc Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,103
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

It is not clear where you want the name duplicated, but the obvious solution is to use a cross reference to the control. The simplest way to do that is to download the second add-in from http://www.gmayor.com/BookmarkandVariableEditor.htm which facilitates the mapping of content controls to perform simple tasks like this. Then create a cross reference to the control in question and whatever you select in either will be reflected in the other.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 11-03-2017, 07:48 AM
strodden strodden is offline Auto Duplicating Text in Doc Windows 10 Auto Duplicating Text in Doc Office 2010 32bit
Novice
Auto Duplicating Text in Doc
 
Join Date: Aug 2017
Posts: 22
strodden is on a distinguished road
Default

Hi - thanks for the reply. Are you referring to something available from the attached website's "Downloads" page? I get over 500 references to Add-Ins on the "What's New" page.

Seth
Reply With Quote
  #4  
Old 11-03-2017, 08:31 AM
FionaMcKenzie FionaMcKenzie is offline Auto Duplicating Text in Doc Windows 10 Auto Duplicating Text in Doc Office 2016
Novice
 
Join Date: Oct 2017
Location: Surrey, United Kingdom
Posts: 14
FionaMcKenzie is on a distinguished road
Default

Hi there,

Name the Content Control you want populated with the same text, i.e. set the Title Property.

Then this should work, e.g. Using SalesRep as the Title Property

Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim i As Long
Dim oC As ContentControl
With ContentControl
If .Title = "Client" Then
For i = 1 To .DropdownListEntries.Count
If .DropdownListEntries(i).Text = .Range.Text Then
ActiveDocument.SelectContentControlsByTitle("Phone ")(1).Range.Text = Split(.DropdownListEntries(i).Value, "|")(0)
ActiveDocument.SelectContentControlsByTitle("Fax") (1).Range.Text = Split(.DropdownListEntries(i).Value, "|")(1)
ActiveDocument.SelectContentControlsByTitle("Email ")(1).Range.Text = Split(.DropdownListEntries(i).Value, "|")(2)

For Each oC In ActiveDocument.ContentControls
If oC.Title = "SalesRep" Then
oC.Range.Text = .Range.Text
Exit For
End If
Set oC = Nothing
Next oC
Exit For
End If
Next
End If
End With
Set oC = Nothing
End Sub
Reply With Quote
  #5  
Old 11-03-2017, 11:10 PM
gmayor's Avatar
gmayor gmayor is offline Auto Duplicating Text in Doc Windows 10 Auto Duplicating Text in Doc Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,103
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Quote:
Originally Posted by strodden View Post
Hi - thanks for the reply. Are you referring to something available from the attached website's "Downloads" page? I get over 500 references to Add-Ins on the "What's New" page.
Seth
Did you click the link in the earlier reply? The download link is near the bottom of the page.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Showing and hiding sections, duplicating text, etc. Networkrail Word 1 07-11-2017 02:14 PM
Figures keep duplicating telonghemu Word 2 10-19-2016 04:47 PM
Auto Duplicating Text in Doc Auto Text cschuett Word 4 10-25-2015 06:42 AM
Outlook is Duplicating PST Files DenverITGuy Outlook 0 06-12-2013 06:54 AM
Auto Text PineJ Office 1 03-21-2012 12:43 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:53 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