Solved

An error occurred while loading 'ThisDocument'. Do you want to continue loading the project?

Posted on 2004-03-24
22
1,502 Views
Last Modified: 2012-05-04
Hi,

I get the above error. Have tried everything that I can find. Does anyone have any suggestions?
One suggestion was to remove the Acrobat toolbar, which works fine. However, the internal application I use calls Word, and I still get the error.

Thanks,
AK
0
Comment
Question by:andrew_kerr
  • 8
  • 8
  • 5
22 Comments
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 10667205
There is probably a macro in your normal.dot that is causing this.  Try deleting/renaming all instances of normal.dot and see if you get the same error message.

Also trying running Word with the /a switch so your add-ins don't load.

0
 
LVL 11

Expert Comment

by:Joseph O'Loughlin
ID: 10672930
Hi Andrew
Are you using a Web browser, MS Project, MS WinWord or are you using VBA to automate a task?
If the problem is with just one document, open Word, and instead of File, Open, use Insert, File to open the file (having turned on Confirm Conversions at Open in Tools, Options within WinWord).  

If the document opens OK resave it with an new name, you may have lost the fonts or embedded objects that caused the problem.
Best of luck.
0
 

Author Comment

by:andrew_kerr
ID: 10685329
Thanks guys.

Have tried the normal.dot trick, but it didn't help.
The /a switch does work, however, this will require major re-programming of the app we use. :(

We are using VBA to automate a task.
We tried the Insert -> File, and then works well. However, the document formatting changes a little in some instances.
0
 
LVL 11

Expert Comment

by:Joseph O'Loughlin
ID: 10690304
What Insert File is doing is going through the multiple streams in the original document and simplifying it for the target document into fewer streams.

Is a conversion happening, say from wd97 to 2k?

If you're default printer is a hp or PCL printer the Ariel font will be narrower.  If yhe task is to create a PDF, having a postscript printer driver as the default would be best.  If the final format is html, then as the layout will need to be browser netural the loss of formatting should not be a problem.

There may be objects in the file which word on it's own can not make sense of.  The way the clipboard works is that each open application registers the formats it can accept with it.  So having Corel Graphics open in the background gives me more options in Paste Special... in Word.

It could be that some of your macro, or that behind an addin, is for a previous office or vba version.
See for example this paq
http://Q_10361877.html

I agree with JOrzech; There is probably a macro in your normal.dot that is causing this, or perhaps a macro in the automated doc.

If we have not answered the question can you provide the steps and objective of you're task to see if we are missing a trick?
0
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 10690880
You say:
We tried the Insert -> File, and then works well. However, the document formatting changes a little in some instances

You may want need to copy styles over from the original document to the new document.  You can use organizer to do this.  I usually go to Tools, Templates and Addins, Organizer, and copy the styles from the original problem document to the new inserted file document.

Just one more thing to think about!
0
 

Author Comment

by:andrew_kerr
ID: 10818963
Thanks guys. Just one more. Is there anyway to open an instance of Word in code that simulates the functionality of "-a".
0
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 10819147
What do want to do?  I'm not going to assume I know what the -a switch does...let's clarify.  Thanks andrew_kerr
0
 

Author Comment

by:andrew_kerr
ID: 10819178
Sorry. I meant the "/a" switch. We would like to open Word without any of the addins loading, as this appears to be the best way to get around this problem.
0
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 10819200
0
 

Author Comment

by:andrew_kerr
ID: 10819279
Getting there. :) What we're having trouble with is invoking these paramaters when creating an instance of Word in code.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 10819315
You're loading Word via VBA?
0
 

Author Comment

by:andrew_kerr
ID: 10819322
Correct. :)
0
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 10819344
I'll have to get back to you tomorrow...have a rush job tonight....so sorry.  Look up shell execute though...something like that.  I can't give you exact details.

What are you trying to run from?  Desktop?  Tomorrow then...
0
 

Author Comment

by:andrew_kerr
ID: 10820361
Can't use shell execute.  I need to create an instance of Word within my application.
 
It is done like this:
 
Dim Word As New Word.Application
Dim WordDoc As Word.Document

WordDoc = Word.Documents.Open("c:\mydoc.doc")

I need to apply the functionality of the "/a" command line parameter to the above code.

That's what I have got from my programmers. Any help would be great. Thanks.
0
 
LVL 11

Expert Comment

by:Joseph O'Loughlin
ID: 10820868
Why not, instead of opening a document, open a template, extention dot?
0
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 10968246
andrew_kerr

Anything new here?  Are you still experiencing this problem or has it been resolved?
0
 

Author Comment

by:andrew_kerr
ID: 10971134
Still experiencing the problem. :(
0
 
LVL 11

Expert Comment

by:Joseph O'Loughlin
ID: 10971228
What's in Word's startup directory?
0
 

Author Comment

by:andrew_kerr
ID: 10983834
Startup directory is empty. This would have to be the most tedious problem we have ever encountered.. :)
0
 
LVL 11

Expert Comment

by:Joseph O'Loughlin
ID: 10989110
I suspect that you'll need to step line by line through you're code.
I can see how troubleshooting this will be difficult, as to invoke the VBA editor, a document needs to be opened.  You're macro could be making the assumption that it is when it's not.  You may have to add lines to create FILE1 instead of the DOC1 that is not there and in code select or activate it.  If you have a company template this may be the file to use.
I take it that the Acrobat toolbar is a WLL or DLL addin?
0
 
LVL 37

Accepted Solution

by:
Joanne M. Orzech earned 400 total points
ID: 11025587
as atheist suggested - why not make the document a template?  You could use this code to create a new document in your app:

Documents.Add Template:=Options.DefaultFilePath(wdUserTemplatesPath) & "\MYDOC.DOT", newtemplate:=False
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now