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

Tags: , , , ,

Try to Print - Error that form is corrupted.





 
 
Thread Tools Display Modes
  #1  
Old April 26th 06, 12:11 AM 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


Ads
 




Thread Tools
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? hi.peter.choi@gmail.com Outlook - Using Forms 1 April 7th 06 12:30 AM
How do I print a custom form to look like design view layout? trufftwink Outlook - Using Forms 2 March 30th 06 05:58 PM
Publishing Outlook Form Error? BigFoot Outlook - Using Forms 0 March 20th 06 03:41 PM
Can't Print - Library Not Found - Error Code 0 Bill Wolcott Outlook Express 3 March 10th 06 12:21 PM
Print Error in Outlook Express jon Outlook Express 3 February 22nd 06 03:04 PM


All times are GMT +1. The time now is 08:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Online Advertising - Problem Mortgage - Credit Counseling - Myspace Layouts - Web Advertising