J
Jan
Hello,
i am desperately trying to find the error in my vba macro but i can't. Can
anyone help me?
In short
i add a textbox to the word document using the following sub:
Sub textfeld()
ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 30, _
150, 200#, 50#, Anchor:=Selection.Paragraphs(1).Range).Select
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0)
Selection.ShapeRange.ZOrder 4
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(0, 255, 0)
Selection.Collapse
End Sub
This works as far as i can see.
Than i am doing something completely different: Creating a MODI.Document
from a file and safe it.
the code looks like this
....
Public Function convertMDIToTIFF(ByVal strFileName As String)
....
Dim miDoc As MODI.Document
Set miDoc = New MODI.Document
miDoc.Create mdiFilename
miDoc.SaveAs tiffFilename, MODI.MiFILE_FORMAT.miFILE_FORMAT_TIFF_LOSSLESS
miDoc.Close False
Set miDoc = Nothing
As you can see this has nothing to do with the creation of the textbox.
Unfortunately after returning from this function i can't move the textboxes
i created before within word. Typing text or other things work.
To solve this prob I first have to close word and open it again. can you
explain me why this happens and how to avoid this?
Thanks in advance for any help.
Best regards
Jan
i am desperately trying to find the error in my vba macro but i can't. Can
anyone help me?
In short
i add a textbox to the word document using the following sub:
Sub textfeld()
ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 30, _
150, 200#, 50#, Anchor:=Selection.Paragraphs(1).Range).Select
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0)
Selection.ShapeRange.ZOrder 4
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(0, 255, 0)
Selection.Collapse
End Sub
This works as far as i can see.
Than i am doing something completely different: Creating a MODI.Document
from a file and safe it.
the code looks like this
....
Public Function convertMDIToTIFF(ByVal strFileName As String)
....
Dim miDoc As MODI.Document
Set miDoc = New MODI.Document
miDoc.Create mdiFilename
miDoc.SaveAs tiffFilename, MODI.MiFILE_FORMAT.miFILE_FORMAT_TIFF_LOSSLESS
miDoc.Close False
Set miDoc = Nothing
As you can see this has nothing to do with the creation of the textbox.
Unfortunately after returning from this function i can't move the textboxes
i created before within word. Typing text or other things work.
To solve this prob I first have to close word and open it again. can you
explain me why this happens and how to avoid this?
Thanks in advance for any help.
Best regards
Jan