Computer Forum Forum Index
Register  FAQ Profile Log in to check your private messages Log in Register 

add textbox while textbox is selected
Goto page Previous  1, 2, 3 ... 14, 15, 16
 
Post new topic   Reply to topic    Computer Forum Forum Index -> microsoft word vba general
View previous topic :: View next topic  
Author Message
1
Guest





PostPosted: Wed Dec 19, 2007 11:58 pm    Post subject: Re: Tricky IF Statement (tricky for me!) Reply with quote

On Dec 19, 6:33 pm, "Graham Mayor" <gma...@REMOVETHISmvps.org> wrote:

Wow! That's amazing. It worked. This should be referenced on Word
MVPS!!!

Thank you very much Graham for all your help!!

Quote:
See the item Formatting cash amounts in words on my web pagehttp://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org


1 wrote:
I have a new dilemma now. As this is a form to print cheques, my
client would like to know if they can type in a number and have it
automatically show up as text in dollars and cents somewhere else on
the page. At the moment they are typing the number (bkAmount) then
typing the text in another field (bkAmount2).

Therefore I somehow need to get rid of the Amount2 bookmark and
replace it with some conversion on the Amount bookmark somewhere else
on the page. I could use Ref bkAmount \* DollarText but this doesn't
give me the word "Dollars".

I have found the following macros but how do I run a macro to convert
a ref field automatically? The first macro assumes you're selecting
the text first.
a href="http://groups.google.com.au/group/
microsoft.public.word.conversions/browse_thread/thread/
51f2a90faa801a4b/811c432a00eac36c?lnk=st&q=convert+number+to+text+in
+word+group%3A*word*#" Conversion of currency to english words in MS
word</a

Or do I keep the Amount2 bookmark but instead of asking for the value
via the form (vAmount2) do I run some code that references the vAmount
figure, converts it and places it in bkAmount2?
Back to top
Google
Sponsor





PostPosted: Wed Dec 19, 2007 11:58 pm    Post subject: Advertisement

Back to top
Roman Prytkov
Guest





PostPosted: Thu Dec 20, 2007 9:44 am    Post subject: RE: Word VBA macro causes 0x80030008 error Reply with quote

Resend from another account - I hope to receive answer as it was promised to
MSDN subscriber.
--------------------
I am trying to create in Word document several tables with "Forms.TextBox.1"
controls in each cell. The dimension of each table is 10 columns x 75 rows.
After the creation of 3-rd table Word can not save file and return error
0x80030008 - There is insufficient memory available to complete operation.".
What memory is insufficient? How to solve this problem?

Word 2003 (11.5604.8172).
Code of macro is following:
---------------------------------------------------------------------
Sub InsertTable(rowsNum, columnsNum, controlClassType)

Set myRange = ActiveDocument.ActiveWindow.Selection.Range
Set myTable = myRange.Tables.Add(Range:=myRange, NumRows:=1,
NumColumns:=10)

Set myRows = myTable.rows

For I = 1 To rowsNum

Set myRow = myRows.Add
Set myCells = myRow.Cells

For J = 1 To columnsNum
Set myCell = myCells(J)
Set myRange = myCell.Range
Set myShapes = myRange.InlineShapes
Set myShape = myShapes.AddOLEControl(classType:=controlClassType)
If (controlClassType = "Forms.TextBox.1") Then
myShape.OLEFormat.Object.AutoSize = True ' use only
Else
myShape.OLEFormat.Activate
End If
Next J
ActiveDocument.UndoClear

Next I

End Sub

Sub AppendParagraph()
Set rng = ActiveDocument.Range
rng.Collapse Direction:=wdCollapseEnd
rng.Select
Selection.Range.InsertParagraphAfter
End Sub

Sub TestTablesSave()
myClassType = "Forms.TextBox.1"

InsertTable 75, 10, myClassType
AppendParagraph
ActiveDocument.Save

InsertTable 75, 10, myClassType
AppendParagraph
ActiveDocument.Save

InsertTable 75, 10, myClassType
AppendParagraph
ActiveDocument.Save
End Sub
Back to top
Davidnitram
Guest





PostPosted: Sun Dec 23, 2007 1:45 pm    Post subject: Re: How can I automatically assemble subdocs into a document Reply with quote

Thanks. I've been looking for this material since 2003 whenit first appeared
in PC Magazine. I looked at the excllent article, but I did not see any link
to download the zip or macro. Can someone please provide? - David
--
Thank you for your help


"herman7" wrote:

Quote:
The boilerplate.dot works very well as described. But I have run into one
problem with Word 2003.

If the filenames selected are shortcuts to actual documents, then Word2003
inserts the shortcut rather than the actual document file (target file).
This problem is not encounterd in Word 97 and Word 2000.

To guard against unauthorized changes to master documents they are kept in a
hidden folder. Shortcuts to those files are kept in a separate folder and
visible to all users. The users are to select from the shortcut files and
assemble the main document using the Boilerplate.dot addin.. I could not
come up with the code get the target filename from the shortcut filename.

This is not an XP issue since VBA in Word2000 is able to resolve and get the
target filename from the shortcut. Also if you insert a shortcut file using
dropdown menus in Word 2003, the problem does not occur.

I would like know if anybody esle has run into this problem or can duplicate
this problem.
thanks
Herman

"fred" <fred@microsoft.com> wrote in message
news:uQ29jbIAHHA.3560@TK2MSFTNGP04.phx.gbl...
There is an excellent boilerpate.dot template which allows you with vba to
set a path to documents and selection on listbox on left and selection
appears on right list box and inserts on OK.

http://www.gmayor.com/Zips/Boiler%20Readme.pdf

"Jose C" <JoseC@discussions.microsoft.com> wrote in message
news:367AC26F-1E91-4723-B070-52BECA3EE1B6@microsoft.com...
I regularly assemble subdocuments into a finished document. The list of
subdocuments may differ depending upon the desired finished product. Is
there a way to assemble a document from a list of subdocuments. Having
to
individually attach each subdocument is time consuming and error prone.




Back to top
Graham Mayor
Guest





PostPosted: Sun Dec 23, 2007 2:27 pm    Post subject: Re: How can I automatically assemble subdocs into a document Reply with quote

If you mean the boiler.dot add-in, you can download it from the downloads
page of my web site http://www.gmayor.com/downloads.htm . It has gathered a
few enhancements since 2003, but essentially fulfils the same role.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Davidnitram wrote:
Quote:
Thanks. I've been looking for this material since 2003 whenit first
appeared in PC Magazine. I looked at the excllent article, but I did
not see any link to download the zip or macro. Can someone please
provide? - David

The boilerplate.dot works very well as described. But I have run
into one problem with Word 2003.

If the filenames selected are shortcuts to actual documents, then
Word2003 inserts the shortcut rather than the actual document file
(target file). This problem is not encounterd in Word 97 and Word
2000.

To guard against unauthorized changes to master documents they are
kept in a hidden folder. Shortcuts to those files are kept in a
separate folder and visible to all users. The users are to select
from the shortcut files and assemble the main document using the
Boilerplate.dot addin.. I could not come up with the code get the
target filename from the shortcut filename.

This is not an XP issue since VBA in Word2000 is able to resolve and
get the target filename from the shortcut. Also if you insert a
shortcut file using dropdown menus in Word 2003, the problem does
not occur.

I would like know if anybody esle has run into this problem or can
duplicate this problem.
thanks
Herman

"fred" <fred@microsoft.com> wrote in message
news:uQ29jbIAHHA.3560@TK2MSFTNGP04.phx.gbl...
There is an excellent boilerpate.dot template which allows you with
vba to set a path to documents and selection on listbox on left and
selection appears on right list box and inserts on OK.

http://www.gmayor.com/Zips/Boiler%20Readme.pdf

"Jose C" <JoseC@discussions.microsoft.com> wrote in message
news:367AC26F-1E91-4723-B070-52BECA3EE1B6@microsoft.com...
I regularly assemble subdocuments into a finished document. The
list of subdocuments may differ depending upon the desired
finished product. Is there a way to assemble a document from a
list of subdocuments. Having to
individually attach each subdocument is time consuming and error
prone.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Computer Forum Forum Index -> microsoft word vba general All times are GMT
Goto page Previous  1, 2, 3 ... 14, 15, 16
Page 16 of 16

 
Jump to:  
You cannot post new topics in this forum
You cannot 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
Computer Forum