Text aus Outlook kopieren?

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Text aus Outlook kopieren?

Re: Text aus Outlook kopieren?

Post by Ahk_fan » 19 Oct 2019, 06:43

:crazy: @KHA das Kopieren ist der Feind des Denkens!
Hab schnell ne einen Bereich aus meinem Prog kopiert, umgeschrieben und zack! Fehler!
so ist es richtig:

Code: Select all

ComObjError(false)   ;disable COM error messages for some non available properties
m := ComObjActive("Outlook.Application")
try
		olItem := m.ActiveWindow.CurrentItem
	catch
		olItem := m.ActiveExplorer.Selection.Item(1)
	if (olItem.Class = 43)
		olMailItem := olItem
	else
	{
		MsgBox Es wurde keine Email gewählt
		return
	}
	MyTextBetreffAlt := olMailItem.Subject
	MyTextBodyAltHTML := olMailItem.HTMLBody
	MyTextBodyAlt := olMailItem.Body
	msgbox, HTML: `n%MyTextBodyAltHTML% 
	msgbox, Plantext: `n%MyTextBodyAlt% 
return

Re: Text aus Outlook kopieren?

Post by KHA » 18 Oct 2019, 11:17

@ahk_fan beim start bekomme ich ein Fehlermeldung: da ist ein Leerzeichen zu viel
msgbox, HTML: `n%MyTextBodyAltHTML%

Re: Text aus Outlook kopieren?

Post by Kobaltauge » 18 Oct 2019, 11:06

Über Com anstatt controls. Nice. Gute Idee.

Re: Text aus Outlook kopieren?

Post by Ahk_fan » 18 Oct 2019, 05:25

noch ne möglichkeit
- Email vorher öffnen

Code: Select all

ComObjError(false)   ;disable COM error messages for some non available properties
m := ComObjActive("Outlook.Application")
try
		olItem := m.ActiveWindow.CurrentItem
	catch
		olItem := m.ActiveExplorer.Selection.Item(1)
	if (olItem.Class = 43)
		olMailItem := olItem
	else
	{
		MsgBox Es wurde keine Email gewählt
		return
	}
	MyTextBetreffAlt := olMailItem.Subject
	MyTextBodyAltHTML := olMailItem.HTMLBody
	MyTextBodyAlt := olMailItem.Body
	msgbox, HTML: `n%MyTextBodyAltHTML % 
	msgbox, Plantext: `n%MyTextBodyAlt% 
return

Re: Text aus Outlook kopieren?

Post by Lacky1982 » 18 Oct 2019, 00:10

Danke es funktioniert nur die letzte Lösung!

Re: Text aus Outlook kopieren?

Post by Kobaltauge » 17 Oct 2019, 15:19

Ich verstehe das nicht. Normalerweise sollte es so gehen.

Code: Select all

DetectHiddenWindows, On
ControlGetText, OutputVar, _WwG1, ahk_class rctrl_renwnd32
MsgBox % OutputVar
Aber ich bekomme bei mir auch nur "Nachricht" heraus. Bei der Betreffzeile funktioniert es.

Code: Select all

ControlGetText, OutputVar, RichEdit20WPT4, ahk_class rctrl_renwnd32
Ich tippe, es liegt an dem Editor, den Outlook im Hintergrund verwendet. Ich kann mir vorstellen, dass das Word ist. Aber das ist nur eine Vermutung.
Also den harten Weg. Wir kennen den Control. Aktivieren diesen und machen ein banales alles markieren und kopieren.

Code: Select all

ControlClick, _WwG1, ahk_class rctrl_renwnd32
Send, ^a
send, ^c

MsgBox % Clipboard

Text aus Outlook kopieren?

Post by Lacky1982 » 17 Oct 2019, 09:04

Hallo, ist es Möglich aus einem MS Outlook Email Nachricht den Nachrichten Text zu kopieren?

Auszug aus Spy Window
xxx xxx - Nachricht (HTML)
ahk_class rctrl_renwnd32
ahk_exe OUTLOOK.EXE^

ClassNN: _WwG1
Text: Nachricht
Color: FFFFFF (Red=FF Green=FF Blue=FF)
x: 9 y: 448 w: 1442 h: 377
Client: x: 8 y: 447 w: 1442 h: 377

Top