add-in ל- microsoft word
אני כותבת add-in ל-word, זה אמור להיות כפתור שבעת הלחיצה עליו שולח את המסמך הפתוח ל-URL כלשהו. אני משתמשת בפונ': Sub MailIt(sMailTo As String, sHeader As String, sBody As String) Dim objMail As Object, objOutlook As Object On Error GoTo Fehler: ActiveDocument.Save Set objOutlook = CreateObject("Outlook.Application") Set objMail = objOutlook.CreateItem(0) With objMail .Subject = sHeader .To = sMailTo .Attachments.Add ActiveDocument.FullName .Body = sBody .DeleteAfterSubmit = True .ReadReceiptRequested = False .OriginatorDeliveryReportRequested = False .Send End With Set objMail = Nothing Exit Sub Fehler: MsgBox Err.Description, vbCritical, "Fehler Nr. " & Err.Number End Sub Sub MailItNot() MailIt "[email protected]", "Testmail", "Test" End Sub וזה לא עובד - ואני לא מבינה למה (עזרה בבקשה!!) כמו-כן אני צריכה שהקובץ ישלח ב-embded לכן ניסתי להוסיף את השינוי הבא לפונ': .Body = ActiveDocument.content אבל גם זה לא עובד. (אני כותב ב- .NET) לעזרתכם המהירה הודה!!!
אני כותבת add-in ל-word, זה אמור להיות כפתור שבעת הלחיצה עליו שולח את המסמך הפתוח ל-URL כלשהו. אני משתמשת בפונ': Sub MailIt(sMailTo As String, sHeader As String, sBody As String) Dim objMail As Object, objOutlook As Object On Error GoTo Fehler: ActiveDocument.Save Set objOutlook = CreateObject("Outlook.Application") Set objMail = objOutlook.CreateItem(0) With objMail .Subject = sHeader .To = sMailTo .Attachments.Add ActiveDocument.FullName .Body = sBody .DeleteAfterSubmit = True .ReadReceiptRequested = False .OriginatorDeliveryReportRequested = False .Send End With Set objMail = Nothing Exit Sub Fehler: MsgBox Err.Description, vbCritical, "Fehler Nr. " & Err.Number End Sub Sub MailItNot() MailIt "[email protected]", "Testmail", "Test" End Sub וזה לא עובד - ואני לא מבינה למה (עזרה בבקשה!!) כמו-כן אני צריכה שהקובץ ישלח ב-embded לכן ניסתי להוסיף את השינוי הבא לפונ': .Body = ActiveDocument.content אבל גם זה לא עובד. (אני כותב ב- .NET) לעזרתכם המהירה הודה!!!