I had the same problem that you are describing. I now use the following
code.
The following contain three functions and a code fragment. SetDirectory is
called with the name of the initial package I'm parsing. It sets a global
variable DirectoryName that is later used. This creates a unique
subdirectory where all the diagrams will be stored. Each diagram is placed
in a unique file, based on the name of the diagram.
James.
Dim DirectoryName As String
Function BuildFileName(istr As String) As String
Dim temp As String
Dim words As Integer
words = WordCount(istr)
temp = Word$(istr,1)
For i% = 2 To words
temp = temp & "_" & Word$(istr,i%)
Next
BuildFileName = temp
End Function
Sub SetDirectory(dirName As String)
Dim temp As String
temp = BuildFileName(dirName)
r$ = Dir$(temp,ebDirectory)
If r$ = "" Then
msgbox temp & " did not exist, creating directory"
MkDir(temp)
End If
DirectoryName = temp & "\"
End Sub
Function DiagramFileName(aName As String) As String
DiagramFileName = DirectoryName & BuildFileName(aName) & ".wmf"
End Function
' output the diagram
Dim dFileName As String
dFileName = DiagramFileName(diag.Name)
diag.Render dFileName
WordApp.InsertPicture dFileName
WordApp.InsertPara
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of sven biebaut
> Sent: Tuesday, March 20, 2001 2:00 AM
> To: roseforum
> Subject: (ROSE) rose script pasting to word from clipboard
>
>
>
> hello,
>
> i managed to get a diagram on the clipboard and retreiving the
> information is through clipboard$. Leaves just the problem to
> tell word
> to import it. I ve got a WordApp object which is assigned =
> CreateObject
> ("Word.Basic") and works fine for normal text through the
> insert method.
> But for a picture it is a no show : insert doesn't work and
> insertpicture requires a file. I tried that but if there are multiple
> diagrams it says file already open. I tried closing and deleting but
> still no show.
>
> As for Soda, we have it but : a) it takes 3 days to generate
> a document
> if Word doesnt crash by that time
> b) the
> mSaveGraphics macros
> crashes on the 400 page document
> c) soda
> reportgeneration for
> seperate packages fails because the template should be adapted and i
> cant do that because it doesnt give me a template view
>
> So, that left me with the rose report generation, which leads to the
> above problems.
>
> All that just for some classes and a few diagrams per package...
>
> Can somebody help me on this one ?
>
> Thanks a lot.
>
> PS. I use Rose 2000e and Word 97 SR2
>
>
>
> **************************************************************
> **********
> * Rose Forum is a public venue for ideas and discussions.
> * For technical support, visit http://www.rational.com/support
> *
> * Admin.Subscription Requests: [EMAIL PROTECTED]
> * Archive of messages:
> http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
> * Other Requests: [EMAIL PROTECTED]
> *
> * To unsubscribe from the list, please send email
> *
> * To: [EMAIL PROTECTED]
> * Subject:<BLANK>
> * Body: unsubscribe rose_forum
> *
> **************************************************************
> ***********
>
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************