A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Creating appointment from a word document



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 7th 06, 08:44 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 2
Default Creating appointment from a word document

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  
Old June 8th 06, 07:25 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Creating appointment from a word document

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  
Old June 8th 06, 01:53 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 2
Default Creating appointment from a word document

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  
Old June 9th 06, 05:56 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Creating appointment from a word document

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 10:26 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.