Build Documentation

3 views
Skip to first unread message

Jonathan Parker

unread,
Mar 18, 2009, 8:46:54 PM3/18/09
to alt...@googlegroups.com
Does anyone know if there is any easy (no code) way to auto generate a
2003 word doc from a document template using NAnt / MSBuild / VBScript
/ ???

Our release notes are in a word doc and include the version number of
the release etc. so it's painful to have to update every time.

Cheers,
Jonathan.

Adam Dymitruk

unread,
Mar 18, 2009, 10:06:01 PM3/18/09
to alt...@googlegroups.com
The new docx format is what I would generate. It's all xml that's then
compressed. You can then automate the conversion of that document to
2003 format.

Jonathan Parker

unread,
Mar 18, 2009, 10:29:34 PM3/18/09
to alt...@googlegroups.com
Cool, though I can't find any links on automating conversion. Do you
know how it's done?

Adam Dymitruk

unread,
Mar 18, 2009, 10:35:31 PM3/18/09
to alt...@googlegroups.com
simply press ALT+F11 to get into the macro editor. Go back to word.
Record temporary macro. Do a save as 2003 format command through the
menu. Then stop the macro recorder. Jump back to the macro ide and you
should see the autogenerated code for what you just did. This will
give you an example of what you can do with the Word Automation API.

Let me know if you need any more help.

Adam

On Wed, Mar 18, 2009 at 6:29 PM, Jonathan Parker
<jonathanp...@gmail.com> wrote:
>
> Cool, though I can't find any links on automating conversion. Do you
> know how it's done?
>
> On Thu, Mar 19, 2009 at 1:06 PM, Adam Dymitruk <ad...@dymitruk.com> wrote:
>>
>> The new docx format is what I would generate. It's all xml that's then
>> compressed. You can then automate the conversion of that document to
>> 2003 format.
>>
>> On Wed, Mar 18, 2009 at 4:46 PM, Jonathan Parker
>> <jonathanp...@gmail.com> wrote:
>>>
>>> Does anyone know if there is any easy (no code) way to auto generate a
>>> 2003 word doc from a document template using NAnt / MSBuild / VBScript
>>> / ???
>>>
>>> Our release notes are in a word doc and include the version number of
>>> the release etc. so it's painful to have to update every time.
>>>
>>> Cheers,
>>> Jonathan.
>>>
>>> >
>>>
>>
>> >
>>
>
> >
>



--
Adam Dymitruk
Director of IT
SCANit International (a division of APARA Systems)
mobile: 604.831.7804

Jonathan Parker

unread,
Mar 18, 2009, 10:53:47 PM3/18/09
to alt...@googlegroups.com
Ah, it sounds like a weekend project I think. Thanks for the info though.

Adam Dymitruk

unread,
Mar 18, 2009, 11:04:56 PM3/18/09
to alt...@googlegroups.com
You should be able to do it in a matter of minutes.

This is what I got:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 03/18/2009 by Adam Dymitruk
'
ActiveDocument.SaveAs FileName:="test.doc", FileFormat:=103, LockComments _
:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", _
ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:= _
False
End Sub


On Wed, Mar 18, 2009 at 6:53 PM, Jonathan Parker

Jonathan Parker

unread,
Mar 19, 2009, 1:48:48 AM3/19/09
to alt...@googlegroups.com
Cool, I don't have 2007 on my machine at work so will have to look at how feasible it is.

roundcrisis

unread,
Apr 14, 2009, 7:12:49 AM4/14/09
to ALTNET
maybe you should re evaluate the use of word for this task?
html is quite good for this
or pdf
advantages
- everyone can read ( not all people have word installed, nevermind
word 2007)
- easier to generate
- non propertary

jsut my 2 cents
:D

On Mar 19, 6:48 am, Jonathan Parker <jonathanparkerem...@gmail.com>
wrote:
> Cool, I don't have 2007 on my machine at work so will have to look at how
> feasible it is.
>
>
>
> On Thu, Mar 19, 2009 at 2:04 PM, Adam Dymitruk <a...@dymitruk.com> wrote:
>
> > You should be able to do it in a matter of minutes.
>
> > This is what I got:
>
> > Sub Macro1()
> > '
> > ' Macro1 Macro
> > ' Macro recorded 03/18/2009 by Adam Dymitruk
> > '
> >    ActiveDocument.SaveAs FileName:="test.doc", FileFormat:=103,
> > LockComments _
> >        :=False, Password:="", AddToRecentFiles:=True, WritePassword:="", _
> >        ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
> >        SaveNativePictureFormat:=False, SaveFormsData:=False,
> > SaveAsAOCELetter:= _
> >        False
> > End Sub
>
> > On Wed, Mar 18, 2009 at 6:53 PM, Jonathan Parker
> > <jonathanparkerem...@gmail.com> wrote:
> > > Ah, it sounds like a weekend project I think. Thanks for the info though.
>
> > > On Thu, Mar 19, 2009 at 1:35 PM, Adam Dymitruk <a...@dymitruk.com>
> > wrote:
>
> > >> simply press ALT+F11 to get into the macro editor. Go back to word.
> > >> Record temporary macro. Do a save as 2003 format command through the
> > >> menu. Then stop the macro recorder. Jump back to the macro ide and you
> > >> should see the autogenerated code for what you just did. This will
> > >> give you an example of what you can do with the Word Automation API.
>
> > >> Let me know if you need any more help.
>
> > >> Adam
>
> > >> On Wed, Mar 18, 2009 at 6:29 PM, Jonathan Parker
> > >> <jonathanparkerem...@gmail.com> wrote:
>
> > >> > Cool, though I can't find any links on automating conversion. Do you
> > >> > know how it's done?
>
> > >> > On Thu, Mar 19, 2009 at 1:06 PM, Adam Dymitruk <a...@dymitruk.com>

Olof Bjarnason

unread,
Apr 14, 2009, 7:23:45 AM4/14/09
to alt...@googlegroups.com
2009/4/14 roundcrisis <round...@gmail.com>:
>
> maybe you should re evaluate the use of word for this task?
> html is quite good for this
> or pdf

.. or .rtf (Rich Text Format). It is a quite unknown but useful
format, too. Wordpad aswell as OpenOffice handles .rtf this just fine.
--
Blogg: http://olofb.wordpress.com [Sv]
Blog: http://olofb.wordpress.com/tag/english [Eng]

Jonathan Parker

unread,
Apr 14, 2009, 6:58:39 PM4/14/09
to alt...@googlegroups.com
Yes, if only customers understood this!

Olof Bjarnason

unread,
Apr 15, 2009, 2:02:58 AM4/15/09
to alt...@googlegroups.com
2009/4/15 Jonathan Parker <jonathanp...@gmail.com>:
> Yes, if only customers understood this!

.rtf files look just like .doc files per default in Windows. There
really is not that much to understand ;)

http://en.wikipedia.org/wiki/Rich_Text_Format

You can probably get away with saving them in files ending with ".doc"
too, if that bothers you!

Good luck,
--
twitter.com/olofb
olofb.wordpress.com
olofb.wordpress.com/tag/english
Reply all
Reply to author
Forward
0 new messages