Outlook Subject - missing info from var Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
Portwolf
Posts: 161
Joined: 08 Oct 2018, 12:57

Outlook Subject - missing info from var

13 Jul 2019, 00:19

Hello all,

I am using a tool to automate an email.
This takes several info from a GUI and puts it on the email subject.
The contents of the variables are somewhat huge, but the customer wants it on the email subject... :facepalm:
So, on the email subject i have to put:

Code: Select all

Subject = [Customer] INCIDENCE WARNING <%Time_And_Date%%Occurence_Ammount%> Hardware OK <%Occurence_Device%><%Occurence_Description%>
This is the issue here:
Customer = 6 characters
Time and date = 2019/01/01
Occurence ammout = from 1 to 3 characters
Device = from 10 to 30 characters
Description = might have 200+ characters

So, the email subject might be HUGE.
And no, there is no convincing them that using email body to have text is better, because, well, reasons... :facepalm: :facepalm:

I have two email subjects going on.
One of them has the same format, but it works perfectly, as it is WAY shorter.

This one is HUGE so it just cut's off at 50 characters give or take.


I know for a fact that if i copy-paste the whole thing manually it works and the subject is OK.
I also know for a fact that if i copy-paste a whole text string (loret ipsum) on the email subject var it fills it perfectly:

Code: Select all

subject = Loret ipsum bla bla bla
but

Code: Select all

Subject = [Customer] INCIDENCE WARNING <%Time_And_Date%%Occurence_Ammount%> Hardware OK <%Occurence_Device%><%Occurence_Description%>
doesn't work..
I also tried:

Code: Select all

Subject := "[Customer] INCIDENCE WARNING <" . Time_And_Date . Occurence_Ammount . "> Hardware OK <" . Occurence_Device . "><" . Occurence_Description . ">"
Both of the above break off at little over 70 characters..
I also know for a fact that the email subject limit is 457 characters, but it's far from reaching it.

Oh, and if i put:

Code: Select all

Msgbox, %subject%
It's all there!
Ideas?
Portwolf
Posts: 161
Joined: 08 Oct 2018, 12:57

Re: Outlook Subject - missing info from var  Topic is solved

13 Jul 2019, 22:13

Fixed it:

Code: Select all

StringReplace,Subject,Subject,`n,,A
StringReplace,Subject,Subject,`r,,A
Remove the line breaks from the var, i have no idea on how they are there in the first place, but, it is solved..

Return to “Ask For Help”

Who is online

Users browsing this forum: ark, piddly and 38 guests