![]() |
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
I've developed the following macro in order to create a Outlook appointment from Word: Sub CreateMeetingRequest() Dim oApp As Outlook.Application Set oApp = New Outlook.Application Dim oNS As Outlook.NameSpace Set oNS = oApp.Session '*** Create an AppointmentItem. Dim oAppt As Outlook.AppointmentItem Set oAppt = oApp.CreateItem(Outlook.OlItemType.olAppointmentIt em) '*** Change AppointmentItem to a Meeting. oAppt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting '*** Go to the subject bookmark Selection.GoTo What:=wdGoToBookmark, Name:="subject" Selection.SelectCell '*** Set the subject of the meeting oAppt.Subject = Selection.Text '*** Select the agenda grid Selection.GoTo What:=wdGoToBookmark, Name:="agenda" Selection.Tables(1).Select oAppt.Body = Here we go. Two questions. 1º) When I do the Selection.SelectCell it selects the text that has inside the cell, plus two strange characters (two squares). How do I remove those characters before setting the properties. 2º) When I select the agenda grid I want to be able to set it in the Body of the meeting request. I know I can do this using CTRL + C in word and pasting into the body of the meeting request, but how do I do this programatically ? Thanks in advance! Eduardo Ferrari |
Ads |
#2
|
|||
|
|||
![]()
Am 7 Jun 2006 12:44:16 -0700 schrieb :
1) Just cut them off: dim s$ s=Selection.Text s=left(s, len(s)-2) 2) For copy&paste into a TaskItem you´d need to use Redemption (www.dimastr.com), because there´s no other usefull way to set the cursor. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi all I've developed the following macro in order to create a Outlook appointment from Word: Sub CreateMeetingRequest() Dim oApp As Outlook.Application Set oApp = New Outlook.Application Dim oNS As Outlook.NameSpace Set oNS = oApp.Session '*** Create an AppointmentItem. Dim oAppt As Outlook.AppointmentItem Set oAppt = oApp.CreateItem(Outlook.OlItemType.olAppointmentIt em) '*** Change AppointmentItem to a Meeting. oAppt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting '*** Go to the subject bookmark Selection.GoTo What:=wdGoToBookmark, Name:="subject" Selection.SelectCell '*** Set the subject of the meeting oAppt.Subject = Selection.Text '*** Select the agenda grid Selection.GoTo What:=wdGoToBookmark, Name:="agenda" Selection.Tables(1).Select oAppt.Body = Here we go. Two questions. 1º) When I do the Selection.SelectCell it selects the text that has inside the cell, plus two strange characters (two squares). How do I remove those characters before setting the properties. 2º) When I select the agenda grid I want to be able to set it in the Body of the meeting request. I know I can do this using CTRL + C in word and pasting into the body of the meeting request, but how do I do this programatically ? Thanks in advance! Eduardo Ferrari |
#3
|
|||
|
|||
![]()
Thanks Michael
I did think about cut the chars off, but I tought would have a better way to do it. About the Redemption, does all users that will run the macro need the redemption dll installed in order to run the macro? I did not find the property to set the body of the appointment. Thanks Michael Bauer wrote: Am 7 Jun 2006 12:44:16 -0700 schrieb : 1) Just cut them off: dim s$ s=Selection.Text s=left(s, len(s)-2) 2) For copy&paste into a TaskItem you´d need to use Redemption (www.dimastr.com), because there´s no other usefull way to set the cursor. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi all I've developed the following macro in order to create a Outlook appointment from Word: Sub CreateMeetingRequest() Dim oApp As Outlook.Application Set oApp = New Outlook.Application Dim oNS As Outlook.NameSpace Set oNS = oApp.Session '*** Create an AppointmentItem. Dim oAppt As Outlook.AppointmentItem Set oAppt = oApp.CreateItem(Outlook.OlItemType.olAppointmentIt em) '*** Change AppointmentItem to a Meeting. oAppt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting '*** Go to the subject bookmark Selection.GoTo What:=wdGoToBookmark, Name:="subject" Selection.SelectCell '*** Set the subject of the meeting oAppt.Subject = Selection.Text '*** Select the agenda grid Selection.GoTo What:=wdGoToBookmark, Name:="agenda" Selection.Tables(1).Select oAppt.Body = Here we go. Two questions. 1º) When I do the Selection.SelectCell it selects the text that has inside the cell, plus two strange characters (two squares). How do I remove those characters before setting the properties. 2º) When I select the agenda grid I want to be able to set it in the Body of the meeting request. I know I can do this using CTRL + C in word and pasting into the body of the meeting request, but how do I do this programatically ? Thanks in advance! Eduardo Ferrari |
#4
|
|||
|
|||
![]()
Am 8 Jun 2006 05:53:13 -0700 schrieb :
Yes, the library needs to be on every computer. Here´re some samples: http://www.dimastr.com/redemption/safeinspector.htm -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Thanks Michael I did think about cut the chars off, but I tought would have a better way to do it. About the Redemption, does all users that will run the macro need the redemption dll installed in order to run the macro? I did not find the property to set the body of the appointment. Thanks Michael Bauer wrote: Am 7 Jun 2006 12:44:16 -0700 schrieb : 1) Just cut them off: dim s$ s=Selection.Text s=left(s, len(s)-2) 2) For copy&paste into a TaskItem you´d need to use Redemption (www.dimastr.com), because there´s no other usefull way to set the cursor. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- Hi all I've developed the following macro in order to create a Outlook appointment from Word: Sub CreateMeetingRequest() Dim oApp As Outlook.Application Set oApp = New Outlook.Application Dim oNS As Outlook.NameSpace Set oNS = oApp.Session '*** Create an AppointmentItem. Dim oAppt As Outlook.AppointmentItem Set oAppt = oApp.CreateItem(Outlook.OlItemType.olAppointmentIt em) '*** Change AppointmentItem to a Meeting. oAppt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting '*** Go to the subject bookmark Selection.GoTo What:=wdGoToBookmark, Name:="subject" Selection.SelectCell '*** Set the subject of the meeting oAppt.Subject = Selection.Text '*** Select the agenda grid Selection.GoTo What:=wdGoToBookmark, Name:="agenda" Selection.Tables(1).Select oAppt.Body = Here we go. Two questions. 1º) When I do the Selection.SelectCell it selects the text that has inside the cell, plus two strange characters (two squares). How do I remove those characters before setting the properties. 2º) When I select the agenda grid I want to be able to set it in the Body of the meeting request. I know I can do this using CTRL + C in word and pasting into the body of the meeting request, but how do I do this programatically ? Thanks in advance! Eduardo Ferrari |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I embed a Meeting Request (Outlook) into a Word document? | CJChristopher | Outlook - Calandaring | 1 | May 15th 06 07:41 PM |
blank Word document in Mail Merge | jms00 | Outlook - Using Contacts | 3 | May 12th 06 02:38 PM |
Try to print "Word was unable to read this document. It may be co | Daniel Reyes | Outlook - Using Forms | 1 | April 24th 06 05:37 PM |
Extracting Distribution list to Word document | [email protected] | Outlook - General Queries | 2 | April 19th 06 12:26 PM |
How do I convert Outlook calendar into a Word document? | Jeana | Outlook - Calandaring | 2 | March 7th 06 04:03 PM |