• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

lotus notes from VBA

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    lotus notes from VBA

    Anyone on here know anything about automating lotus notes from VBA? I've got to put out a proof of concept for a quick and dirty reports distribution. One way I tried to embed the .xls file into the e-mail body as an attachment doesn't seem to work as I get a authorization failure. sending without the attachment work however, so something weird there.. I wonder if it has to do with the database..as it appears to use two different nsf files???

    Of course that will fill the e-mail server with lots of xls files..so now Im thinking about just putting a link to the file on the network. something like file://<server>/<share>/<path>/file.xls which would look like a hyperlink.
    Anyone done this in lotus notes using VBA?
    McCoy: "Medical men are trained in logic."
    Spock: "Trained? Judging from you, I would have guessed it was trial and error."

    #2
    Originally posted by lilelvis2000 View Post
    Anyone on here know anything about automating lotus notes from VBA? I've got to put out a proof of concept for a quick and dirty reports distribution. One way I tried to embed the .xls file into the e-mail body as an attachment doesn't seem to work as I get a authorization failure. sending without the attachment work however, so something weird there.. I wonder if it has to do with the database..as it appears to use two different nsf files???

    Of course that will fill the e-mail server with lots of xls files..so now Im thinking about just putting a link to the file on the network. something like file://<server>/<share>/<path>/file.xls which would look like a hyperlink.
    Anyone done this in lotus notes using VBA?
    Not me personally, but a bank I was at a couple of years ago did a similar sort of thing - automated emailing of statements/spreadsheets to clients. So you can definitely do it, not sure if it's done using VBA though.
    ‎"See, you think I give a tulip. Wrong. In fact, while you talk, I'm thinking; How can I give less of a tulip? That's why I look interested."

    Comment


      #3
      Disclaimer: I did some Notes development about a hundred years ago and don't remember most of it.

      I'm not sure I understand what you're trying to do. Are you just trying to mail out an excel file as an attachment?

      If you want it somewhere central, it wouldn't be too dificult to chuck together a new Notes database, stick it on a server and upload the xls file as an attachment to a document. Then you can just send out a link every time a new document's entered into the database.
      ǝןqqıʍ

      Comment


        #4
        Well, the method I'm using is the xls files are created each month..about 100 of them. These are placed into a folder on the LAN. (I suppose we could also put these into a notes document library as well). I then walk over each file..grab the first four characters which I then use as a key into a Access database to find all the e-mail addresses which are associated. I create a e-mail, attach the file and then send it.

        it is now working..the problem was the default database was pointing at someone else's..the previous owner of the laptop.

        I can also embed a hyperlink to the file using file://...../../file.xls in the body which will save space on the e-mail servers...something which the admins have been complaining about for a couple of years now.

        this is just a stop gap until we can get a proper sharepoint solution designed. Well at least that's the way I'm pushing the customer...'coz I don't want to become a notes programmer.
        McCoy: "Medical men are trained in logic."
        Spock: "Trained? Judging from you, I would have guessed it was trial and error."

        Comment


          #5
          Here's the bit of code I use for attaching files to a Notes Email.

          If you need any other help let me know.

          fName is a list of files seperated by ;

          strAttachments = fName
          If strAttachments <> "" Then
          varAttachments = Split(strAttachments, ";")
          If IsNull(varAttachments) = False Then
          For intLoop = LBound(varAttachments) To UBound(varAttachments)
          Set objAttachment = objAttachRTF.EmbedObject(1454, "", varAttachments(intLoop))
          Next intLoop
          Else
          End If
          End If

          Comment


            #6
            Programmatically Creating File Links in Lotus Notes Memo

            I spent a while researching this problem and eventually came up with an answer. The Domino Com has been designed not to allow file links because its counter productive for sharing data online according to IBM site. I think otherwise! My data IS shared on the server with colleagues.

            Assuming youve got the email construct sorted heres a few pointers for creating the links with sereral options for file path syntax IE number of slashes and mapped or unc paths...enjoy!

            (this will not work with spaces in folder or file names)

            '==================
            'rich text version
            '==================
            Set docMemo = dbMail.CreateDocument()
            Call docMemo.ReplaceItemValue("Form", "Memo")
            Call docMemo.ReplaceItemValue("SendTo", SendTo)
            Call docMemo.ReplaceItemValue("Subject", Subject)

            Set objBody = docMemo.CreateRichTextItem("Body")
            Call objBody.AppendText(Body)

            Call objBody.AppendText(vbCrLf)
            Call objBody.AppendText(vbCrLf)
            Call objBody.AppendText("file:///W:\WL_Records\Technical\Insight\Exceptions\test.tx t") 'works (3 slashes)
            Call objBody.AppendText(vbCrLf)
            Call objBody.AppendText("file://W:\WL_Records\Technical\Insight\Exceptions\test.tx t") 'works (2 slashes)
            Call objBody.AppendText(vbCrLf)
            Call objBody.AppendText("file:/W:\WL_Records\Technical\Insight\Exceptions\test.tx t") 'fails (1 slashes)
            Call objBody.AppendText(vbCrLf)
            Call objBody.AppendText("file:W:\WL_Records\Technical\I nsight\Exceptions\test.txt") 'works (0 slashes)
            Call objBody.AppendText(vbCrLf)
            Call objBody.AppendText("file://servername\CEFS9028\w\WL_Records\Technical\Insight \Exceptions\test.txt") 'works (2 f/slash unc)
            Call objBody.AppendText(vbCrLf)
            Call objBody.AppendText("file:\\servername\CEFS9028\w\W L_Records\Technical\Insight\Exceptions\test.txt") 'works (2 b/slash unc)

            Comment


              #7
              Originally posted by spezzer View Post
              Some stuff
              Think you may have missed the boat on this one, check the date on the original post...
              ǝןqqıʍ

              Comment


                #8
                Originally posted by DiscoStu View Post
                Think you may have missed the boat on this one, check the date on the original post...
                Guess your not too busy then

                The only reason I added this is for techies trying to achieve the same result - and from what Ive read theres quite a few of em out there - this is the closest thing to a solution. So next time someone googles lotus/notes/memo/hyperlink/etc they should find this - voila!

                Comment

                Working...
                X