Welcome to Netrider ... Connecting Riders!

Interested in talking motorbikes with a terrific community of riders?
Signup (it's quick and free) to join the discussions and access the full suite of tools and information that Netrider has to offer.

Any visual basic experts out there?

Discussion in 'The Pub' started by robbie55, Sep 22, 2011.

  1. Hi am doing some project work with standard letters for our systems.

    Our systems though only allow MS Word docs to be attached but as most of this is sent via email I have set up the active docs to covert and send as emails with the content of the active doc being the body of the email. What I further need though is another (unrealted) word doc to be sent with this email as an attachement. This further word doc is not active however is the same for each email - I need to direct VB to the location but am unsure how to do this.

    Anyone know?

  2. It's been a while and I'm pretty rusty but I've done a bunch of Groupwise automation a while back...
    The method will vary slightly according to the mail system you're using. But one of the parameters for the email you're composing should be "Attach=" or "Attachment=", which should allow you to specify a UNC path to the file you're after - it's fairly simple and generic because unlike your body text, you're not opening the file and trying to interpret it.
    Hope that helps - I might just have some old code archived if it would help? If it's GW you're working with, you can just take my whole class module...

    One other thing to remember is Windows doesn't really like automated emails these days - I remember a "Are you sure..." dialog I couldn't get rid of, and which they'd disabled the SendKeys function for...
  3. Thanks NiteKreeper - managed to get this working to a certain extent but for whatever reason the attached doc would open in a second email :(

    Then a smart arse in passing said "why dont you just use a hyperlink?" - hate that guy