Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Insert text from object into email using macro

Hey all,

I have a macro set up that saves objects in my application as images and then sends them in an email. At the bottom of the email I'd like to have a table that shows an object in my app as text, not as an image. I've attached an image of the object that I want formatted as a text table as well as a doc with the module script I have so far.

The reason I need it as text is because the audience may want to copy/paste the URLs in the table into their browser, and that's not possible when attached as an image obviously. Can anyone help? BTW I have no experience with HTML, I just pieced together some code and applied it to my own app to get what I have currently, so please be patient with me

2 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

This might help you out:

SUB ExcelFile

...

  SET val = ActiveDocument.Fields("To").GetPossibleValues()

  vTO = ""

  FOR i = 0 to val.Count-1

  vTO = vTO & ", " & val.Item(i).Text

  NEXT

...

END SUB


FUNCTION send_report (vTO, vCC, reportFile, vName)

...

objEmail.To = vTO

objEmail.TextBody = ""

....

END FUNCTION

You could pass variable Page into objEmail.TextBody. Like an example of variable vTO.

Anonymous
Not applicable
Author

Sorry, I don't quite follow what your script does. I guess I should've mentioned that I don't have any experience in VB either. Does this code go inside my Sub ExportEmail or outside of it? In which part of your script should I insert the object code, for example CH16?