The object browser (F2 in VBA) is your friend. If you look at the Document
object in the Word library, you'll see that it has no Display method, but it
does have an Activate method and Window.Visible property.
You might want to show enough of your code so we can see how you're creating
the document and printing it. Please DO NOT show all the code for filling
the fields; as you said, it's clear that's working.
Sue Mosher
"Lori_CB" <LoriCB> wrote in message
news:E86D1E0A-899C-45A0-9F97-5A6FC0E10842@microsoft.com...
> We have XP Professional, so I'm hoping to get it back. It's another thing
> that stopped working after the upgrade. There must be something to tweak.
> I did a message box for the Outlook field value and for the Word field
> value. Both were correct.
> I changed oDoc.PrintOut to oDoc.Display and got the following error
> message:
> "Object doesn't support this property or method: 'oDoc.Display'"
> Should I be changing something else too?
> Thanks for all your help and patience.
> "Sue Mosher [MVP]" wrote:
>
> > Script debugger is an optional component that may not have been
> > installed;
> > it definitely won't work on Vista unless you also have Visual Studio.
> > That's why I suggested using MsgBox statements.
>
>> What do you mean by "the fields are getting filled in properly" -- the
> > fields in the Outlook item or the fields in the Word document? What
> > happens
> > if you change the code so that the Word document displays instead of
> > being
> > printed?
> > > > Sue Mosher
> > >> >> >
>
>> "Lori_CB" <LoriCB> wrote in message
> > news:255A6EC0-494E-42BE-BA8E-DA73C0556BE2@microsoft.com...
> > >I tried the msgbox and the fields are getting filled in properly.
> >> > When I try to use the Script Debugger, it says the feature is not
> > > available
> > > and to run setup again. I'm waiting for a reply from our Help Desk.
> >> > "Sue Mosher [MVP]" wrote:
> >> >> Did you try what I suggested? Or run the code in the script debugger?
> > >
>> >> "Lori_CB" <LoriCB> wrote in message
> > >> news:203C0444-F9F5-41E6-A3BC-917081E88651@microsoft.com...
> > >> > The code is for the Print button on the Outlook form. It's used to
> > >> > open
> > >> > Word, populate the Word fields, print the document and close Word.
> > >>> >> > "Sue Mosher [MVP]" wrote:
> > >>> >> >> Code in a print button on the form or in Word? You may want to add
> > >> >> MsgBox
> > >> >> statements to the code to help you see how it's branching and
> > >> >> executing.
> > >> >
>> >> >> "Lori_CB" <Lori_CB> wrote in message
> > >> >> news:722B9CAD-754D-435D-B2DB-3960654B6CD6@microsoft.com...
> > >> >> > We created multiple Outlook forms that print to Word templates
> > >> >> > via
> > >> >> > code
> > >> >> > in
> > >> >> > a
> > >> >> > Print button. The forms were created in 2003. We recently
> > >> >> > upgraded
> > >> >> > to
> > >> >> > 2007.
> > >> >> > Now, when we click the button, the Word template prints but it
> > >> >> > doesn't
> > >> >> > contain the information from the form.
>
>
>>