Advertisement

04.17.2007 at 12:17AM PDT, ID: 22515469
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

4.0

Using Word Styles in VB.NET program with late binding

Asked by paix120 in Microsoft Office Suite, .NET, Microsoft Word

Tags: ,

I am creating a VB.NET program that exports a Word document. I've been told that I should use late binding to have a better chance of the code being compatible with various Word versions. My current trouble is with styles. I can export text in both Word 2002/XP and Word 2007, but when I try to implement styles, i get several errors.

Right now, I have these declarations

    Dim myWordDoc As Object
    Dim myWordApp As Object
    Dim myHeaderStyle As Object

Then this in my constructor

        myWordApp = CreateObject("Word.Application")
        myWordDoc = CreateObject("Word.Document")
        myHeaderStyle = myWordDoc.Styles("Normal")

        myWordDoc = myWordApp.Documents.Add
        myWordApp.Visible = True

Then later,

                myWordApp.Selection.TypeParagraph()
                myWordApp.Selection.TypeParagraph()
                myWordApp.selection.style = myHeaderStyle
                myWordApp.Selection.TypeText(ModuleName)

I kind of guessed on the

        myHeaderStyle = myWordDoc.Styles("Normal")

line, but I guess it is working. I am getting an error on the .selection.style line that says:

        COMException was unhandled - 'Style' is not a by reference property.

So..... how do I deal with styles when using late binding?? Help!

Please let me know if I need to clarify more. Thanks in advance!

Start Free Trial
[+][-]04.17.2007 at 01:45AM PDT, ID: 18922914

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.17.2007 at 11:23AM PDT, ID: 18926356

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.17.2007 at 11:24AM PDT, ID: 18926369

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.17.2007 at 11:58AM PDT, ID: 18926616

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.17.2007 at 12:09PM PDT, ID: 18926693

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.17.2007 at 12:40PM PDT, ID: 18926890

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.17.2007 at 01:23PM PDT, ID: 18927196

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.17.2007 at 02:53PM PDT, ID: 18927818

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.19.2007 at 12:38AM PDT, ID: 18937277

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.19.2007 at 12:50AM PDT, ID: 18937304

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.19.2007 at 12:56AM PDT, ID: 18937318

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.19.2007 at 01:24AM PDT, ID: 18937410

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.19.2007 at 01:24AM PDT, ID: 18937412

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.19.2007 at 02:23AM PDT, ID: 18937610

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.19.2007 at 07:43PM PDT, ID: 18943845

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Office Suite, .NET, Microsoft Word
Tags: word, reference
Sign Up Now!
Solution Provided By: paix120
Participating Experts: 1
Solution Grade: A
 
 
[+][-]04.19.2007 at 07:50PM PDT, ID: 18943864

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.20.2007 at 12:19AM PDT, ID: 18944656

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.20.2007 at 06:35AM PDT, ID: 18946202

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]04.20.2007 at 09:17AM PDT, ID: 18947564

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.20.2007 at 10:06AM PDT, ID: 18948012

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]04.20.2007 at 10:23AM PDT, ID: 18948114

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.20.2007 at 11:25AM PDT, ID: 18948524

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]04.20.2007 at 11:32AM PDT, ID: 18948572

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.21.2007 at 12:43AM PDT, ID: 18951027

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.21.2007 at 01:37AM PDT, ID: 18951124

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.2007 at 09:45PM PDT, ID: 18956299

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44