View Single Post
 
Old 05-31-2019, 06:55 AM
alecambo alecambo is offline Windows 10 Office 2019
Novice
 
Join Date: Apr 2019
Posts: 5
alecambo is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
It writes ABC and 123 because Greg hard coded that into the template code rather than the strName and strNum from the userform, no doubt while testing if his code worked to populate the controls in the loop (the incrementing date being the important bit of the code), and then forgot to replace the fixed texts with the string variables. It's easily done.

Code:
      .ContentControls(1).Range.Text = "ABC"
      .ContentControls(2).Range.Text = "123"
The date format is set in the date content control properties, but once changed the autotext entry also has to be updated as that contains a copy of the template body with the three content controls.

See attached
Thanks gmayor.
I forgot to add that between the store name and date I need to have a day of the week for staff (i.e. "Tuesday")

I would assume that this would be inserted as an aforementioned input - ".ContentControlsi.ContentControls(1).Range.Te xt = sDayName", but it doesn't seem to work. Is there something I'm missing here?

Thanks again for your help
Reply With Quote