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

Try to Print - Error that form is corrupted.



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 25th 06, 11:11 PM posted to microsoft.public.outlook.program_forms
Daniel Reyes
external usenet poster
 
Posts: 5
Default Try to Print - Error that form is corrupted.

I have a custom form tracks requests on converting data fromone format to
another format. Several people will send the form to three operators that
will convert the data. (including me), and we want to be able to print the
request. I have created a word template, added the bookmarks, unchecked the
"Send form definition with item" box on the Properties tab.

When I click the Print button, I'm getting this error “Word was unable to
read this document. It may be corrupt". We have tried to repair, use a text
converter and rewrite the template from scratch. Using Exchagne 5.5, MS
Office 2003 SP3.

The error I get keeps coming up on line 18.

1Sub cmdBookmarks_Click()
2 Dim strTemplate
3 Dim objWord
4 Dim objDocs
5 Dim newDoc
6 Dim PageRange
7 Dim strField
8 Dim strField1
9 Dim mybklist
10 Dim counter
11 Set objWord = CreateObject("Word.Application")
12 ' Put the name of your Word template that contains the bookmarks
13 strTemplate = "PCConversion2.dot"
14
15 ' Location of Word template; could be on a shared LAN
16 strTemplate = "\\atabase$\test\dragon\" & strTemplate
17
18 Set objDocs = objWord.Documents
19 Set newDoc = objDocs.Add(strTemplate)
20 Set mybklist = newDoc.Bookmarks
21
22 For counter = 1 To mybklist.Count
23 strField = mybklist(counter)
24 strField1 = Item.UserProperties.Find(strField).Value
25 If strField1 = True Then
26 strField1 = "Yes"
27 ElseIf strField1 = False Then
28 strField1 = " "
29 End If
30 mybklist(counter).Range.Text = CStr(strField1)
31 Next counter
32
33 newDoc.PrintOut Background:=True
34 objWord.Quit SaveChanges:=False
35End Sub


 




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
Publishing Outlook Form Error? [email protected] Outlook - Using Forms 1 April 6th 06 11:30 PM
How do I print a custom form to look like design view layout? trufftwink Outlook - Using Forms 2 March 30th 06 04:58 PM
Publishing Outlook Form Error? BigFoot Outlook - Using Forms 0 March 20th 06 02:41 PM
Can't Print - Library Not Found - Error Code 0 Bill Wolcott Outlook Express 3 March 10th 06 11:21 AM
Print Error in Outlook Express jon Outlook Express 3 February 22nd 06 02:04 PM


All times are GMT +1. The time now is 05:59 AM.


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.