Group:  Microsoft Word ยป microsoft.public.word.vba.beginners
Thread: Help please with option buttons

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Help please with option buttons
"vandaley" <yossisp[ at ]nice.com> 11.07.2006 18:21:31
Hi,

I need to create option buttons in a user form in VBA word.

When the user clicks the option button it will add a piece of text with
screen shots to the document and then when following the wizard (user
form) more text and screen shots will be added when clicking certain
option buttons.

I've tried inserting autotext to bookmarks but the screen shots are not
added (i get an error in the document).

Any ideas?

Thanks,

Re: Help please with option buttons
Jay Freedman <jay.freedman[ at ]verizon.net> 11.07.2006 19:46:50
I might be able to help if I had any idea what you're already trying
and what error it's causing. To try to get the right information, here
are some questions that occur to me:

1. What version of Word are you using? And what version(s) do you
expect others to use when they work with your userform?

2. When you say "userform", do you really mean what Word calls a
userform, a custom dialog designed in the VBA editor? (Lots of people
mistakenly refer to a protected form, using controls from the Forms
toolbar in the body of a document, as a "userform".)

3. What code do you have now?

4. Where do the inserted screen shots come from? Are they saved in
graphic-format files on disk (.jpg, .gif, .bmp?) or are they only on
the clipboard at the time the macro executes?

5. Are you inserting the screen shots into bookmarks? Or are you
trying to insert them into form fields which have "bookmarks" as
names?

6. What is the *exact* text of the error that occurs?

7. If necessary, would you be willing to send me a copy of your
template?

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On 11 Jul 2006 11:21:31 -0700, "vandaley" <yossisp[ at ]nice.com> wrote:

[Quoted Text]
>Hi,
>
>I need to create option buttons in a user form in VBA word.
>
>When the user clicks the option button it will add a piece of text with
>screen shots to the document and then when following the wizard (user
>form) more text and screen shots will be added when clicking certain
>option buttons.
>
>I've tried inserting autotext to bookmarks but the screen shots are not
>added (i get an error in the document).
>
>Any ideas?
>
>Thanks,
Re: Help please with option buttons
"Dave Lett" <davelett[ at ]NOaolSPAM.com> 11.07.2006 19:55:02
Answered in microsoft.public.word.vba.general, I think. Please don't cross
post. If you have autotext that isn't inserting images, then I'm thinking
that you have set the RichText argument to True.

Dave

"vandaley" <yossisp[ at ]nice.com> wrote in message
news:1152642091.638213.62000[ at ]35g2000cwc.googlegroups.com...
[Quoted Text]
> Hi,
>
> I need to create option buttons in a user form in VBA word.
>
> When the user clicks the option button it will add a piece of text with
> screen shots to the document and then when following the wizard (user
> form) more text and screen shots will be added when clicking certain
> option buttons.
>
> I've tried inserting autotext to bookmarks but the screen shots are not
> added (i get an error in the document).
>
> Any ideas?
>
> Thanks,
>


Re: Help please with option buttons
"Greg Maxey" <gmaxey[ at ]mvps.org> 11.07.2006 20:05:16
Dave,
.....then I'm thinking that you have set the RichText argument to True.

That could be my fault as I suggested in the userform group:

Private Sub OptionButton1_Click()
ActiveDocument.AttachedTemplate.AutoTextEntries("Test").Insert _
Where:=ActiveDocument.Bookmarks("Test").Range, RichText:=True
End Sub

I didn't test with an actual screen shot image (just text as the
AutoText).


Dave Lett wrote:
[Quoted Text]
> Answered in microsoft.public.word.vba.general, I think. Please don't cross
> post. If you have autotext that isn't inserting images, then I'm thinking
> that you have set the RichText argument to True.
>
> Dave
>
> "vandaley" <yossisp[ at ]nice.com> wrote in message
> news:1152642091.638213.62000[ at ]35g2000cwc.googlegroups.com...
> > Hi,
> >
> > I need to create option buttons in a user form in VBA word.
> >
> > When the user clicks the option button it will add a piece of text with
> > screen shots to the document and then when following the wizard (user
> > form) more text and screen shots will be added when clicking certain
> > option buttons.
> >
> > I've tried inserting autotext to bookmarks but the screen shots are not
> > added (i get an error in the document).
> >
> > Any ideas?
> >
> > Thanks,
> >

Re: Help please with option buttons
"Dave Lett" <davelett[ at ]NOaolSPAM.com> 11.07.2006 20:35:41
Hi Greg,

Just tested the code you provided and it works fine with an image.

Dave

"Greg Maxey" <gmaxey[ at ]mvps.org> wrote in message
news:1152648315.960739.89170[ at ]p79g2000cwp.googlegroups.com...
[Quoted Text]
> Dave,
> ....then I'm thinking that you have set the RichText argument to True.
>
> That could be my fault as I suggested in the userform group:
>
> Private Sub OptionButton1_Click()
> ActiveDocument.AttachedTemplate.AutoTextEntries("Test").Insert _
> Where:=ActiveDocument.Bookmarks("Test").Range, RichText:=True
> End Sub
>
> I didn't test with an actual screen shot image (just text as the
> AutoText).
>
>
> Dave Lett wrote:
>> Answered in microsoft.public.word.vba.general, I think. Please don't
>> cross
>> post. If you have autotext that isn't inserting images, then I'm thinking
>> that you have set the RichText argument to True.
>>
>> Dave
>>
>> "vandaley" <yossisp[ at ]nice.com> wrote in message
>> news:1152642091.638213.62000[ at ]35g2000cwc.googlegroups.com...
>> > Hi,
>> >
>> > I need to create option buttons in a user form in VBA word.
>> >
>> > When the user clicks the option button it will add a piece of text with
>> > screen shots to the document and then when following the wizard (user
>> > form) more text and screen shots will be added when clicking certain
>> > option buttons.
>> >
>> > I've tried inserting autotext to bookmarks but the screen shots are not
>> > added (i get an error in the document).
>> >
>> > Any ideas?
>> >
>> > Thanks,
>> >
>


Re: Help please with option buttons
"Greg Maxey" <gmaxey[ at ]mvps.oSCARrOMEOgOLF> 11.07.2006 21:03:53
Ok thanks.

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


Dave Lett wrote:
[Quoted Text]
> Hi Greg,
>
> Just tested the code you provided and it works fine with an image.
>
> Dave
>
> "Greg Maxey" <gmaxey[ at ]mvps.org> wrote in message
> news:1152648315.960739.89170[ at ]p79g2000cwp.googlegroups.com...
>> Dave,
>> ....then I'm thinking that you have set the RichText argument to
>> True. That could be my fault as I suggested in the userform group:
>>
>> Private Sub OptionButton1_Click()
>> ActiveDocument.AttachedTemplate.AutoTextEntries("Test").Insert _
>> Where:=ActiveDocument.Bookmarks("Test").Range, RichText:=True
>> End Sub
>>
>> I didn't test with an actual screen shot image (just text as the
>> AutoText).
>>
>>
>> Dave Lett wrote:
>>> Answered in microsoft.public.word.vba.general, I think. Please don't
>>> cross
>>> post. If you have autotext that isn't inserting images, then I'm
>>> thinking that you have set the RichText argument to True.
>>>
>>> Dave
>>>
>>> "vandaley" <yossisp[ at ]nice.com> wrote in message
>>> news:1152642091.638213.62000[ at ]35g2000cwc.googlegroups.com...
>>>> Hi,
>>>>
>>>> I need to create option buttons in a user form in VBA word.
>>>>
>>>> When the user clicks the option button it will add a piece of text
>>>> with screen shots to the document and then when following the
>>>> wizard (user form) more text and screen shots will be added when
>>>> clicking certain option buttons.
>>>>
>>>> I've tried inserting autotext to bookmarks but the screen shots
>>>> are not added (i get an error in the document).
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks,


Re: Help please with option buttons
"vandaley" <yossisp[ at ]nice.com> 12.07.2006 13:37:10

Greg Maxey wrote:
[Quoted Text]
> Ok thanks.
>
> --
> Greg Maxey/Word MVP
> See:
> http://gregmaxey.mvps.org/word_tips.htm
> For some helpful tips using Word.
>
>
> Dave Lett wrote:
> > Hi Greg,
> >
> > Just tested the code you provided and it works fine with an image.
> >
> > Dave
> >
> > "Greg Maxey" <gmaxey[ at ]mvps.org> wrote in message
> > news:1152648315.960739.89170[ at ]p79g2000cwp.googlegroups.com...
> >> Dave,
> >> ....then I'm thinking that you have set the RichText argument to
> >> True. That could be my fault as I suggested in the userform group:
> >>
> >> Private Sub OptionButton1_Click()
> >> ActiveDocument.AttachedTemplate.AutoTextEntries("Test").Insert _
> >> Where:=ActiveDocument.Bookmarks("Test").Range, RichText:=True
> >> End Sub
> >>
> >> I didn't test with an actual screen shot image (just text as the
> >> AutoText).
> >>
> >>
> >> Dave Lett wrote:
> >>> Answered in microsoft.public.word.vba.general, I think. Please don't
> >>> cross
> >>> post. If you have autotext that isn't inserting images, then I'm
> >>> thinking that you have set the RichText argument to True.
> >>>
> >>> Dave
> >>>
> >>> "vandaley" <yossisp[ at ]nice.com> wrote in message
> >>> news:1152642091.638213.62000[ at ]35g2000cwc.googlegroups.com...
> >>>> Hi,
> >>>>
> >>>> I need to create option buttons in a user form in VBA word.
> >>>>
> >>>> When the user clicks the option button it will add a piece of text
> >>>> with screen shots to the document and then when following the
> >>>> wizard (user form) more text and screen shots will be added when
> >>>> clicking certain option buttons.
> >>>>
> >>>> I've tried inserting autotext to bookmarks but the screen shots
> >>>> are not added (i get an error in the document).
> >>>>
> >>>> Any ideas?
> >>>>
> >>>> Thanks,

Hi,

Actually i just see it is not the code.
When i create the autotext and then select it in the autotext menu i
can see the error in the preview.

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net