Form-DocVariable-Building Block Quagmire

%3CLINGO-SUB%20id%3D%22lingo-sub-1422177%22%20slang%3D%22en-US%22%3EForm-DocVariable-Building%20Block%20Quagmire%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1422177%22%20slang%3D%22en-US%22%3E%3CP%3EI%20think%20this%20one%20is%20low-hanging%20fruit%2C%20but%20my%20brain%20has%20gone%20full%20circle%2C%20multiple%20times%20and%20I%20know%20the%20solution%20is%20easy%2C%20but%20it%20is%20elusive.%20Here's%20the%20setup%3A%3C%2FP%3E%3CP%3EI%20have%20a%20Userform%20that%20collects%20information%20thatn%20is%20passed%20onto%20a%20document%20via%20DocVariables.%20So%2C%20person%20fills%20it%20out%20and%20a%20template%20is%20filled%20in%20that%20can%20be%20copy%2Fpasted%20into%20an%20email%2C%20ORI%20put%20a%20button%20in%20the%20file%20that%20would%20copy%2Fpaste%20the%20email%20(as%20a%20section)%20into%20a%20newly%20created%20Outlook%20Mail%20object%2C%20which%20would%20make%20the%20faciilitator's%20job%20that%20much%20easier%2C%20by%20literally%20putting%20one%20click%20away%20from%20generating%20an%20email%20and%20sending%20it%20from%20Outlook%20in%20a%20perfectly%20and%20wonderfully%20controlled%20environment.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEverything%20works%20swimmingly%20-%20I%20have%20the%20content%20copying%20over%20wonderfully%20into%20the%20body%2C%20set%20some%20static%20%22Subject%22%20Text%2C%20etc.%20But%2C%20when%20trying%20to%20pass%20the%20.To%20variable%2C%20I%20get%20locked%20up%20by%20the%20DocVariable%20Field%20codes%20sneaking%20into%20the%20To%3A%20field.%20Here's%20what%20happens.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20get%20the%20variable%20in%20from%20the%20UserForm%20as%20%22ParticipantEmail%22%3C%2FP%3E%3CP%3EVariable%20ParticipantEmail%20is%20stored%20in%20a%20Building%20Block%20called%20%22DCVPartEmail%22%3C%2FP%3E%3CP%3EI%20use%20the%20BuildingBlock%20to%20pass%20the%20Variable%20to%20the%20.To%20field%20in%20Outmail%20as%20DCVPartEmailBB.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20then%2C%20in%20the%20%22To%3A%22%20line%20in%20the%20outlook%20email%2C%20I%20get%20EVERYTHING%20from%20the%20DocVariable%20-%20*%7B%20DocVariable%20ParticipantEmail%20%5C*MergeFormat%7D%20*%3CTHEINPUTEMAILADDRESS%3E*%3C%2FTHEINPUTEMAILADDRESS%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EObviously%2C%20I%20only%20want%20the%20%22TheInputEmailAddress%40email.com%22%20to%20show%20up%20in%20the%20To%3A%20Field.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat's%20all%20I%20want%20to%20happen%20-%20I%20don't%20even%20need%20the%20Particpant%20Email%20to%20show%20up%20in%20the%20actual%20Word%20Doc%2C%20although%20I%20can%20hide%20it%20to%20pass%20it%2C%20if%20needed.%20But%20all%20I%20want%20is%20for%20the%20Participant%20email%20to%20go%20from%20the%20UserForm%20to%20the%20To%3A%20field%20in%20an%20OutMail%20creation%2C%20as%20just%20the%20email.%20No%20extras!%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheck%20out%20Module%203%20and%20page%2010%20for%20more%20context%3C%2FP%3E%3CP%3EThanks%20in%20advance!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1422177%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EVba%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWord%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

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!

0 Replies