Handling cut and paste through VBa 
Author Message
 Handling cut and paste through VBa

I am trying to create a VB aplication that will copy any text in any format
inserted by a Word user after my bookmark.  How do I make this code work?

My pseudo code is a follows:

open word
find location of my next bookmark
move cursor to positio nidentified by bookmark
insert a form field
In form field permit user to enter- multiple paragraphs of any free form
text.
The above text can be in any format
Copy the contents of the field including format
store in SQL Server table.
next bookmark

When all bookmark fields are completed,
extract each field from SQL database
paste both content and format in a new Word document at a position specified
by bookmark.
end

How do I copy contents of field and format in SQL table?
How do I paste above?

Thanks!

Mukul




Fri, 20 Dec 2002 03:00:00 GMT  
 Handling cut and paste through VBa

Hi Code_dc,

Couple of problems with this

1) a Formfield already is a bookmark. So theoretically you have no problem
getting the text the user typed out of the formfield

2) However, the user cannot format freely in a form field, because in a
document protected for forms, the formatting commands are unavailable. You
can get around this with VBA, but it would have to be very extensive to cover
all the formatting the user might want.

3) Can you store (Word) formatting in an SQL table?

Quote:
> I am trying to create a VB aplication that will copy any text in any format
> inserted by a Word user after my bookmark.  How do I make this code work?

> My pseudo code is a follows:

> open word
> find location of my next bookmark
> move cursor to positio nidentified by bookmark
> insert a form field
> In form field permit user to enter- multiple paragraphs of any free form
> text.
> The above text can be in any format
> Copy the contents of the field including format

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Sat, 21 Dec 2002 03:00:00 GMT  
 Handling cut and paste through VBa

Hi Code_dc,

Couple of problems with this

1) a Formfield already is a bookmark. So theoretically you have no problem
getting the text the user typed out of the formfield

2) However, the user cannot format freely in a form field, because in a
document protected for forms, the formatting commands are unavailable. You
can get around this with VBA, but it would have to be very extensive to cover
all the formatting the user might want.

3) Can you store (Word) formatting in an SQL table?

Quote:
> I am trying to create a VB aplication that will copy any text in any format
> inserted by a Word user after my bookmark.  How do I make this code work?

> My pseudo code is a follows:

> open word
> find location of my next bookmark
> move cursor to positio nidentified by bookmark
> insert a form field
> In form field permit user to enter- multiple paragraphs of any free form
> text.
> The above text can be in any format
> Copy the contents of the field including format

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Sat, 21 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Cutting And Pasting With VBA in Word

2. Mouse controlled cut/paste with Text Boxes in VBA

3. Cut and paste code

4. Cut, Copy, Paste

5. Cut and paste using richtext?

6. How can I copy records like cut-n-paste

7. disabling cut/copy/paste

8. Cut-n-Paste Excel snippet into Outlook 98...

9. disabling copy/paste/cut on shape shortcut menu

10. Macro: Search, Cut, Paste Hidden Text

11. Open word doc and cut and paste

12. Using a Macro to Cut and Paste

 

 
Powered by phpBB® Forum Software