Results 1 to 1 of 1

Thread: Use Excel VB code to Send Attachment from Zimbra Desktop

  1. #1
    sbt is offline Beginner Member
    Join Date
    Jan 2011
    Rep Power

    Default Use Excel VB code to Send Attachment from Zimbra Desktop

    Excel 2007
    Windows XP
    Zimbra Desktop 1.0.4 (build 1833)

    I would like to send a pdf file from my Excel VBA code through Zimbra desktop. The cells that I reference in my code have the proper paths and file names required to provide an email, subject and attachment.

    I have uploaded a text file to my post, which shows how I am already allowing a user who has outlook to send a pdf. But when I tried to do the same thing using a shell command, zimbra desktop pops up, but it has not opened a new message, and it has not attached the pdf.

    Unfortunately, I am unfamiliar with enough of the zimbra commands to pass an email, subject or attachment correctly .

    I found this Reference case, but it does not quite show me all of the commands/steps I need.

    My Code so far

    Private Sub SendZimbra_Click()
    Dim SH As Worksheet, TP As Worksheet
    Set TP = Sheets("Template")
    Set SH = Sheets("Purchased Items")

    EmailAnswer = MsgBox("Create Email Now ?", vbYesNo)

    If EmailAnswer = 6 Then
    'Start Email Creation Process. 6 = Yes, 7 = No

    Dim directory As String
    Dim ZimbraPath As String, activedocument As Workbook

    ZimbraPath = SH.Cells(1, 21)
    directory = SH.Cells(3, 3)
    AttachementName = SH.Cells(3, 3) & SH.Cells(2, 3) & " Packing Slip.pdf" 'Attachment Name & Location
    SubjectName = SH.Cells(4, 3) 'Cell C4 has the subject name
    EmailTo = SH.Cells(5, 3)

    If AttachementName <> "" Then
    On Error GoTo 1
    Shell (ZimbraPath & " -sendfile " & AttachementName)
    End If

    'MsgBox "PDF File does not exist !" & vbCrLf & "Create PDF, then Try Again." & vbCrLf & vbCrLf & "File Name : " & AttachementName
    'Resume Next 'Ignors the error
    If Err.Description <> "" Then MsgBox Err.Description

    ' End 'End the email creation

    End If 'End creating email

    End Sub
    Last edited by phoenix; 01-07-2011 at 11:21 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Help, I think I am running Zimbra as root!
    By primaxx in forum Administrators
    Replies: 9
    Last Post: 10-06-2010, 11:04 AM
  2. Replies: 21
    Last Post: 02-04-2010, 10:06 AM
  3. Big Fubar on 5 FOSS GA Upgrade
    By uxbod in forum Administrators
    Replies: 24
    Last Post: 01-21-2008, 03:37 AM
  4. Replies: 31
    Last Post: 12-15-2007, 09:05 PM
  5. Replies: 8
    Last Post: 02-27-2007, 04:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts