How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask adamd-mod Your Own Question
adamd-mod, Moderator
Category: Microsoft
Satisfied Customers: 9
Experience:  Moderator
Type Your Microsoft Question Here...
adamd-mod is online now

My problem is how to manipulate WORD and EXCEL from within

Customer Question

My problem is how to manipulate WORD and EXCEL from within OUTLOOK. The routine is so fixed and annoying that a keystroke recorder would almost be enough.
(ACCESS.) – future development
1. A sequence of incoming messages is received in OUTLOOK and passed to a specified folder FLDR(1), using OUTLOOK mail rules.
2. Each outlook message MSG(n) has a WORD document attachment WD(n).
3. The WORD document reference String1(n), contained at a specific position within the document WD(n), has to be read and used to change the subject of the outlook MSG(n) from MSG(n).subject to String1(n) because the incoming message subject – MSG(n).subject-- is meaningless to me.
4. A second reference in the WD(n), String2(n), is found and used to pick up addressees, ADD1(n) and ADD2(n), from an EXCEL workbook.
5. The word document WD(n) is then saved to a hard drive file folder F:\(pathname), with the new name String1(n) (modified). (The modification is necessary because String1(n) is in the format xx/88888 and needs to be changed to xx-88888 to save without error)
6. A second folder in OUTLOOK, FLDR(2), contains subfolders (SFLDR) titled with String3(N).
7. Using String2(n), FLDR(2).SFLDR(String3(n)) is located and its contents set as attachment to outgoing OUTLOOK message.
8. Addressees for the outgoing message are set to ADD1(n), cc. ADD2(n)
9. The title of the outgoing message is changed again to String1(n) & text & String3(n)
Thus the final output of the procedure is:
Outgoing message:
Title: String1(n) & text & String3(n)
Addressees: ADD1(n); cc: ADD2(n)
Attachments: WD(n); FLDR(2).SFLDR(String3(n)).contents.
Deleted: MSG(n), SFLDR(String3(n))
FLDR(1), FLDR(2), SFLDR(String3(n) in OUTLOOK
F:\(pathname) on hard drive
Data collected:-
String1(n), String2(n) from WD(n)
ADD1(n), ADD2(n) form EXCEL workbook
String3(n) from OUTLOOK
My problem is how to manipulate WORD and EXCEL from within OUTLOOK. The routine is so fixed and annoying that a keystroke recorder would almost be enough.
Submitted: 1 year ago.
Category: Microsoft
Expert:  Steve replied 1 year ago.

Hi there, my name is***** can program Outlook using Visual Basic for Applications the same as Excel and Word. However, you won't see that option in your ribbon because it's not enabled by default. To enable the Developer tab:

  1. Select File and Options.
  2. Choose Customize Ribbon.
  3. Check the box next to Developer Options In the right-hand list box,.
  4. Select OK

When you go back to Outlook, you have a new menu called Developer with the ability to use Visual Basic for Applications, the same way you can in Word and Excel.

Click this link for a good introductory article on using VBA with Outlook. It's a little old but very relevant.

if you would like for me to create the VBA application for you, I can give you an estimate of what that might cost with a little more information from you about the details of what you're trying to accomplish.

If this fixes your problem or answers your question, can you please accept my answer and rate me accordingly? I don't get paid anything for helping you until you accept my answer. If this doesn't answer your question, please chat me back and we'll get it resolved.

Customer: replied 1 year ago.
I'm sorry, but that is such an inadequate answer that I can't begin to rate it. You might as well have reminded me to switch on my PC.
If that is the limit of your advice, please let me know and I will close this out
Expert:  Steve replied 1 year ago.

I'm not quite sure what you were expecting, so let me rephrase my answer to you.

You said,

My problem is how to manipulate WORD and EXCEL from within OUTLOOK.

My response is:

To manipulate Word and Excel from within Outlook, you must write a custom Visual Basic for Applications program.

There are two reasons why I chose this answer.

1) It answers the question.

  • If you already knew this, you wouldn't have asked this question. You would have asked an entirely different question. I'm surprised that you equate it to instructions to turn on your PC, because I'm certain you know how to do that.
  • I thought that perhaps you weren't aware that you could use VBA in Outlook because it doesn't appear on the menu bar by default, so I gave you instructions to activate it on the menu bar.
  • I also provided you with a link to an article that discusses how you write VBA programs in Outlook. It also links to broader VBA documentation and how you use it in Word and Excel. The article is about as relevant to your question as you can get.

Instructions for how to write a custom VBA application in Outlook to manipulate Word and Excel files is far beyond the scope of this question (which I get paid $10 to answer, and only if you accept the answer).

2) There's really no answer in between. For example, when you say:

String2(n), is found and used to pick up addressees, ADD1(n) and ADD2(n), from an EXCEL workbook

the most I can tell you is pretty obvious:

  • You need to find a way to find String2, for example by searching with a regular expression for fixed content that's always in place.
  • Then you will have to open the Excel workbook you reference
  • Then you have to somehow perform a search for addresses.

You haven't provided enough information to tell you anything other than that:

  • You haven't said what String2 is (person's name, company name);
  • You haven't described where the Excel workbook is, what data it contains or what the structure of the workbook is;
  • You haven't given any detail about ADD1 and ADD2 and how you can "pick them up."

There's nothing else I can tell you. The application you're describing is not trivial and will require a substantial amount of work. If you don't know how to write VBA applications in Outlook that maniupulate Word and Excel, your best bet is to hire someone who does.

Thank you and have a good day.

Expert:  adamd-mod replied 1 year ago.
Hello there,
I've been working hard to find a Professional to assist you with your question, but sometimes finding the right Professional can take a little longer than expected.
I wonder whether you're ok with continuing to wait for an answer. If you are, please let me know and I will continue my search. If not, feel free to let me know and I will cancel this question for you.
Please note, I am just a moderator for this category, I can only try and find experts to help, I can't answer the question itself.
Thank you!
Customer: replied 1 year ago.
Please continue until, either you find one, or you exhaust the possibilities.
Do not let me continue with the clown who has answered already.
Maybe I should rephrase the question. I do not want a progamme written, I want to be able to control other Office applications from within Outlook VBA.
Expert:  adamd-mod replied 1 year ago.
Thanks for getting back to me.
We will continue to look for a Professional to assist you.
Thank you for your patience,
Expert:  adamd-mod replied 1 year ago.
I apologize as we have not yet been able to find a Professional to assist you. Do you wish for me to continue to search for someone to assist you or would you like for us to close your question at this time?
Thank you for your patience,
Customer: replied 1 year ago.
no thanks. I have more or less solved the problem myself by trial and error.
I would like to close this one down now.