Have you considered two different methods:
One convert the data into a Table which then deals with additional rows and columns
Two use CurrentRegion which selects all the cells and you should then add the named range
Range("A1").CurrrentRegion.Select
I have resolved this by adding an extra textbox for the Position and once the person has selected from the position list it adds the title into the textbox and I have then successfully included this into the email.
Thank you for the reply, no I am preparing an access form for people to fill in like writing an email that uses a query to send individual emails to them. The form has the usual textboxes and named:
txtSubject
MainText
Sender
These work fine so the email displays the content
I am adding a...
Hi everyone,
I have been looking to create a form to email a query list, this works well but I have been asked to add an extra feature. A frame with option buttons providing from a list of 5 options and the sender wants to be able to select which one to be included. The list is positions...
Sorted the issue. Thank you I wouldn't have got near a solution without your help.
Line adjusted to
.HTMLBody = "<font face=""Tahoma"" size=14 color=""blue"">" & Forms!frmMail!MainText.Value & "</font>"
Just tried implementing and it highlights the textbox name in the square brackets, if you don't mind I am indicating the code below and showing a screen shot of the form and error message it highlights. Would you be kind enough to take a look and make any suggestions?
Sub SendMessages()
'Set...
Thank you for this, when I developed I used the form name and text box name so it was something along the lines of
Forms!frmMail!MainText
I will look to change the code and test it. I will reply
Hi thanks for the reply,
The whole form is unbound textboxes when emailed it picks up the contents from a query, I haven't found the property to change to rich text format. When I have tried various options the format doesn't appear in the email.
Hi everyone,
I have written code to email contents from a form to Outlook but I am having difficulty in formatting the body of the email for line of code which picks the contents up from a textbox. Like an item that has to be highlighted. Textbox content in the email should be emailed...
You can look to delete the named range before you recreate it, incase it is causing conflict. I would suggest record a macro to find the named range and delete it then create the new named range accordingly and you have the code.
You could look to convert the form button macro to VBA and then you can add the code to apply the filter no problem. Do you look to open the excel workbook when you run the macro?