Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 04-01-2011, 03:11 PM
macropod's Avatar
macropod macropod is offline Setting focus to specific word document from UserForm Windows 7 32bit Setting focus to specific word document from UserForm Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,516
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi SaneMan,

Without seeing your code, it's hard to say exactly what the issues are. I would have thought that, if you correctly substituted 'ThisDocument' or the 'DocFrm' calls for 'ActiveDocument', everything would have worked the same as it did before. In my testing with the original code, the only thing that causes the DocFrm document to re-appear of its own accord is maximising another document you might have opened over it, then closing that document.

As for:
Quote:
using this code stops the letters from appearing in a new document as I assume they are not visible along with the DocFrm
I have no trouble opening, displaying & editing another document whilst the one containing the userform (which I'm running in modeless state) is hidden and the useform is visible.

Equally, it shouldn't be necessary to have the document visible to update it through code (eg I have some test code to update bookmarks in the document and it works fine when the document's not visible). I do accept though that, if you hide a userform attached to an invisible document, regaining access to the userform would be problematic - you'd need the 'hide' code to activate another small form with a button to restore the original one.

Finally, regarding:
Quote:
Is there a way of creating a maco so that when you activate the the word document (by clicking it from the task bar once the form is minimized) it automatically shows the form?
I imagine you could create a class module and use the 'Public WithEvents wdApp As Word.Application' declaration to give you access to the Window Activation, etc events, but I have no experience with coding for those events.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook userform validation help aiwnjoo Outlook 0 12-08-2010 12:57 AM
Setting focus to specific word document from UserForm Checkbox on Userform result in Text in Word Dolfie_twee Word VBA 1 06-22-2010 07:54 AM
Create Hyperlinks from Word to specific location in PDF sukanyae Word 0 02-25-2010 04:08 PM
Help with forms (shifting focus) jrh312 Word 0 11-19-2009 12:59 PM
[Word 2003] Macro's and a UserForm xanuex Word VBA 0 10-19-2009 05:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft