Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jan 2003
    San Francisco, California, USA
    Thanked 0 Times in 0 Posts

    Outlook Prompt/Warning (VBA/Word/2003)

    Hello All,

    I have a form in Word that sends a task to a specific e-mail address in our company. Here is a snapshot of the code which I'm sure most people are familiar with:

    Dim objOutlook As Outlook.Application
    Dim nsMAPI As Outlook.NameSpace
    Dim objTaskFolder As Outlook.MAPIFolder
    Dim objNewTask As Outlook.TaskItem
    Dim objDoc As Document
    Dim strPath As String

    Set objOutlook = New Outlook.Application
    Set nsMAPI = objOutlook.GetNamespace("MAPI")
    Set objTaskFolder = nsMAPI.GetDefaultFolder(olFolderTasks)
    Set objNewTask = objTaskFolder.Items.Add

    With objNewTask
    .Subject = "PWO No. " & objDoc.Variables("WorkOrderNumber").Value & " - " & objDoc.FormFields("bkName").Result
    Select Case objDoc.FormFields("bkPriority").Result
    Case "Low"
    .Importance = olImportanceLow
    Case "Normal"
    .Importance = olImportanceNormal
    Case "High"
    .Importance = olImportanceHigh
    End Select
    .Recipients.Add <e-mail address here>
    .DueDate = objDoc.FormFields("bkDateNeeded").Result
    .Body = vbCr & vbCr & "Document Name: " & objDoc.FormFields("bkDocument").Result & vbCr & _
    "Date Needed: " & objDoc.FormFields("bkDateNeeded").Result & vbCr & _
    "Additional Comments: " & objDoc.FormFields("bkComments").Result
    .Attachments.Add objDoc.FullName
    End With


    The problem is that this method produces a prompt and warning from Outlook that someone is trying to access contacts and send an e-mail. It requires that the end-user select an amount of time to allow access to the code. Is there anyway of getting around these prompts and warnings? Would a digitally signed template solve the problem?

    Thank you.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Outlook Prompt/Warning (VBA/Word/2003)

    See <post#=317048>post 317048</post#>.

Posting Permissions

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