Prev: Macro for DocumentStatistics: Contents of MsgBox in a new document
Next: This action cannot be completed
From: EM on 14 May 2010 17:46 X-No-Archive: Yes I frequently use the macro to extract acronyms into another document posted in http://www.thedoctools.com/index.php?show=mt_acronyms_extract. Is there a way to put the paragraph number in the third column instead of the page number? .Cell(n + 1, 1).Range.Text = strAcronym 'Insert page number in column 3 .Cell(n + 1, 3).Range.Text = oRange.Information(wdActiveEndPageNumber) Thanks in advance.
From: Doug Robbins - Word MVP on 14 May 2010 22:21 Just what do you mean by the paragraph number? Are the paragraphs numbered by the use of a style that includes the numbering? Is it the number of the paragraph on that page where the first paragraph or part paragraph on that page would be paragraph 1? Is it the number of the paragraph in the document where the first paragraph in the document will be paragraph 1? -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "EM" <EM(a)nospam.discussions.com> wrote in message news:eUzGv768KHA.5724(a)TK2MSFTNGP04.phx.gbl... > X-No-Archive: Yes > > I frequently use the macro to extract acronyms into another document > posted > in http://www.thedoctools.com/index.php?show=mt_acronyms_extract. Is there > a > way to put the paragraph number in the third column instead of the page > number? > > .Cell(n + 1, 1).Range.Text = strAcronym > 'Insert page number in column 3 > .Cell(n + 1, 3).Range.Text = > oRange.Information(wdActiveEndPageNumber) > > Thanks in advance. > > > >
From: EM on 15 May 2010 10:11 X-No-Archive: Yes >>Are the paragraphs numbered by the use of a style that includes the numbering? Is it the number of the paragraph in the document where the first paragraph in the document will be paragraph 1?<< Yes, the paragraphs are numbered with a style that includes the numbering and the first paragraph in the document will be paragraph 1. --
From: Doug Robbins - Word MVP on 15 May 2010 17:55 Use: oDoc_Source.ConvertNumberstoText and then use: .Cell(n + 1, 1).Range.Text = strAcronym .Cell(n + 1, 3).Range.Text = Left(oRange.Paragraphs(1).Range, InStr(oRange.Paragraphs(1).Range, Chr(9))) At the end I would add: oDoc_Source.Close savechanges:=wdDoNotSaveChanges to close the source document without change of converting the numbers to text. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "EM" <EM(a)nospam.discussions.com> wrote in message news:#U0V2hD9KHA.3276(a)TK2MSFTNGP02.phx.gbl... > X-No-Archive: Yes > >>>Are the paragraphs numbered by the use of a style that includes the > numbering? > Is it the number of the paragraph in the document where the first > paragraph > in the document will be paragraph 1?<< > > Yes, the paragraphs are numbered with a style that includes the > numbering and the first paragraph in the document will be paragraph 1. > > -- > > >
From: EM on 17 May 2010 18:00 X-No-Archive: Yes Worked perfectly, Thanks a lot. --- >>Use: oDoc_Source.ConvertNumberstoText and then use: .Cell(n + 1, 1).Range.Text = strAcronym .Cell(n + 1, 3).Range.Text = Left(oRange.Paragraphs(1).Range, InStr(oRange.Paragraphs(1).Range, Chr(9)))<<
|
Next
|
Last
Pages: 1 2 Prev: Macro for DocumentStatistics: Contents of MsgBox in a new document Next: This action cannot be completed |