CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2001
    Posts
    9

    problems with word object in vb program

    Hi guys,
    i am trying to create a word object in vb program and save it as .html and then close it..all in non-visual mode...but after saveas is done, when i try to call wdoc.close where wdoc is derived from Word.Application.Documents.Open(..)..the runtime is complaining that the the "property is not available as a document window is not active.." ...

    I am java programmer and donno what the hell is this message about...

    Any help is appreciate...urgent..

    Thanks


  2. #2
    Join Date
    Jan 2001
    Posts
    22

    Re: problems with word object in vb program

    I'm no VBA guru, but try re-setting your document object after you finish your .SaveAs command,
    use the .activedocuments
    There might be a problem with the .Open part also.. I always used the .Activedocument command.

    i.e.

    set mydoc = wordapp.activedocuments
    ' write stuff routine
    mydoc.SaveAs..blah blah

    set mydoc = wordapp.activedocuments
    mydoc.close


    Hope This helps


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured