Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-24-2017, 07:29 PM
macropod's Avatar
macropod macropod is offline Adding document fields to subject line of email Windows 7 64bit Adding document fields to subject line of email Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
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

Your code implies the use of a userform. In that case, simply reference the names of the various textboxes, etc. holding the relevant values. For example, instead of:
.Subject = "SUBJECT LINE"
you might have:
.Subject = Me.TextBox1.Value

However, I note you also refer to content controls. If the Subject is in one of them, you might apply the 'Subject' title to the content control and use:
Code:
.Subject = ActiveDocument.SelectContentControlsByTitle("Subject")(1).Range.Text
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Including Text Form Field info in the subject line of an email Gadget Word 0 09-08-2016 10:55 AM
Adding document fields to subject line of email Outlook - Add text to subject line when sending a reply email rparker85 Outlook 3 12-12-2011 10:26 AM
Batch adding text to email subject lines in Outlook paulkaye Outlook 0 12-05-2011 06:38 AM
Adding fields to a calendar event beyond subject and location willauqs Outlook 0 07-08-2011 01:10 PM
Adding document fields to subject line of email getting additional characters in email subject line namishtiwari Outlook 1 04-21-2009 11:21 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:34 PM.


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