![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may 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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi All,
As a newbie to Outlook VBA programming and following on from an earlier posting... How do I populate the body of an appointment with an existing word document that I have populated using automation? The .MailEnvelope method does not appear to be supported for appointments. I understand that I can get Word object from the inspector but this does support the .Open file method, and if I can help it I don't want to create the document from scratch. I tried a .Content.Copy from standard Word with the idea that I could do a ..Content.Paste with the inspector Word object but again this does not appear to be supported. I am sure I missing something obvious. Can you help? Guy |
#2
|
|||
|
|||
![]()
Maybe what you're missing is that Word is the editor for appointment bodies only in Outlook 2007. In other words, there is no Word.Document object available from an appointment Inspector in earlier versions, nor is there any native method for working with the formatted appointment item body.
Maybe the solution is to set the value of AppointmentItem.Body directly rather than automate Word in between. If you need a formatted appointment body, your options are limited to Redemption or CDO 1.21, plus a helper .dll. See http://www.outlookcode.com/article.aspx?id=31 -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Guy" wrote in message ... Hi All, As a newbie to Outlook VBA programming and following on from an earlier posting... How do I populate the body of an appointment with an existing word document that I have populated using automation? The .MailEnvelope method does not appear to be supported for appointments. I understand that I can get Word object from the inspector but this does support the .Open file method, and if I can help it I don't want to create the document from scratch. I tried a .Content.Copy from standard Word with the idea that I could do a .Content.Paste with the inspector Word object but again this does not appear to be supported. I am sure I missing something obvious. Can you help? Guy |
#3
|
|||
|
|||
![]()
Hi Sue,
I am using Office 2007 (thankfully) and I have managed to get it working by using automation from MS Access to MS Word to populate the document, copying the document to the clipboard, then opening the appointment inspector word object and pasting. I have to admit it does seem a somewhat "clutzy" approach, and welcome any refinements from more exprienced Outlook VBA'ers Regards, Guy "Sue Mosher [MVP-Outlook]" wrote: Maybe what you're missing is that Word is the editor for appointment bodies only in Outlook 2007. In other words, there is no Word.Document object available from an appointment Inspector in earlier versions, nor is there any native method for working with the formatted appointment item body. Maybe the solution is to set the value of AppointmentItem.Body directly rather than automate Word in between. If you need a formatted appointment body, your options are limited to Redemption or CDO 1.21, plus a helper .dll. See http://www.outlookcode.com/article.aspx?id=31 -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Guy" wrote in message ... Hi All, As a newbie to Outlook VBA programming and following on from an earlier posting... How do I populate the body of an appointment with an existing word document that I have populated using automation? The .MailEnvelope method does not appear to be supported for appointments. I understand that I can get Word object from the inspector but this does support the .Open file method, and if I can help it I don't want to create the document from scratch. I tried a .Content.Copy from standard Word with the idea that I could do a .Content.Paste with the inspector Word object but again this does not appear to be supported. I am sure I missing something obvious. Can you help? Guy |
#4
|
|||
|
|||
![]()
Please ignore my findings above as they are incorrect.
Have managed to get it working using a copy and paste approach. However, if there is an easier method please advise Guy "Guy" wrote: Hi All, As a newbie to Outlook VBA programming and following on from an earlier posting... How do I populate the body of an appointment with an existing word document that I have populated using automation? The .MailEnvelope method does not appear to be supported for appointments. I understand that I can get Word object from the inspector but this does support the .Open file method, and if I can help it I don't want to create the document from scratch. I tried a .Content.Copy from standard Word with the idea that I could do a .Content.Paste with the inspector Word object but again this does not appear to be supported. I am sure I missing something obvious. Can you help? Guy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating an Outlook 2007 Distribution List Using MS Access | Don | Outlook and VBA | 3 | June 16th 08 05:48 PM |
Creating New Contacts in Access that Link to Outlook | kjschiller | Outlook - Using Contacts | 0 | December 31st 07 12:51 AM |
What template does word use when creating emails for Outlook 2003 | rfc | Outlook - General Queries | 3 | November 24th 07 05:17 PM |
Creating a task in Outlook from Access | Blogd_Node | Outlook and VBA | 4 | February 3rd 07 04:38 AM |
Creating contacts from a word document in outlook | [email protected] | Outlook - Using Contacts | 1 | January 11th 07 09:54 PM |