Sue Mosher - Word template to print from a custom outlook form

G

Guest

I have created a business card request form and am using your example for sending information into a word document (from your book

I have got the form transferring the data, but only using the unsent original form
How do I change the coding to print the information on the sent (or read page)

I cannot work it out and there does not seem to be an explanation of why this is not working in your book

Thanks for any help
 
S

Sue Mosher [MVP-Outlook]

Did you publish the form? What is the state of the "send definition with
item" box on the Prpoerties page? Code doesn't run on unpublished or one-off
forms.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



sharon said:
I have created a business card request form and am using your example for
sending information into a word document (from your book)
I have got the form transferring the data, but only using the unsent original form.
How do I change the coding to print the information on the sent (or read page).

I cannot work it out and there does not seem to be an explanation of why
this is not working in your book.
 
S

Sharon Rutherford

I am sending form definition.
the form is in my personal library.

It is intended to be on the organizational library in the end, but I
want to test it before I publish it there.

Also in the code I have had to put:
find at the end of the colfields


sub fillfields(objdoc)
dim colfields
set colfields = objdoc.formfields
colfields("name").result = item.userproperties.find("name")
colfields("jobtitle").result = item.userproperties.find("jobtitle")
colfields("displayaddress").result =
item.userproperties.find("displayaddress")
colfields("sent").result = item.userproperties.find("sent")
set colfields = nothing
end sub

The actual coding works but only on the unsent initially filled in form
which is no good to me.

Let me know what you think

Thanks
 
S

Sue Mosher [MVP-Outlook]

That's the problem. Clear the "send form definition" box and republish.
Checking that box one-offs the form, which means it won't run code.

Also note: The newsgroup interface you are using apparently does not quote
earlier messages in the thread, making your latest message so short on
detail that you risk not getting the answer you're looking for. Please take
the time to quote the original message.
 

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