I have a MS Access 2013 memo field that I use to hold text versions of
email. Here is an example:
From: Simon Smith
To: Bob Brown
Date: 5/4/15 2:30PM
Subject: Draft Report
Please find attached the draft report as discussed.
I want to extract the data (i.e. "Draft Report") from the email field "Subject:" from a memo field to a text field on an MS Access form.
Can anyone help?
Thankyou GM
Ok. I have figured it out using Instr and Mid. Thankyou for your suggestion Gord. I'm sure there is better way to do it but it works!
Dim strStart As String
Dim strEnd As String
' figure out where the string starts
strStart = InStr(Me.EmailMemo, "Subject:") + 9
' figure out where the line ends by looking for a carriage return
strEnd = InStr(strStart, Me.EmailMemo, Chr(10))
' display the string
Me.EmailTitle = Mid(Me.EmailMemo, strStart, strEnd - strStart)
Related
In Code by Zapier how to append a field to a constant URL? I need the whole code block to insert since I don't know even how to make it output. In the form field above where the code is entered I entered an address. This is so the address can be found in google maps. Ideally I hope to send the street view image to email rather than having to click the link in email. Below is one variation of what I've tried. Thank you
let address = inputData.address;
var mylink = "https://www.google.com.au/maps/place/" + address;
output = mylink;
Your posted code will work, except for returning a string instead of an object type. Try this:
const address = inputData.address;
const mylink = "https://www.google.com.au/maps/place/" + address;
return { result: mylink }
If that doesn't work, please update your question with info about what's not working.
I want the Information Message to show two lines of text.
Can this be done using one message class statement. Ex.
MESSAGE i001(z56_myclass) WITH lv_cust_id.
I tried putting the string of the short text with characters \n # \r \\n etc. but nothing worked. I don't know how to use long text editor for this particular requirement. Any help would be great.
You can't control the message carriage return in MESSAGE statement.
You can try instead with the following information popup
call function 'POPUP_TO_INFORM'
exporting
titel = 'Information'
txt1 = 'Registration successful'
txt2 = 'Customer Id is 0000001234'.
You have 4 text rows at your disposal (from txt1 to txt4).
I am looking for help to teach me how to create message box base on this
value:
=IF(F2<=TODAY(), "EXPIRED", IF(AND(F2-TODAY()>0, F2-TODAY()>=10), "ACTIVE", "REMINDER"))
I wish the message box will appear once I open the excel file which all under 'Reminder" only with a number. The message box will be such as "32 Reminder found in XLMembership" base on counting result.
Since no one interesting to answer my question then I answer it myself and sharing to user who looking an answer on same question..
Private Sub Workbook_Open()
Dim Ret_type As Integer
Dim strMsg As String
Dim strTitle As String
Dim iReminders As Long
iReminders = WorksheetFunction.CountIf(Columns("B"), "REMINDER")
MsgBox Format(iReminders, "#,##0") & " REMINDER found in XLMembership", vbInformation + vbOK
End Sub
In my Jenkins step I have windows batch command which runs a java jar file (java -Dfile.encoding=UTF-8 -jar C:\Test1\Test.jar C:\Test\test.log) and output of which is a String value (verified Jenkins console the string is getting printed) . How will I use this string content and insert in the editable email content body so I can send this content as an email . I wouldn't want the whole Jenkins console in the email only this String. I would assume the string has to be set as an environment variable after the script runs . Not sure how exactly I can use EnvInjPlugin for my scenario if at all it can be.
Try to use pre-send script.
For example You have in log the string like: "this random integer should be in email content: 3432805"
and want to add randomly generated integer to email content.
Set the Default Content with whatever you want but add some
value which will be replaced. For example:
This is the random int from build.log: TO_REPLACE
Then click "Advanced Settings" and add Pre-send Script:
String addThisStringToContent = "";
build.getLog(1000).each() { line ->
java.util.regex.Pattern p = java.util.regex.Pattern.compile("random\\sinteger.+\\:\\s(\\d+)");
java.util.regex.Matcher m = p.matcher(line);
if (m.find()) {
addThisStringToContent = m.group(1);
}
}
if (addThisStringToContent == "") {
logger.println("Proper string not found. Email content has not been updated.");
} else {
String contentToSet = ((javax.mail.Multipart)msg.getContent()).getBodyPart(0).getContent().toString().replace("TO_REPLACE", addThisStringToContent);
msg.setContent(contentToSet, "text/plain");
}
where:
build.getLog(1000) - retrieves the last 1000 lines of build output.
Pattern.compile("random\\sinteger.+\\:\\s(\\d+)") - regex to find the proper string
"text/plain" - Content Type
String contentToSet = ((javax.mail.Multipart)msg.getContent()).getBodyPart(0).getContent().toString().replace("TO_REPLACE", addThisStringToContent); - replaces the string TO_REPLACE with your value
Hope it will help you.
Unfortunately I have not enough reputation to comment Alex' great answer, so I write a new answer. The call
msg.setContent(contentToSet, "text/plain")
has two disadvantages:
Special characters are garbled
An attachment gets lost
So I use the following call to set the modified text
((javax.mail.Multipart)msg.getContent()).getBodyPart(0).setContent(contentToSet, "text/plain;charset=UTF-8")
So, I want to make it so that, when the user pastes something into a textbox, once it pastes the first 24 characters into that textbox, it will send the rest to a richtextbox.
I've tried splitting, joining, with no luck. I don't know what else I can do. Any ideas?
I've tried:
If TextBox1.Text > TextBox1.MaxLength Then
RichTextBox4.Text = TextBox1.Text
End If
And some other weird things that didn't work out. I would appreciate some help.
Thank you.
use Substring....
Dim input = textbox1.text
Dim substring As String = input .Substring(0, 24)
richtextbox4.text = substring
http://www.dotnetperls.com/substring-vbnet