Issues after changing default email form - help needed.

C

Chris Mitchell

I've changed my default email form for a customised one as per
http://www.slipstick.com/dev/newdefaultform.htm#changedefault

Since making the change I've noticed a couple of things that have also
changed:

1 New Messages that I create and send, including replies to messages
received, no longer have the messages icon associated with them (envelope)
they now appear as notes (post it type note with pin through).

2 The hyperlink in my signature file is no longer active. The text is
still there, but it is not marked as, nor does it work as a hyperlink.

Any suggestions as to how to rectify these issues on a Win 98 system running
MS Outlook 2000 SP3 would be gratefully received.
 
C

Chris Mitchell

Found this:

"On items created with customized message forms, the icon does not change to
an open envelope after the user opens the message or marks it as read.
However, unread messages will still show as bold in a folder view,
regardless of what form they use. This is a user education issue as much as
anything else."

at http://www.slipstick.com/dev/messageform.htm

What does "This is a user education issue as much as anything else." mean?

Can my wrong icon problem be fixed? Y/N.

If Y, how?
 
C

Chris Mitchell

Looking for a cure to getting my existing signature into a customised
message form I found this:

"Sub StartNewCustomMsgWithSig(strMessageClass As String)
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colDrafts As Outlook.Items
Dim objMail As Outlook.MailItem
Dim objSigMail As Outlook.MailItem

Set objOL = CreateObject("Outlook.Application")
Set objNS = objOL.GetNamespace("MAPI")
Set colDrafts = objNS.GetDefaultFolder(olFolderDrafts).Items
Set objMail = colDrafts.Add(strMessageClass)
Set objSigMail = objOL.CreateItem(olMailItem)
objMail.HTMLBody = objSigMail.HTMLBody
objSigMail.Close olDiscard
objMail.Display

Set objOL = Nothing
Set objNS = Nothing
Set colDrafts = Nothing
Set objMail = Nothing
Set objSigMail = Nothing
End Sub"

at http://www.outlookcode.com/codedetail.aspx?id=162

Put it in the code of my customised form and substituted my message class
IPM.Note.My Messages for strMessageClass As String in line one. However
when I try to use the form I get:
Script Error Expected ')' Line No 1.

I've tried with the string both within quotes (") and not but I get the same
error each time.

Once I've cracked this are there any other changes I should make to this
script before trying to run it?

I'm brand spanking new to this so please treat me gently.
 
S

Sue Mosher [MVP]

It means that you have to tell users not to expect icons to change when using a custom form.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP]

That's VBA code. You'd have to adapt it to VBScript by using the intrinsic Item object to represent the message where you want the signature to appear, removing the data typing (e.g. As String) from variable declarations, and substituting literal values for Outlook constants (e.g. olFolderDrafts).

The problem, though, might just be with your signature file itself. Did you check its HTML source? Or did you design the form with the signature as part of the message?
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
C

Chris Mitchell

Modified first line of code to read

Sub StartNewCustomMsgWithSig(strMessageClassolFolderDrafts)

Removed space before ( and on receipt of subsequent error messages removed
spaces between ...Class_olFolder... and before ). Script now appears to get
beyond first line, but now I get

Expected end of statement Line No:2

What is this and how do I insert it.

With regards to my Sig file this was created using Word as email editor,
entering signature content including hyperlink, into a new message,
selecting the text to be used as signature, then setting this as my auto
signature. (However this option doesn't appear to be available in messages
created using my customised message form.) When I modified the default form
to create my custom form the sig text was already there.


Thanks for your help so far.
--


Chris.
Please remove MAPSON (NOSPAM backwards) to reply to me by email.

That's VBA code. You'd have to adapt it to VBScript by using the intrinsic
Item object to represent the message where you want the signature to appear,
removing the data typing (e.g. As String) from variable declarations, and
substituting literal values for Outlook constants (e.g. olFolderDrafts).

The problem, though, might just be with your signature file itself. Did you
check its HTML source? Or did you design the form with the signature as part
of the message?
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP]

You have to remove *all* data typing, not just that in the procedure declaration. Also if you want this script to affect the item created by your form, you don't want to create a new objMail item. Instead, use the intrinsic Item object that represents the item where the code is running and set its HTMLBody.

When I suggested looking at the HTML source, I meant in the nameofsig.htm file itself. But if you've design it into the form, you should be able to run the form, fix the hyperlink then republish. ALternately, run the form, remove the sig, republish and let your script do the work.

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
C

Chris Mitchell

Must admit most of what Sue says is like a foreign language to me at the
moment.

If someone could provide worked example or step by step dummies guide, or
point me in the direction of a good online beginners guide to VBScript I'd
be grateful.

I've done the same as I've done at home at work where things work OK, ie my
customised message form opens with hyperlinks etc all in place and in
working order, without any coding by me. Home is a standalone PC running
Win 98 and Outlook 2000 SP-3, work is a networked PC using Win 2000 (NT) and
Outlook 2000 Corporate or Workgroup in an exchange server environment.

Any explanation as to why one works OK and the other doesn't would be
appreciated.

--
Regards.

Chris.
Please remove MAPSON (NOSPAM backwards) to reply to me by email.

You have to remove *all* data typing, not just that in the procedure
declaration. Also if you want this script to affect the item created by your
form, you don't want to create a new objMail item. Instead, use the
intrinsic Item object that represents the item where the code is running and
set its HTMLBody.

When I suggested looking at the HTML source, I meant in the nameofsig.htm
file itself. But if you've design it into the form, you should be able to
run the form, fix the hyperlink then republish. ALternately, run the form,
remove the sig, republish and let your script do the work.

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top