Problems with Word-document from VB 
Author Message
 Problems with Word-document from VB

I have this problem:
I have a Word-dokument containing checkboxes.

In VB I want to do something like this:

For i = 1 To WordDoc.FormFields.Count
  If WordDoc.FormFields(i).Type = wdFieldFormCheckBox Then
     WordDoc.FormFields(i).CheckBox.Value = True
  End If

The Problem is that the code tells me that it is 79 checkboxes when
the dokument shows about 30 checkboxes. This is probably because
"Sp?ra ?ndringar" has been enabled. When the loop comes to a checkbox
thas has been removded I got an exception. To check if
Is Not Nothing does not work.

The question is: How do I get rid of all none valid checboxes or how do I
if an object is valid?

Tue, 02 Aug 2005 04:09:39 GMT  
 Problems with Word-document from VB


Are the FormFields in tables? If you have merged cells in the tables
there are problems accessing them like you do. I have not found any
solution to this problem yet.


Posted via

Tue, 02 Aug 2005 19:56:44 GMT  
 [ 2 post ] 

 Relevant Pages 

1. VB problem: sending a personalized Word document as a fax

2. Trouble Opening a Word Document with VB.NET,Open member not found in Documents

3. Cutting a full Word document and pasting it in another Word Document

4. accessing word document through using word com object

5. Print a Word document from VB and then Close Word

6. problem mailmerging a Word 95 document from Access 95

7. Word - Comparing Document Versions Problem

8. Delete macro from MS Word document - problem.

9. page problem in word document

10. Problems running macro via a word document

11. Outlook 2000 to Word 2000 document merge problem

12. problem with FollowHyperlink to a word document


Powered by phpBB® Forum Software