Thema Datum  Von Nutzer Rating
Antwort
Rot Using a string_function in a WITH clause?
20.04.2016 12:27:08 Officer_Bierschnitt
Solved

Ansicht des Beitrags:
Von:
Officer_Bierschnitt
Datum:
20.04.2016 12:27:08
Views:
781
Rating: Antwort:
 Nein
Thema:
Using a string_function in a WITH clause?

Hi,

 

I have a macro to catch an email that is sent daily from our reporting_system.

The way it works is like this: In the open workbook, I write the title of the email (the subject) which is always the same and then there is a big WITH_clause parsing the Inbox (the specific subfolder where these emails are), first looking only for the emails from the present day (there would be far too many otherwise) and then looking for the name like >> IF .Subject = emailTitle then << (>> emailTitle << being a variable)

 

<=> The point is, there was an upgrade to that reporting_system and now the subject of the emails consists of the name and then (separated with a BLANK) the date-time-stamp when the report was run.

How can I best search only the first part of the subject now? Can I go like >> IF LEFT(.Subject), 20 = emailTitle then <<? And can I also combine that with a second query that there must be something following that (the timestamp must be there) - can I use an >> INDEX(":"; .Subject; 21) << for that and an AND clause to combine the two?

Thanks a lot!

Best regards,

 

Officer_Bierschnitt


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:

 
 

  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
Rot Using a string_function in a WITH clause?
20.04.2016 12:27:08 Officer_Bierschnitt
Solved