Thanks. But how to write an image to a word? As I know, we only have the "type text " ,which can only input "text" type.First make sure to store the image to a Data Item and then use this DI to write to word document.
or
Copy this image to clipboard and then use Get from Clipboard and write to word.
you have one option "paste from clipboard, use that oneThanks. But how to write an image to a word? As I know, we only have the "type text " ,which can only input "text" type.
Please post it separately, not in this thread.........Hi All,
I have one predefined document, i just want to replace name and account number for every customer and send it back to customer,
how to replace the text from word document, kindly advise it.
Thanks. But I still have questions, I wonder how to use the "paste from clipboard" .There is still a type of "input" called text. And I don't know what should I input and where is the image goes. View attachment 1534410488074.pngyou have one option "paste from clipboard, use that one
Thanks. But I still have questions, I wonder how to use the "paste from clipboard" .There is still a type of "input" called text. And I don't know what should I input .And if we change the type in the VBO, the code of the " paste from clipboard" ,code will go wrong . View attachment 1534410488074.png View attachment 1534412290864.pngOnce after opening the word file use Get from Clipboard Action from VBO
This is in continuation to your other post where you are getting the image to a file on the data item called FullSavedScreenshotPath.I want to know how to insert the image to the word file automatically in blue prism.
Thanks.
Dim objWord as Object ' Word.Application
Dim objDoc as Object ' Word.Document
Dim objShapes as Object 'Shape object
objWord = CreateObject("Word.Application")
objDoc = objWord.Documents.Open(Document_File_Full_Path)
objWord.Visible = True
objShapes=objDoc.InlineShapes.AddPicture (FileName:=Image_File_Full_Path, LinkToFile:=False, SaveWithDocument:=True)
'Adjust the Height & Width as required
'If both the below lines are commented then the original image is pasted as it is
objShapes.Height = 300
objShapes.Width = 500
With objDoc
.Save
.Close
End With
objWord.Quit
objWord = Nothing
objDoc = Nothing
objShapes = Nothing
Thanks a lot for your selfless help. I think I have solved the problems.This is in continuation to your other post where you are getting the image to a file on the data item called FullSavedScreenshotPath.
i. Once that is done create a new action in the Object Studio
View attachment 1686
ii. Start stage Input parameters
View attachment 1687
iii. Code stage Input parameters
View attachment 1688
iv. Code stage:
This is just a basic skeleton and you need to amend it as necessary.
Code:Dim objWord as Object ' Word.Application Dim objDoc as Object ' Word.Document Dim objShapes as Object 'Shape object objWord = CreateObject("Word.Application") objDoc = objWord.Documents.Open(Document_File_Full_Path) objWord.Visible = True objShapes=objDoc.InlineShapes.AddPicture (FileName:=Image_File_Full_Path, LinkToFile:=False, SaveWithDocument:=True) 'Adjust the Height & Width as required 'If both the below lines are commented then the original image is pasted as it is objShapes.Height = 300 objShapes.Width = 500 With objDoc .Save .Close End With objWord.Quit objWord = Nothing objDoc = Nothing objShapes = Nothing
v. Output Word document
View attachment 1689
This is in continuation to your other post where you are getting the image to a file on the data item called FullSavedScreenshotPath.
i. Once that is done create a new action in the Object Studio
View attachment 1686
ii. Start stage Input parameters
View attachment 1687
iii. Code stage Input parameters
View attachment 1688
iv. Code stage:
This is just a basic skeleton and you need to amend it as necessary.
Code:Dim objWord as Object ' Word.Application Dim objDoc as Object ' Word.Document Dim objShapes as Object 'Shape object objWord = CreateObject("Word.Application") objDoc = objWord.Documents.Open(Document_File_Full_Path) objWord.Visible = True objShapes=objDoc.InlineShapes.AddPicture (FileName:=Image_File_Full_Path, LinkToFile:=False, SaveWithDocument:=True) 'Adjust the Height & Width as required 'If both the below lines are commented then the original image is pasted as it is objShapes.Height = 300 objShapes.Width = 500 With objDoc .Save .Close End With objWord.Quit objWord = Nothing objDoc = Nothing objShapes = Nothing
v. Output Word document
View attachment 1689
I am not sure which post and steps are you referring to. If it belongs to some other post can you submit it there with full details like what is the path you are giving.I Have gone through the all step mentioned and implemented ,while running i'm getting below internal error
Hi, VJR. I met a new problem in this problem. When I tried to insert a picture to a word, it shows :Thanks a lot for your selfless help. I think I have solved the problems.
The code I used is just the one you provided previously. The document is not the read-only document, but it will popup a dialog box which shows "which type do you want to open this file?" . Below it shows three choice to select. However when I select it, the error comes out. What's more , the correct result will show in a read-only but same-named word file which occurs suddenly.And it needs to "save as" as a Word opreation .Hi lee,
Are you opening a document that is read-only Or is the document not closed thoroughly in the previous instance?
What is the complete code that you are using?