• WSgellwood

    WSgellwood

    @wsgellwood

    Viewing 5 replies - 211 through 215 (of 215 total)
    Author
    Replies
    • in reply to: Detect whether program already running #528842

      Ahhh… English! Now I understand why your signature is a tankard of beer.

      I haven’t tried Andy’s DLL yet for exactly that reason … I’m not sure how to install/register and distribute it. I’ll ask Andy.
      G

    • in reply to: Detect whether program already running #528706

      Hi Steve,
      Would that be the Scottish flag you’re flying??? Did you see the post from Andy? I’m going to try his DLL, but thanks for the steer to the Dev Ashish’s site. As I said to Andy, if you’re even in beautiful Vancouver, I’ll buy you lunch.
      Gwenda

    • in reply to: Detect whether program already running #528705

      Andy,
      Can’t thank you enough. Will be testing it out shortly.
      If you ever come to beautiful Vancouver, I owe you lunch.
      Gwenda joy

    • in reply to: Send mail from Word #514314

      Thanks Sandi, I would love to know how to program Exchange, but I don’t
      G

    • in reply to: Send mail from Word #514198

      The answer was in “Word 2000 VBA Programmer’s Reference” by Duncan Mackenzie. Word’s sendmail object does not allow you to set any properties, like a recipient’s email address, body text, etc. You have to add the Outlook library to your project References (TOOOLS, References). Then you have access to Outlook’s own beautiful object model. The actual code follows:

      Sub MailProposal(sRecipient As String, strFullFileName As String)

      Dim objOutlook As Outlook.Application
      Dim nsMAPI As Outlook.NameSpace
      Dim objOutbox As Outlook.MAPIFolder
      Dim objNewMessage As Outlook.MailItem

      Set objOutlook = New Outlook.Application
      Set nsMAPI = objOutlook.GetNamespace(“MAPI”)
      Set objOutbox = nsMAPI.GetDefaultFolder(olFolderInbox)
      Set objNewMessage = objOutbox.Items.Add

      With objNewMessage
      .To = sRecipient
      .Subject = “test”
      .Body = “”
      .Attachments.Add strFullFileName .Send
      End With

      Set objOutlook = Nothing
      Set nsMAPI = Nothing
      Set objOutbox = Nothing
      Set objNewMessage = Nothing
      Exit Sub
      End Sub

    Viewing 5 replies - 211 through 215 (of 215 total)