Consulting

Results 1 to 8 of 8

Thread: Word Macro...need help

  1. #1
    VBAX Newbie techiemom60's Avatar
    Joined
    Aug 2004
    Location
    Midwest
    Posts
    2
    Location

    Word Macro...need help

    Hello,

    I need to create a word macro that will do a File Send To (this part I have). I need to add a specific email address in the macro so when the user clicks, it attaches the current document and addresses the email for them.

    Any assistance would be greatly appreciated.

    Thanks.

    Techiemom60

  2. #2
    VBAX Regular Kelly's Avatar
    Joined
    Jun 2004
    Location
    Los Angeles, California
    Posts
    84

    Outlook?

    Is it safe to assume you are using Outlook?

    Or would you happen to be using Outlook Express or something else?

    I have a feeling this info will be necessary to accomplish the task.

  3. #3
    VBAX Newbie techiemom60's Avatar
    Joined
    Aug 2004
    Location
    Midwest
    Posts
    2
    Location
    In case it matters...the Word document will be sent through Lotus Notes 5.0.10!

  4. #4
    VBAX Regular Kelly's Avatar
    Joined
    Jun 2004
    Location
    Los Angeles, California
    Posts
    84

    Unhappy a partial answer...

    I'm thinking that the solution SHOULD be something like this:

    ActiveDocument.HasRoutingSlip = True
    With ActiveDocument.RoutingSlip
       .Subject = "Project Documentation"
       .AddRecipient "Don Funk"
       .AddRecipient "Dave Edson"
       .Delivery = wdOneAfterAnother
    End With
    ActiveDocument.Route
    The above snippet is what I found in the Word Help by searching for "Routing Slip"

    But I can't get it to work on my computer. (I'm using Outlook and Word).

    Actually, it "KINDA" works for me, but rather than just running smoothly and automatically, it causes Outlook to send up a bunch of message boxes and dialog boxes and stuff for me to click.

    Maybe you'll have better luck with Lotus Notes....

    The reason I asked if you have Outlook is that Outlook (as you probably know) uses VBA just like Word. So it's easy to get the two to work together (in theory, at least). If we were using Word and Outlook, we could write a macro (different from the routing slip business) that would make Word "talk to" Outlook (something with "Set myOutlook = CreateObject("Outlook.Application")") Then we could have Word "tell" Outlook exactly how and to whom to send the document.

    But I don't know how to make Word "talk to" Lotus Notes. I don't think Lotus Notes uses VBA.

    I'll step back now and see if someone else comes up with a better answer. (I hope someone will ! )
    Last edited by Aussiebear; 04-12-2023 at 06:22 PM. Reason: Adjusted the code tags

  5. #5
    VBAX Regular JOrzech's Avatar
    Joined
    Jun 2004
    Location
    Upstate New York
    Posts
    83
    Location
    If your default email is Lotus, does this code work?

    ActiveDocument.SendMail
    You need to be sure that email as attachment is checked under Tools, Options, General, mail as attachment is checked.

    If not, I have code to send as attachment via Groupwise, which may also work for Lotus.
    Last edited by Aussiebear; 04-12-2023 at 06:23 PM. Reason: Adjusted the code tags
    Joanne

  6. #6
    VBAX Regular Kelly's Avatar
    Joined
    Jun 2004
    Location
    Los Angeles, California
    Posts
    84
    Hi JOrzech!

    I can only guess, but I believe that the "ActiveDocument.SendMail" is the part that TechieMom mentions as "the part [I] already have."

    The trick is, how do we incorporate a Send-To address automatically from within the VBA code?

    It seems like SendMail should take arguments for this type of info (I even tried valiantly to force arguments onto it - hahahaha....) but it doesn't seem to want to do that.

    Do you know how we can get a Send-To address in there? I'm starting to want this solution for myself, now, too.

    Quote Originally Posted by techiemom60
    Hello,

    I need to create a word macro that will do a File Send To (this part I have). I need to add a specific email address in the macro so when the user clicks, it attaches the current document and addresses the email for them.

    Any assistance would be greatly appreciated.

    Thanks.

    Techiemom60

  7. #7
    VBAX Regular Kelly's Avatar
    Joined
    Jun 2004
    Location
    Los Angeles, California
    Posts
    84
    Oh, well, whaddayaknow!

    Sorry, JOrzech, for jumping in here!

    Obviously, you have provided the complete solution!

    It would be this thread, right? http://www.vbaexpress.com/forum/showthread.php?t=798

  8. #8
    VBAX Regular JOrzech's Avatar
    Joined
    Jun 2004
    Location
    Upstate New York
    Posts
    83
    Location

    Hi Kelly!

    I'm sorry - I was so excited to be able to get back on my home computer and usurp those rights from my 18 year old son who loves to play all those blasted games that I had to buy about $70 worth of spyware and virus #$% to get rid of --... I was a bit hasty in posting. I should have been clearer.

    The problem is, I don't have Lotus and don't know anyone who does...

    And never apologize for jumping in Kelly! We're all here with the same goal.
    Joanne

Posting Permissions

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