Insert Date - Format Text / Cursor Location

  • Thread starter Thread starter srm
  • Start date Start date
S

srm

I'm using O2003. I have a simple script that inserts the date and some
text in notes and adds a carriage return /line feed at the end. Need
help on two items.

Can I bold just the date and have the cursor be on the new line on the
left. So for example the result of running the script would be as
follows:

<bold>09/05/08<bold> - Sample text
<cursor location>

Thanks

Shawn

====================

Sub InsertDate()
Dim objItem As Object

Set objItem = Application.ActiveInspector.CurrentItem
objItem.Body = objItem.Body & Format(Date, "mm/dd/yy") & " -
Sample text" & vbCrLf

Set objItem = Nothing

End Sub

=====================
 
I'm using O2003. I have a simple script that inserts the date and some
text in notes and adds a carriage return /line feed at the end. Need
help on two items.

Can I bold just the date and have the cursor be on the new line on the
left. So for example the result of running the script would be as
follows:

<bold>09/05/08<bold> - Sample text
<cursor location>

Thanks

Shawn

====================

Sub InsertDate()
    Dim objItem As Object

    Set objItem = Application.ActiveInspector.CurrentItem
        objItem.Body = objItem.Body & Format(Date, "mm/dd/yy") & " -
Sample text" & vbCrLf

    Set objItem = Nothing

End Sub

=====================

Had one more question. My code always place the text at the bottom of
the notes. Is there something that will allow be to place the text
where the cursor is located?

Thank you.
 
That's possible but the details will depend on:

1) What type of item you're inserting data into
2) If it's a message, whether it's an unsent or received item, the message
format (HTML, plain text, RTF) and whether Word is the email editor
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
That's possible but the details will depend on:

1) What type of item you're inserting data into
2) If it's a message, whether it's an unsent or received item, the message
format (HTML, plain text, RTF) and whether Word is the email editor
--
Sue Mosher, Outlook MVP
   Author of Microsoft Outlook Programming: Jumpstart
      for Administrators, Power Users, and Developers
     

Currently I'm inserting the data into Notes in "Contacts" and "Tasks".

I eventually want to expand these items into email messages, but first
wanted to get the Notes working first. When I send emails, I use
Outlook (mostly HTML / Plain text). I do not use Word as my email
editor.

Thanks

Shawn
 
For contacts and tasks, you'd want to use the third-party Redemption library
and its SafeInspector object, described at the bottom of the page at
http://www.outlookcode.com/article.aspx?id=31
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
For contacts and tasks, you'd want to use the third-party Redemption library
and its SafeInspector object, described at the bottom of the page athttp://www.outlookcode.com/article.aspx?id=31
--
Sue Mosher, Outlook MVP
   Author of Microsoft Outlook Programming: Jumpstart
      for Administrators, Power Users, and Developers
     

Sue:

Thank you.

Shawn
 
Back
Top