Results 1 to 6 of 6

Thread: No toolbar in word ????

  1. #1

    Thread Starter
    Addicted Member trasher's Avatar
    Join Date
    Jun 2001
    Location
    Quebec city, Qc, Canada
    Posts
    255

    Exclamation No toolbar in word ????

    My app is opening a specific word file with the object "word.application". But , I'm not able to make the word's toolbar visible...
    here:s my code

    Code:
    Set wrdApp = CreateObject("word.application")
    wrdApp.Documents.Open("FilePath")
    wrdApp.Application.ScreenUpdating = True
    wrdApp.Application.WindowState = wdWindowStateMaximize
    wrdApp.Application.Visible = True
    Set wrdApp = Nothing

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Maybe you could try using Shell or Shellexecute instead ?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    Addicted Member trasher's Avatar
    Join Date
    Jun 2001
    Location
    Quebec city, Qc, Canada
    Posts
    255
    I could,
    I was just wondering if it was a way to do it like this because my app will be implemented into several machines, and word isn't always in the same directory.

  4. #4

    Thread Starter
    Addicted Member trasher's Avatar
    Join Date
    Jun 2001
    Location
    Quebec city, Qc, Canada
    Posts
    255
    but what is the difference between Shell and ShellExecute ??

  5. #5
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Well to get the path I believe you can use this code or something similar.

    VB Code:
    1. Word.Application.Path

    And with ShellExecute, you can execute a given filename, and windows should open up the appropriate application for it
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  6. #6
    New Member
    Join Date
    Apr 2003
    Posts
    1
    If you are using Word97 then it is due to a bug. Solution to this problem is very simple

    Move the statement that sets the Visible property above the statement that sets the WindowState property

    Reference:

    http://support.microsoft.com/default...b;en-us;176866

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