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 - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook form works on 2003 but not on 2000



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 12th 06, 02:37 PM posted to microsoft.public.outlook.program_forms
Christian Kjær
external usenet poster
 
Posts: 2
Default Outlook form works on 2003 but not on 2000

Hi all

I have designet an Outlook form in Outlook 2003 and it works very fine. But
when, I send it to my Outlook 2000 user it Only run some of the code. belov
I have postet the VBScript code. Can anybody se, what is wrong?

dim path

path = "J:\skabeloner\Outlook\Vikar\"

function startDokument(path)

dim objWord

dim objDoc

set objWord = createObject("Word.Application")

set objDoc = objword.documents.add(path)

objWord.visible = true


objWord.Selection.GoTo -1,,, "Fornavn"

objWord.Selection.TypeText
Item.UserProperties.item("FornavnTelefonscreening" ).value

on error resume next

objWord.Selection.GoTo -1,,, "Efternavn"

if err.number = 0 then

objWord.Selection.TypeText
Item.UserProperties.item("EfternavnTelefonscreenin g").value

objWord.Selection.GoTo -1,,, "Adresse"

objWord.Selection.TypeText
Item.UserProperties.item("AdrTelefonscreening").va lue

objWord.Selection.GoTo -1,,, "Postnummer"

objWord.Selection.TypeText
Item.UserProperties.item("PostnummerTelefonscreeni ng").value

objWord.Selection.GoTo -1,,, "By"

objWord.Selection.TypeText
Item.UserProperties.item("ByTelefonscreening").val ue

end if

on error goto 0

'Sidehoved og sidefod

objWord.ActiveWindow.ActivePane.View.SeekView = 9

objWord.Selection.MoveDown 5, 1

objWord.Selection.TypeText
Item.UserProperties.item("KontoTelefonscreening"). value

objWord.ActiveWindow.ActivePane.View.SeekView = 0

objWord.Selection.GoTo -1,,, "Kontor2"

objWord.Selection.TypeText
Item.UserProperties.item("KontoTelefonscreening"). value

objWord.Selection.GoTo -1,,, "Kontor3"

objWord.Selection.TypeText
Item.UserProperties.item("KontoTelefonscreening"). value

objWord.Selection.GoTo -1,,, "OprettetAf"

objWord.Selection.TypeText cStr(Item.UserProperties.item("Forfatter").value)

if Item.UserProperties.item("emailTelefonscreening"). value "" then

objWord.Selection.GoTo -1,,, "text"

objWord.Selection.TypeText "Inden samtalen vil jeg sende dig en test pr.
e-mail som du skal løse. Jeg sender dig testen på " &
Item.UserProperties.item("emailTelefonscreening"). value & "." & chr(13) &
chr(10) & "Har du ikke modtaget testen inden samtalen, skal du kontakte
mig."

else

objWord.Selection.GoTo -1,,, "text"

objWord.Selection.TypeText "I forbindelse med samtalen, vil du blive
præsenteret for en test I afd."

end if

dim txt

txt = Item.UserProperties.item("lblStart").value

txt = weekdayName(weekday(txt)) & " den " & cStr(formatdateTime(txt, 1))

objWord.Selection.GoTo -1,,, "Start"

objWord.Selection.TypeText txt

txt = timeValue(Item.UserProperties.item("lblStart").val ue)

objWord.Selection.GoTo -1,,, "tid"

objWord.Selection.TypeText cStr(txt)


objWord.Selection.GoTo -1,,, "Dato"

objWord.Selection.TypeText cStr(formatDateTime(Date, 1))



set objDoc = nothing

set objWord = nothing

end function

sub cmdBrevTilKandidat_click()

startDokument path & "Indkaldselsbrev.doc"

end sub

sub cmdMailTilKandidat_click()

startDokument path & "Indkaldselsmail.doc"

end sub



Any help would be appeciated.

Kind regards
Christian


Ads
  #2  
Old January 13th 06, 07:51 PM posted to microsoft.public.outlook.program_forms
Wolfram Jahn
external usenet poster
 
Posts: 12
Default Outlook form works on 2003 but not on 2000

Christian Kjær wrote:

Hi all

I have designet an Outlook form in Outlook 2003 and it works very fine. But
when, I send it to my Outlook 2000 user it Only run some of the code. belov
I have postet the VBScript code. Can anybody se, what is wrong?


In 2K3, you use

Item.UserProperties.item("PostnummerTelefonscreeni ng").value

In 2K you have to write

Item.UserProperties.find("PostnummerTelefonscreeni ng").value


You may want to

select case split(outlook.application.version,".")(0)
case 9
'2K stuff
case 11
'2K3 stuff
end select


You may further want to encapsulate this code so that you can write

p = getUserProperty(item,property)
setUserProperty item, property, value


HTH, Wolfram
  #3  
Old January 20th 06, 09:48 AM posted to microsoft.public.outlook.program_forms
Christian Kjær
external usenet poster
 
Posts: 2
Default Outlook form works on 2003 but not on 2000

Thaks for your help it worked.

Kind regards Christian

"Wolfram Jahn" wrote in message
...
Christian Kjær wrote:

Hi all

I have designet an Outlook form in Outlook 2003 and it works very fine.
But when, I send it to my Outlook 2000 user it Only run some of the code.
belov I have postet the VBScript code. Can anybody se, what is wrong?


In 2K3, you use

Item.UserProperties.item("PostnummerTelefonscreeni ng").value

In 2K you have to write

Item.UserProperties.find("PostnummerTelefonscreeni ng").value


You may want to

select case split(outlook.application.version,".")(0)
case 9
'2K stuff
case 11
'2K3 stuff
end select


You may further want to encapsulate this code so that you can write

p = getUserProperty(item,property)
setUserProperty item, property, value


HTH, Wolfram



 




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
Duplicate Contact Detection Outlook 2003 Custom Form [email protected] Outlook - Using Contacts 1 March 20th 06 03:02 PM
How Outlook 2003 Stssync works Pavel Shilov Outlook - Using Contacts 5 March 15th 06 04:21 PM
OL2003 - can you auto-fill a singel new contact form with online form data TimR Outlook - Using Contacts 1 February 15th 06 01:43 PM
Outlook opens Form as Email message, not Form [email protected] Outlook - General Queries 2 January 26th 06 09:54 PM
Problems sending attachments in Outlook 2003, but works through VNC Gavin Hanover Outlook - General Queries 0 January 26th 06 05:14 PM


All times are GMT +1. The time now is 02:32 PM.


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.