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

Problem Printing Customized Outlook Form using Word Template



 
 
Thread Tools Search this Thread Display Modes
  #11  
Old January 31st 06, 11:40 AM posted to microsoft.public.outlook.program_forms
Martin
external usenet poster
 
Posts: 87
Default Problem Printing Customized Outlook Form using Word Template

In case it's helpful to anyone, this is what I used to deal with the problem
(in can be adapted for either option buttons or checkboxes):

For counter = 1 to intBkList
strField = Trim(objWord.ActiveDocument.Bookmarks(counter))
Set objPage =Item.GetInspector.ModifiedFormPages("Message")
Set objControl = objPage.Controls(strField)
strField1 = objControl.Value
If strField1 = True then
strField2 = "¤"
ElseIf strField1 = False then
strField2 = "¡"
Else
strField2 = strField1
End If
objWord.ActiveDocument.Bookmarks(strField).Range.T ext = Cstr(strField2)
Next

Forget option buttons/check boxes in Word: it's only being used for the
printout so make sure the correct areas of your template are formatted to
Wingdings and use this code to drop in the right symbol!


"ajkim001" wrote:

FYI~ I used the code and it works perfectly... )

"Sue Mosher [MVP-Outlook]" wrote:

You should to set the check box's Value property explictly, and the expression you set it to must be a True/False expression:

oDoc.FormFields("FieldName").CheckBox.Value = item.userproperties("FieldName")
--
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


"ajkim001" wrote in message ...
I created an OL form and used the Sub cmdPrint_Click code to print the form
data. I got the oDoc.FormFields ("FieldName").Result = item.userproperties
("FieldName") part working. However, I'm having trouble with the checkboxes
and radio buttons. I've tried using oDoc.FormFields("FieldName").CheckBox =
item.userproperties("FieldName") but it doesn't work. Maybe I'm missing
something or is there a different code that I need to use to transfer the
data to the Word template?

I hope someone has the answer to this. I've searched online and in Word and
Outlook books to no avail. Thank you!


Ads
  #12  
Old April 27th 06, 03:11 PM posted to microsoft.public.outlook.program_forms
Daniel Reyes
external usenet poster
 
Posts: 5
Default Problem Printing Customized Outlook Form using Word Template

I tried using that code but I get the following error - "MS Word: The
requested member of the collection does not exist.".

Daniel

-=-=-=-=-=-=-=

"ajkim001" wrote:

I created an OL form and used the Sub cmdPrint_Click code to print the form
data. I got the oDoc.FormFields ("FieldName").Result = item.userproperties
("FieldName") part working. However, I'm having trouble with the checkboxes
and radio buttons. I've tried using oDoc.FormFields("FieldName").CheckBox =
item.userproperties("FieldName") but it doesn't work. Maybe I'm missing
something or is there a different code that I need to use to transfer the
data to the Word template?

I hope someone has the answer to this. I've searched online and in Word and
Outlook books to no avail. Thank you!

  #13  
Old April 27th 06, 05:07 PM posted to microsoft.public.outlook.program_forms
Martin
external usenet poster
 
Posts: 87
Default Problem Printing Customized Outlook Form using Word Template

Hi Daniel

I'm assuming you're answering my message (but I may be wrong):

For counter = 1 to intBkList
strField = Trim(objWord.ActiveDocument.Bookmarks(counter))
....
objWord.ActiveDocument.Bookmarks(strField).Range.T ext = Cstr(strField2)
....

If you're getting the Word error message it must be to do with one of the
lines I've reproduced above. It could mean Word isn't finding the particular
bookmark so I guess your "counter" variable has reached a number for which
there's no equivalent index for a bookmark in the active document. Have you
set intBkList too high?

"Daniel Reyes" wrote:

I tried using that code but I get the following error - "MS Word: The
requested member of the collection does not exist.".

Daniel

-=-=-=-=-=-=-=

"ajkim001" wrote:

I created an OL form and used the Sub cmdPrint_Click code to print the form
data. I got the oDoc.FormFields ("FieldName").Result = item.userproperties
("FieldName") part working. However, I'm having trouble with the checkboxes
and radio buttons. I've tried using oDoc.FormFields("FieldName").CheckBox =
item.userproperties("FieldName") but it doesn't work. Maybe I'm missing
something or is there a different code that I need to use to transfer the
data to the Word template?

I hope someone has the answer to this. I've searched online and in Word and
Outlook books to no avail. Thank you!

  #14  
Old April 28th 06, 05:37 AM posted to microsoft.public.outlook.program_forms
Hollis Paul [MVP - Outlook]
external usenet poster
 
Posts: 138
Default Problem Printing Customized Outlook Form using Word Template

In article ,
=?Utf-8?B?RGFuaWVsIFJleWVz?= wrote:
I tried using that code but I get the following error - "MS Word: The
requested member of the collection does not exist.".

Take a look at this thread at www.outlookcode.com:

http://www.outlookcode.com/threads.a...essageid=16377
How to get at the values of user defined fields on a custom form?

Note Sue's comment: Sue Mosher 10-Feb-2006 06:48
Because UserProperties is for custom fields, not built-in fields. If you
have Outlook 2003, you can use ItemProperties for both.

Sue also has a page about the syntax for using fields in scripts, but I
can't find it today. You should try again later.

--
Hollis Paul
Mukilteo, WA USA


  #15  
Old April 28th 06, 10:26 AM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Problem Printing Customized Outlook Form using Word Template

That page is at http://www.outlookcode.com/d/propsyntax.htm

--
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

"Hollis Paul [MVP - Outlook]" wrote in message ...
In article ,
=?Utf-8?B?RGFuaWVsIFJleWVz?= wrote:
I tried using that code but I get the following error - "MS Word: The
requested member of the collection does not exist.".

Take a look at this thread at www.outlookcode.com:

http://www.outlookcode.com/threads.a...essageid=16377
How to get at the values of user defined fields on a custom form?

Note Sue's comment: Sue Mosher 10-Feb-2006 06:48
Because UserProperties is for custom fields, not built-in fields. If you
have Outlook 2003, you can use ItemProperties for both.

Sue also has a page about the syntax for using fields in scripts, but I
can't find it today. You should try again later.

--
Hollis Paul
Mukilteo, WA USA


  #16  
Old April 28th 06, 06:28 PM posted to microsoft.public.outlook.program_forms
Hollis Paul [MVP - Outlook]
external usenet poster
 
Posts: 138
Default Problem Printing Customized Outlook Form using Word Template

In article , Sue Mosher
[MVP-Outlook] wrote:
That page is at http://www.outlookcode.com/d/propsyntax.htm

Thank you, Sue. I searched on syntax and it never came up. I will go
read it and find a good keyword to use.

--
Hollis Paul
Mukilteo, WA USA


 




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
Calendar to Word Template LPS Outlook - Calandaring 4 March 6th 06 03:01 PM
Outlook Calendar to Word: Using the Olcalndr.dot Template LPS Outlook - Calandaring 0 March 2nd 06 04:25 PM
Automatically transfer contact details into a Word template TheDufster Outlook - Using Contacts 1 February 13th 06 06:01 PM
Outlook Printing Problem Brian C Outlook - Installation 0 January 24th 06 03:10 AM
How do you delete a customized form in Outlook? IT Trainer Outlook - Using Forms 1 January 10th 06 04:36 PM


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