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

Import into Custom form



 
 
Thread Tools Search this Thread Display Modes
  #11  
Old May 15th 07, 06:44 PM posted to microsoft.public.outlook.contacts
Kathleane
external usenet poster
 
Posts: 11
Default Import into Custom form

I found an answer! The Omsgclas.doc that MS published runs a macro that takes
care of converting previously imported contacts to the new default contact
form. It took a bit of working with as the instructions aren't very specific
but in the end it worked!

Thank you all for your help. I am especially glad to have been made aware of
the outlookcode site. I'll definately be using that and probably buying the
book.

"Sue Mosher [MVP-Outlook]" wrote:

Looks like lines 5 and 6 have been run together. Line 6 should be with Set AllItems = CurFolder.Items. Looks like a lot of other statements are also run together.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Kathleane" wrote in message ...
I ran into too many problems trying to use this script as a Macro. But I've
been working on the VBS script and have corrected all errors except this last
one which I can't figure out. When I run the script below I get the following
error mssg:
Expected End of Statement
Line No: 5

Here's the script:
Sub ImportToCustom()
' Change the following line to your new Message Class
NewMC = "IPM.Contact.SU Sitters"

Set CurFolder = Application.ActiveExplorer.CurrentFolder Set AlItems =
CurFolder.Items
NumItems = CurFolder.Items.Count

' Loop through all of the items in the folder
For I = 1 to NumItems Set CurItem = AllItems.Item(I)

' Test to see if the Message Class needs to be changed
If CurItem.MessageClass NewMC
Then Change the Message Class CurItem.MessageClass = NewMC

' Save the changed item
CurItem.Save End If Next MsgBox "Done."
End Sub

"Kathleane" wrote:

Would I use the same script that I received from the MS help site but copy it
into a macro?

Is naming my custom form using two words with a space between problematic?

"Sue Mosher [MVP-Outlook]" wrote:

If the form isn't published, it can't run your script. I'd suggest that you use a VBA macro rather than code behind a form, so that you have full use of the debgger.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Kathleane" wrote in message ...
I followed the instruction on the MS site to write a VBS script to solve this
problem but it didn't work. I'm sure there's some little thing that I haven't
done correctly. When I run the script nothing happens. No error mssg, just
nothing happens except that a new Mail message opens. BTW the custom form
that I'm trying to work with is a Contact form.

!'ve named my custom form
SU Sitters

It occurred to me that the problem could be that there is a space in my form
name. Anyway here is the VBS script that I'm trying to run:

Sub Item Open ' Change the following line to your new Message Class NewMC =
"IPM.Contact.SU Sitters" Set CurFolder =
Application.ActiveExplorer.CurrentFolder Set AlItems = CurFolder.Items
NumItems = CurFolder.Items.Count ' Loop through all of the items in the folder
For I = 1 to NumItems Set CurItem = AllItems.Item(I) ' Test to see if the
Message Class needs to be changed If CurItem.MessageClass NewMC Then '
Change the Message Class CurItem.MessageClass = NewMC ' Save the changed item
CurItem.Save End If Next MsgBox "Done." End Sub

Does anyone see where I could have gone wrong with this script?

One more detail - the custom form is stored in a different directory than
the VBS script. I tried to publish the VBS script to the same folder but it
saves instead to the MS Templates folder.

"Sue Mosher [MVP-Outlook]" wrote:

You would need to write your own import code or use a third-party tool. See http://www.outlookcode.com/article.aspx?id=23



"Kathleane" wrote in message ...
I'm using Office 2003. I created a custom contact form in Outlook and stored
it in a folder under Contacts. When I try to import my contacts from Access
and get to the part of the dialouge where I'm mapping, the fields on the
right are not from my custom form, they are from the default Outlook contacts
form. Does anyone know how I can import my table into my custom form?



Ads
  #12  
Old May 15th 07, 06:48 PM posted to microsoft.public.outlook.contacts
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Import into Custom form

Glad to hear you got it working -- and probably learned some useful things about OUtlook macros in the process.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Kathleane" wrote in message ...
I found an answer! The Omsgclas.doc that MS published runs a macro that takes
care of converting previously imported contacts to the new default contact
form. It took a bit of working with as the instructions aren't very specific
but in the end it worked!

Thank you all for your help. I am especially glad to have been made aware of
the outlookcode site. I'll definately be using that and probably buying the
book.

"Sue Mosher [MVP-Outlook]" wrote:

Looks like lines 5 and 6 have been run together. Line 6 should be with Set AllItems = CurFolder.Items. Looks like a lot of other statements are also run together.



"Kathleane" wrote in message ...
I ran into too many problems trying to use this script as a Macro. But I've
been working on the VBS script and have corrected all errors except this last
one which I can't figure out. When I run the script below I get the following
error mssg:
Expected End of Statement
Line No: 5

Here's the script:
Sub ImportToCustom()
' Change the following line to your new Message Class
NewMC = "IPM.Contact.SU Sitters"

Set CurFolder = Application.ActiveExplorer.CurrentFolder Set AlItems =
CurFolder.Items
NumItems = CurFolder.Items.Count

' Loop through all of the items in the folder
For I = 1 to NumItems Set CurItem = AllItems.Item(I)

' Test to see if the Message Class needs to be changed
If CurItem.MessageClass NewMC
Then Change the Message Class CurItem.MessageClass = NewMC

' Save the changed item
CurItem.Save End If Next MsgBox "Done."
End Sub

"Kathleane" wrote:

Would I use the same script that I received from the MS help site but copy it
into a macro?

Is naming my custom form using two words with a space between problematic?

"Sue Mosher [MVP-Outlook]" wrote:

If the form isn't published, it can't run your script. I'd suggest that you use a VBA macro rather than code behind a form, so that you have full use of the debgger.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Kathleane" wrote in message ...
I followed the instruction on the MS site to write a VBS script to solve this
problem but it didn't work. I'm sure there's some little thing that I haven't
done correctly. When I run the script nothing happens. No error mssg, just
nothing happens except that a new Mail message opens. BTW the custom form
that I'm trying to work with is a Contact form.

!'ve named my custom form
SU Sitters

It occurred to me that the problem could be that there is a space in my form
name. Anyway here is the VBS script that I'm trying to run:

Sub Item Open ' Change the following line to your new Message Class NewMC =
"IPM.Contact.SU Sitters" Set CurFolder =
Application.ActiveExplorer.CurrentFolder Set AlItems = CurFolder.Items
NumItems = CurFolder.Items.Count ' Loop through all of the items in the folder
For I = 1 to NumItems Set CurItem = AllItems.Item(I) ' Test to see if the
Message Class needs to be changed If CurItem.MessageClass NewMC Then '
Change the Message Class CurItem.MessageClass = NewMC ' Save the changed item
CurItem.Save End If Next MsgBox "Done." End Sub

Does anyone see where I could have gone wrong with this script?

One more detail - the custom form is stored in a different directory than
the VBS script. I tried to publish the VBS script to the same folder but it
saves instead to the MS Templates folder.

"Sue Mosher [MVP-Outlook]" wrote:

You would need to write your own import code or use a third-party tool. See http://www.outlookcode.com/article.aspx?id=23



"Kathleane" wrote in message ...
I'm using Office 2003. I created a custom contact form in Outlook and stored
it in a folder under Contacts. When I try to import my contacts from Access
and get to the part of the dialouge where I'm mapping, the fields on the
right are not from my custom form, they are from the default Outlook contacts
form. Does anyone know how I can import my table into my custom form?



  #13  
Old May 15th 07, 07:02 PM posted to microsoft.public.outlook.contacts
Kathleane
external usenet poster
 
Posts: 11
Default Import into Custom form

I did learn a lot. It's fun stuff. Frustrating sometimes, but mostly fun.
Thank you for your encouragement.

"Sue Mosher [MVP-Outlook]" wrote:

Glad to hear you got it working -- and probably learned some useful things about OUtlook macros in the process.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Kathleane" wrote in message ...
I found an answer! The Omsgclas.doc that MS published runs a macro that takes
care of converting previously imported contacts to the new default contact
form. It took a bit of working with as the instructions aren't very specific
but in the end it worked!

Thank you all for your help. I am especially glad to have been made aware of
the outlookcode site. I'll definately be using that and probably buying the
book.

"Sue Mosher [MVP-Outlook]" wrote:

Looks like lines 5 and 6 have been run together. Line 6 should be with Set AllItems = CurFolder.Items. Looks like a lot of other statements are also run together.



"Kathleane" wrote in message ...
I ran into too many problems trying to use this script as a Macro. But I've
been working on the VBS script and have corrected all errors except this last
one which I can't figure out. When I run the script below I get the following
error mssg:
Expected End of Statement
Line No: 5

Here's the script:
Sub ImportToCustom()
' Change the following line to your new Message Class
NewMC = "IPM.Contact.SU Sitters"

Set CurFolder = Application.ActiveExplorer.CurrentFolder Set AlItems =
CurFolder.Items
NumItems = CurFolder.Items.Count

' Loop through all of the items in the folder
For I = 1 to NumItems Set CurItem = AllItems.Item(I)

' Test to see if the Message Class needs to be changed
If CurItem.MessageClass NewMC
Then Change the Message Class CurItem.MessageClass = NewMC

' Save the changed item
CurItem.Save End If Next MsgBox "Done."
End Sub

"Kathleane" wrote:

Would I use the same script that I received from the MS help site but copy it
into a macro?

Is naming my custom form using two words with a space between problematic?

"Sue Mosher [MVP-Outlook]" wrote:

If the form isn't published, it can't run your script. I'd suggest that you use a VBA macro rather than code behind a form, so that you have full use of the debgger.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Kathleane" wrote in message ...
I followed the instruction on the MS site to write a VBS script to solve this
problem but it didn't work. I'm sure there's some little thing that I haven't
done correctly. When I run the script nothing happens. No error mssg, just
nothing happens except that a new Mail message opens. BTW the custom form
that I'm trying to work with is a Contact form.

!'ve named my custom form
SU Sitters

It occurred to me that the problem could be that there is a space in my form
name. Anyway here is the VBS script that I'm trying to run:

Sub Item Open ' Change the following line to your new Message Class NewMC =
"IPM.Contact.SU Sitters" Set CurFolder =
Application.ActiveExplorer.CurrentFolder Set AlItems = CurFolder.Items
NumItems = CurFolder.Items.Count ' Loop through all of the items in the folder
For I = 1 to NumItems Set CurItem = AllItems.Item(I) ' Test to see if the
Message Class needs to be changed If CurItem.MessageClass NewMC Then '
Change the Message Class CurItem.MessageClass = NewMC ' Save the changed item
CurItem.Save End If Next MsgBox "Done." End Sub

Does anyone see where I could have gone wrong with this script?

One more detail - the custom form is stored in a different directory than
the VBS script. I tried to publish the VBS script to the same folder but it
saves instead to the MS Templates folder.

"Sue Mosher [MVP-Outlook]" wrote:

You would need to write your own import code or use a third-party tool. See http://www.outlookcode.com/article.aspx?id=23


"Kathleane" wrote in message ...
I'm using Office 2003. I created a custom contact form in Outlook and stored
it in a folder under Contacts. When I try to import my contacts from Access
and get to the part of the dialouge where I'm mapping, the fields on the
right are not from my custom form, they are from the default Outlook contacts
form. Does anyone know how I can import my table into my custom form?




 




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 get a .csv file to import into a custom Contact Form? chunnel Outlook - Using Contacts 4 March 7th 07 01:34 AM
import excel ranged data into an outlook CUSTOM contacts form? sjmay1973 Outlook - Using Contacts 2 May 25th 06 09:19 AM
Emailing a contact vCard with custom form loses all custom info Kim Outlook - Using Contacts 7 April 27th 06 12:21 AM
New PC Import Problems with Custom Form Hal Outlook - Using Forms 5 March 4th 06 09:28 AM
Import from excel into a custom form and fields in Contacts John Outlook - Using Contacts 1 February 1st 06 02:37 PM


All times are GMT +1. The time now is 09:26 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.