Seite 1 von 1
Acrobat - Java Script - Mail Body Text
Verfasst: 27.03.2017, 12:20
von YellowMan
Hallo zusammen
ich habe ein kleines Problem.
Bin schon weit gekommen, jetzt müsste ich im Body Text ein Feld vom Formular einfügen.
Das sieht jetzt so aus, nach Freundliche Grüsse sollte noch der Name rein
var aa = this.getField('Text02').value;
var bb = this.getField('Text03').value;
var cc = this.getField('Text09').value;
var betreff = '' + aa + ' ' + bb + " / " + cc;
var body = 'Liebes Team\nIm Anhang meine Lehrmittelbestellung.\n\nFreundliche Grüsse';
this.getField('Text03').value;
this.mailDoc(false, "
xxx@xxx.ch", "", "", betreff, body );
Weiss jemand Rat
YellowMan
Acrobat - Java Script - Mail Body Text
Verfasst: 27.03.2017, 13:30
von Semonia
Hallo,
ein Blick in die API wirft dir folgenden Vorschlag aus:
Code: Alles auswählen
this.mailDoc({
bUI: false,
cTo: "apstory@example.com",
cCC: "dpsmith@example.com",
cSubject: "The Latest News",
cMsg: "A.P., attached is my latest news story in PDF."
});
Code: Alles auswählen
bUI (optional) If true (the default), the rest of the parameters are used in a compose-new-message window that is displayed to the user. If false, the cTo parameter is required and all others are optional.
Note:(Acrobat 7.0) When this method is executed in a non-privileged context, the bUI parameter is not honored and defaults to true. See “Privileged versus non-privileged context” on page 32.
cTo (optional) The semicolon-delimited list of recipients for the message.
cCc (optional) The semicolon-delimited list of CC recipients for the message.
cBcc (optional) The semicolon-delimited list of BCC recipients for the message.
cSubject (optional) The subject of the message. The length limit is 64 KB.
cMsg (optional) The content of the message. The length limit is 64 KB.
LG
Semonia
Acrobat - Java Script - Mail Body Text
Verfasst: 27.03.2017, 16:47
von BAlheit
Vielleicht so:
Code: Alles auswählen
var body = "Liebes Team\nIm Anhang meine Lehrmittelbestellung.\n\nFreundliche Grüsse\n\n" + this.getField("Text03").value;
Bernd Alheit
Acrobat - Java Script - Mail Body Text
Verfasst: 27.03.2017, 19:58
von YellowMan
Danke mal vorerst
funktionniert noch nicht.
Bin nur ein Gelegenheit Programmierer.
Bin froh wenn ich sowas kleines hinkriege.
Verstehe Java Script nicht wirklich.
Jetzt ist eben der Wunsch dazugekommen im Body Text des Mail noch den Namen und Vornamen am Schluss hinzuzufügen.
Vielleicht begreife ich den Fehler noch
YellowMan