WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Displaying Section of Document in popup Form

 
   Home -> Office -> User Forms RSS
Next:  Problem with right indent in tables  
Author Message
Tony Starr

External


Since: Aug 12, 2007
Posts: 6



(Msg. 1) Posted: Thu Feb 21, 2008 3:09 am
Post subject: Displaying Section of Document in popup Form
Archived from groups: microsoft>public>word>vba>userforms (more info?)

Hi All,

I am trying to craete a userform in my word document, so that when the user
clicks on a button the form will appear displaying Appendix 1 (a section),
of the current document.
(The idea is that when a person is answering questions in the document, they
are supposed to read various appendices before answering the questions)
I was going to use a rtf control (RICHTX32.OCX) on my form but when I try
and add this to the user form I get the message "The subject is not trusted
for the specified action".

I tried using the DHTMLSafe control with the following code

pBookMark.Range.Sections(1).Range.Select
frmShowSchedule.txtNote.Text = Selection.Text

but the text was not displayed correctly.

Any suggestions?

TIA
Tony
Back to top
Login to vote
Tony Strazzeri

External


Since: Jan 02, 2008
Posts: 8



(Msg. 2) Posted: Mon Mar 24, 2008 3:32 pm
Post subject: Re: Displaying Section of Document in popup Form [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Tony,

I don't think this is easily done. The problem with the RTF control
is a known one. It is caused by MS trying to restrict the possibility
that thr control could be used to run malicious code. I have in fact
removed the use of the control from several template applications I
created for a client beause it the problem. Although there is a
workaround to allow thr RTF to note generate -it involves a registry
entry change-- the error, I was finding that the change was often
undone by many regular MS updates. The IT dept would roll something
out and not realise that it "broke" the fix and I would get people
complaining that my templates were broken. Anyway this does not
directly address your need.

Have you considered something along the lines of opening the document/
Appendix in a separate document/window?

The following code does this. You may need to play around with the
windows sizes and positions depending on the size of your display
hardware.

Hope this helps.

Cheers!
TonyS.

Dim thiswindow As Window
Set thiswindow = Application.ActiveWindow

NewWindow
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Appendix")
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute

Windows.Arrange ArrangeStyle:=wdTiled

Application.Resize Width:=540, Height:=678
Application.Move Left:=540, Top:=2

thiswindow.Activate
Application.Move Left:=0, Top:=0
Application.Resize Width:=540, Height:=675
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> User Forms All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET