Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0301· OpenAIAi2 WildChat-4.8M (AI2)

In the following code, I want the word document when opened to be on top of all other…

  1. User

    In the following code, I want the word document when opened to be on top of all other application - Dim wordApp As Object Set wordApp = CreateObject("Word.Application") Dim doc As Object Set doc = wordApp.Documents.Open("G:\Shared drives\Swan School Site Premises\PREMISES MANAGEMENT\SERVICE PROVIDERS\Request2.docx") wordApp.Visible = True doc.Activate 'Set focus to the open Word document

  2. Assistant

    'Activate Word and bring to front wordApp.Activate
    wordApp.WindowState = 1 'minimize all other windows wordApp.WindowState = 2 'maximize Word window