![]() |
Pop the Task Creation Outlook form from Word
I am hoping this is relatively simple...
I have several word documents containing meeting minutes/technical documentation. I want to be able to highlight a phrase, then execute a macro that opens the standard Outlook Task Creation Dialog. I would like for the highlighted phrase to be in the body of the task, and then I can easily fill in the name, due date, etc., in the dialog. One easy way I thought of would be to formulate the command line syntax and then just execute the command line, but I cannot figure out how to do that, either. As you have probably deduced, I am fairly new to VBA... I have written a few dozen VBA procedures in Excel but this is my first try at Word and/or Outlook... Help! Jim -- -------------- Jim Conrady |
Pop the Task Creation Outlook form from Word
Am Sun, 17 Sep 2006 08:19:02 -0700 schrieb Jim Conrady:
If the code is located in Word you need to add a reference to Outlook via Tools/References, if itīs in Outlook then add a ref to Word. After that you can use the Object Browser (F2) to get a lot of informations about the object models, their properties etc. A task in Outlook youīd create with the CreateItem method. In Word you can get the selection text with Window.Selection. You can call its Copy method to copy that selection into the clipboard, but thereīs no method in Outlook to insert that clipboard content into an itemīs Body. This, e.g., writes a selected text into an itemīs Body property, assuming that Task is a valid object variable for the TaskItem and Wd one for a Word.Document: Task.Body = Wd.Windows(1).Selection.Text -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- I am hoping this is relatively simple... I have several word documents containing meeting minutes/technical documentation. I want to be able to highlight a phrase, then execute a macro that opens the standard Outlook Task Creation Dialog. I would like for the highlighted phrase to be in the body of the task, and then I can easily fill in the name, due date, etc., in the dialog. One easy way I thought of would be to formulate the command line syntax and then just execute the command line, but I cannot figure out how to do that, either. As you have probably deduced, I am fairly new to VBA... I have written a few dozen VBA procedures in Excel but this is my first try at Word and/or Outlook... Help! Jim |
All times are GMT +1. The time now is 08:59 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright Đ2004-2006 OutlookBanter.com