Forum Discussion

bneater's avatar
bneater
Copper Contributor
May 27, 2020

Form-DocVariable-Building Block Quagmire

I think this one is low-hanging fruit, but my brain has gone full circle, multiple times and I know the solution is easy, but it is elusive. Here's the setup:

I have a Userform that collects information thatn is passed onto a document via DocVariables. So, person fills it out and a template is filled in that can be copy/pasted into an email, ORI put a button in the file that would copy/paste the email (as a section) into a newly created Outlook Mail object, which would make the faciilitator's job that much easier, by literally putting one click away from generating an email and sending it from Outlook in a perfectly and wonderfully controlled environment. 

 

Everything works swimmingly - I have the content copying over wonderfully into the body, set some static "Subject" Text, etc. But, when trying to pass the .To variable, I get locked up by the DocVariable Field codes sneaking into the To: field. Here's what happens. 

I get the variable in from the UserForm as "ParticipantEmail"

Variable ParticipantEmail is stored in a Building Block called "DCVPartEmail"

I use the BuildingBlock to pass the Variable to the .To field in Outmail as DCVPartEmailBB.

 

But then, in the "To:" line in the outlook email, I get EVERYTHING from the DocVariable - *{ DocVariable ParticipantEmail \*MergeFormat} *<TheInputEmailAddress@Email.com>*

 

Obviously, I only want the "TheInputEmailAddress@email.com" to show up in the To: Field. 

 

That's all I want to happen - I don't even need the Particpant Email to show up in the actual Word Doc, although I can hide it to pass it, if needed. But all I want is for the Participant email to go from the UserForm to the To: field in an OutMail creation, as just the email. No extras! 

 

Check out Module 3 and page 10 for more context

Thanks in advance!

No RepliesBe the first to reply

Share

Resources