Thanks for the follow up Sue. I am not sure what settings you are speaking
of. We have OL007 and Exchange 07 as well. What I did was chose developer
tab>Chose Design this form>View Code. I edited the code and closed the
script editor window. then I chose Publish this form. Not sure if I should
just publish form or publish form as and browse to folder in public folders.
The form is supposed to fill in some of the fields from the address book but
it only seems to work for me. It should show the user's name, division and
phone number wehn they open the form but it only shows the user name
correctly. When I login it shows my info corect. Here is the code behind
the form :
'**********************************************************************
'* PROCEDURE: SetDefaultFields
'* DESCRIPTION: Populate employee fields on the form with information
'* retrieved about the user from the address book.
'***********************************************************************
Sub SetDefaultFields()
On Error Resume Next
Set user = olemsession.CurrentUser
'PR_DISPLAY_NAME
item.userproperties.find("ContactPerson") = user.Name
'PR_DIVISION / DEPARTMENT_NAME
item.userproperties.find("Division") = user.Fields.item(&h3a18001e)
'PR_BUSINESS_TELEPHONE_NUMBER
item.userproperties.find("ContactPhone") = user.Fields.item(&h3a08001e)
end sub
Sorry but I am not sure how I screwed this up, and why it seems to only work
on my OL profile.
I even tried clearing all my information in the but would always get the
message that one or more nec fields was blank, so I am out of ideas.
"Sue Mosher [MVP]" wrote:
> Did you publish the form to the Organizational Forms library with the "send
> form definition with item" box on the (Properties) page unchecked? Those are
> requirement.
>
> --
> Sue Mosher, Outlook MVP
> Author of Microsoft Outlook 2007 Programming:
> Jumpstart for Power Users and Administrators
> http://www.outlookcode.com/article.aspx?id=54
>
>
> "Nat" <(E-Mail Removed)> wrote in message
> news:01CE2383-256C-46A2-A36D-(E-Mail Removed)...
> > Thanks a lot Sue,
> >
> > I have added teh code, adn then I published the form ,and wehn I closed it
> > asked If I wanted to save. I said Yes, but now when I open the form and
> > click
> > on either of the custom buttons they do not work. did I miss a step, or
> > do I
> > just need to wait a bit for Exchange server to see the updated form?
> > Thanks
> > again.
> >
> > "Sue Mosher [MVP]" wrote:
> >
> >> myitem.Cc = "(E-Mail Removed);(E-Mail Removed)"
> >>
> >> "Nat" <(E-Mail Removed)> wrote in message
> >> news:2521862B-750E-4910-BBC8-(E-Mail Removed)...
> >> > Excuse me for my ignorance, however I am no programmer. Someone
> >> > contacted
> >> > me
> >> > becuase we have a custom form created, and when they click a link on
> >> > that
> >> > form, it generates an email to one of our users. They would like to
> >> > include
> >> > additional addresses in teh CC field. I viewed the code behind the
> >> > form
> >> > and
> >> > this is what I found
> >> > Sub CommandButton1_Click
> >> >
> >> >
> >> > set MyItem = Application.CreateItem(0)
> >> > myitem.to = " Joe Schmoe"
> >> > myitem.subject = "Bulletin Board Meeting Notice"
> >> > myitem.Body = "This is a request for the following meeting to be
> >> > displayed
> >> > on the electronic bulletin board: " & chr(10) & chr(10) & " " &
> >> > userproperties.find("MeetingTitle").value & chr(10)& chr(10)& "The
> >> > meeting
> >> > will be held on: " & userproperties.find("calcdate").value & " from "
> >> > &
> >> > userproperties.find("calcstarttime").value & " to " &
> >> > userproperties.find("calcendtime").value & chr(10) & Chr(10) & "The
> >> > meeting
> >> > location is: Conference Room " & userproperties.find("ConfRoom").value
> >> > &
> >> > "."
> >> > & chr(10) & chr(10) & "Please contact " &
> >> > userproperties.find("ContactPerson").value & ", " &
> >> > userproperties.find("Division").value & ", at " &
> >> > userproperties.find("ContactPhone").value & " for more information."
> >> > Myitem.display
> >> >
> >> > item.userproperties("BulletinMessageSent").value = "True"
> >> > item.save
> >> > End Sub
> >> >
> >> > My guess is that the myitem.to="Joe Schmoe" is where I want to start,
> >> > however I am not positive how to add another user but as a CC, or if I
> >> > just
> >> > have to add addl users on the same line.
> >> >
> >> > Any help would be greatly appreciated.
> >>
> >>
> >>
>
>
>